Menu

Error at Compilation: Flag Erros?

2016-08-11
2016-08-11
  • Benjamin Horowitz

    Hello,

    I'm trying to compile code that includes this library (it was working very well in my small-scale tests!) but I seem to be getting cryptic (to me) errors in this case:

    I'm assuming something in my compiler flags is causing issues...

    cd /global/u2/b/bhorowit/class_versions/class_public/build;gcc -pipe -g  -Wall -O4 -ffast-math  -fopenmp -g -fPIC -D__CLASSDIR__='"/global/u2/b/bhorowit/class_versions/class_public"' -DHYREC -I../include  -I../hyrec -c ../source/murmur_hash3.c -o murmur_hash3.o
    ../source/murmur_hash3.c:76:23: warning: always_inline function might not be inlinable [-Wattributes]
     FORCE_INLINE uint32_t fmix32 ( uint32_t h )
                           ^
    ../source/murmur_hash3.c:61:23: warning: always_inline function might not be inlinable [-Wattributes]
     FORCE_INLINE uint32_t getblock32 ( const uint32_t * p, int i )
                           ^
    ../source/murmur_hash3.c: In function 'MurmurHash3_x86_32':
    ../source/murmur_hash3.c:61:23: error: inlining failed in call to always_inline 'getblock32': function body can be overwritten at link time
    ../source/murmur_hash3.c:122:14: error: called from here
         uint32_t k1 = getblock32(blocks,i);
                  ^
    ../source/murmur_hash3.c:76:23: error: inlining failed in call to always_inline 'fmix32': function body can be overwritten at link time
     FORCE_INLINE uint32_t fmix32 ( uint32_t h )
                           ^
    ../source/murmur_hash3.c:153:6: error: called from here
       h1 = fmix32(h1);
          ^
    make: *** [murmur_hash3.o] Error 1
    

    Thanks!
    Best,
    Ben

     
  • Benjamin Horowitz

    It seems like the problem was with -fPIC... Uncertain how/why that caused those issues, but I'll leave this here in case anyone searches this error in the future!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.