#22 does not compile on LINUX_64

open
nobody
core (19)
5
2011-04-10
2011-04-10
Anonymous
No

...
[Compiling library-trans-ip/S_IpAddr.cpp]
[Compiling library-trans-ip/C_TransIP.cpp]
[Compiling library-trans-ip/C_DataDecode.cpp]
[Compiling library-trans-ip/C_Socket.cpp]
[Linking /toto/seagull.svn.LINUX/build-1.8.2/libtrans_ip.so]
/usr/bin/ld: /toto/seagull.svn.LINUX/work-1.8.2/integer_t.o: relocation R_X86_64_32 against `__gxx_personality_v0' can not be used when making a shared object; recompile with -fPIC
/toto/seagull.svn.LINUX/work-1.8.2/integer_t.o: could not read symbols: Bad value
collect2: ld a retourné 1 code d'état d'exécution
make[1]: *** [/toto/seagull.svn.LINUX/build-1.8.2/libtrans_ip.so] Erreur 1
make[1]: quittant le répertoire « /toto/seagull.svn.LINUX »
make: *** [all_libtrans_ip.so] Erreur 2

Discussion


  • Anonymous
    2011-04-20

    in build.conf file, I have to replace "g++" with "g++ -fPIC" and than rebuild will work. When I start seagull, it cores :( but that's other issues.

     
  • Rohit Joshi
    Rohit Joshi
    2011-05-03

    Also when seagull binary is compiled, generated mk file uses LD_EXE and LD flags.
    I had to put a check if != EXE than use default else use CC_EXE and remove LD_FLAGS.

    if [ ${BUILD_TYPE} != 'EXE' ]
    then
    echo "build type is ${BUILD_TYPE}"
    echo " @\$(LD_${BUILD_TYPE}) \$(LD_FLAGS_${BUILD_TYPE}) \$(TARGET_OBJ) \$(LD_PATH_${BUILD_TYPE}) \$(LD_LIBS_${BUILD_TYPE}) -o \$(FINAL_TARGET)" >>${GENERATED_FILE}
    else
    echo "build type is ${BUILD_TYPE}"
    echo " @\$(CC_${BUILD_TYPE}) \$(TARGET_OBJ) \$(LD_PATH_${BUILD_TYPE}) \$(LD_LIBS_${BUILD_TYPE}) -o \$(FINAL_TARGET)" >>${GENERATED_FILE}
    fi