GCC compilation yields “real.h:53: error: 'SIZEOF_LONG' undeclared here (not in a function)”

后端 未结 2 1545
北荒
北荒 2021-01-16 13:42

I\'m trying to compile GCC 4.7.2 on a Buffalo LinkStation Pro Duo (after unlocking it) which runs Linux 2.6.31.8 armv5tel.

Unfortunately, make throws qu

相关标签:
2条回答
  • 2021-01-16 13:42

    SIZEOF_LONG should be #defined by configure in the file auto-host.h. Your auto-host.h should contain something like:

    /* The size of `long', as computed by sizeof. */
    #ifndef USED_FOR_TARGET
    #define SIZEOF_LONG 8
    #endif
    

    If the above is not present (and it looks like in your case it's indeed so), check config.log for errors. Search for errors around the string checking size of long.

    0 讨论(0)
  • 2021-01-16 14:07
    • Thanks to chill's answer I checked config.log to discover
      conftest.c:10:19: error: ppl_c.h: No such file or directory
      (which, curiously, did not prevent configure from creating a Makefile and returning a success error code). The first google hit on that was this post, showing I didn't provide the ppl dependency.
    • The ppl-1.0 compilation greeted me with
      checked_float.inlines.hh:1012: error: 'frexpl' was not declared in this scope
      which led me to this post suggesting I'd use the 1.1 snapshot instead, which worked
    • Now, gcc's make offered me another "helpful" error:
      gcc/../libcpp/include/line-map.h:66: error: 'CHAR_BIT'
      which turned out to be due to C_INCLUDE_PATH ending with a colon (I already experienced the checking LIBRARY_PATH variable... contains current directory error mentioned in that post, but didn't think about checking other variables for that as well)

    Compilation is still running, so far no more errors...

    0 讨论(0)
提交回复
热议问题