Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Infrastructure → Build environment
  • Assigned To
    MikeS
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.12
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by thomasjfox - 2012-12-27
Last edited by MikeS - 2012-12-28

FS#12794 - new EQ code does not compile for the Nokia N8x0

Hi,

the Nokia N8x0 is stuck with a rather old gcc version. This piece of code fails to compile:

/home/maemo/MyProjects/rockbox/lib/rbcodec/dsp/eq.c: In function `dsp_set_eq_coefs’:
/home/maemo/MyProjects/rockbox/lib/rbcodec/dsp/eq.c:79: error: initializer element is not constant
/home/maemo/MyProjects/rockbox/lib/rbcodec/dsp/eq.c:79: error: (near initialization for `coef_gen[1]’)
/home/maemo/MyProjects/rockbox/lib/rbcodec/dsp/eq.c:79: error: initializer element is not constant
/home/maemo/MyProjects/rockbox/lib/rbcodec/dsp/eq.c:79: error: (near initialization for `coef_gen[2]’)
/home/maemo/MyProjects/rockbox/lib/rbcodec/dsp/eq.c:79: error: initializer element is not constant
/home/maemo/MyProjects/rockbox/lib/rbcodec/dsp/eq.c:79: error: (near initialization for `coef_gen[3]’)

gcc version: sbox-arm-linux-gcc (GCC) 3.4.4 (release) (CodeSourcery ARM 2005q3-2)

If I understand the code correctly, it’s only called during EQ init / EQ changes and could be re-written with if() statements. Is that correct?

Thomas

Closed by  MikeS
2012-12-28 19:21
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

362ade3

MikeS commented on 2012-12-28 06:43

Did you try moving the array to global scope? Those would involve initialzed ranges which shouldn't be unique. I've had GCC act weird with localized static variables and aggregates.

MikeS commented on 2012-12-28 06:46

When I say "weird", I mean a newer gcc generates exactly those messages with nested static compound literals. So, just something to check out first.

Ok,

I moved it outside the function and tried with and without the "static" keyword. Same error message.
This old gcc version seems to have trouble with the "x … y" syntax + the pointer to a function.

This compiles fine:
"[1 … EQ_NUM_BANDS-2] = NULL,"

Could we init this stuff once with an _init() function and remove the "x … y" syntax?

MikeS commented on 2012-12-28 18:27

Test this out. Then if…then approach is fine.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing