Jump to content
  • 0

Compiling problems


Igniz

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   15
  • Joined:  12/06/11
  • Last Seen:  

Hi, i compiled all ok on MVS, but on centos 5 throw me annoying errors

Tried already:

  1. Install all gcc package (yum install -y gcc*)
  2. Install c++ package (yum install gcc-c++)
  3. Obviously fresh rathena

This is the error with default gcc 4.1.2 compiler:

[root@root]# make server
make[1]: Entering directory `/root/3rdparty/mt19937ar'
        CC      mt19937ar.c
cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
cc1: error: unrecognized command line option "-Wno-clobbered"
cc1: error: unrecognized command line option "-Wempty-body"
make[1]: *** [mt19937ar.o] Error 1
make[1]: Leaving directory `/root/interlude/3rdparty/mt19937ar'
make: *** [mt19937ar] Error 2

And this is the error on CMAKE 2.8.10.2:

[ 27%] Built target common
Linking C executable login-server
../common/libcommon_base.a(mempool.c.o): In function `mempool_async_allocator':
mempool.c:(.text+0x51): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x87): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xa8): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x106): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x126): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1d8): undefined reference to `__sync_add_and_fetch_8'
mempool.c:(.text+0x22d): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x263): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x284): undefined reference to `__sync_sub_and_fetch_4'
../common/libcommon_base.a(mempool.c.o): In function `mempool_final':
mempool.c:(.text+0x40b): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x486): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x4bc): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x4dd): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x53b): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x55b): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x5f7): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x62d): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x64e): undefined reference to `__sync_sub_and_fetch_4'
../common/libcommon_base.a(mempool.c.o): In function `segment_allocate_add':
mempool.c:(.text+0x97e): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x9cf): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x9fc): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0xa93): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xabc): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0xb42): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xb93): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xbc0): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0xc6b): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xcbc): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xce9): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0xd65): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xd88): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0xdf2): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xe28): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xe49): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0xeb0): undefined reference to `__sync_fetch_and_add_8'
mempool.c:(.text+0xee6): undefined reference to `__sync_fetch_and_add_8'
mempool.c:(.text+0xf0c): undefined reference to `__sync_add_and_fetch_8'
mempool.c:(.text+0xf41): undefined reference to `__sync_fetch_and_add_8'
../common/libcommon_base.a(mempool.c.o): In function `mempool_create':
mempool.c:(.text+0x12c5): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x12fb): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x131c): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x137a): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x139a): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x13ff): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1435): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1456): undefined reference to `__sync_sub_and_fetch_4'
../common/libcommon_base.a(mempool.c.o): In function `mempool_destroy':
mempool.c:(.text+0x14fc): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x154d): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x157a): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1611): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x163a): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1728): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1779): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x17a6): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0x1851): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x18a2): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x18cf): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1966): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x198f): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x19f4): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1a45): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1a72): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1b09): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1b32): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1d67): undefined reference to `__sync_lock_test_and_set_8'
mempool.c:(.text+0x1dab): undefined reference to `__sync_lock_test_and_set_8'
mempool.c:(.text+0x1def): undefined reference to `__sync_lock_test_and_set_8'
mempool.c:(.text+0x1e2d): undefined reference to `__sync_lock_test_and_set_8'
mempool.c:(.text+0x1e6e): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1ea4): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1ec5): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0x1f37): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1f6d): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1f8e): undefined reference to `__sync_sub_and_fetch_4'
../common/libcommon_base.a(mempool.c.o): In function `mempool_node_get':
mempool.c:(.text+0x20e1): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x212c): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x2153): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x21bd): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x21e0): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x2255): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x228b): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x22ac): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0x2316): undefined reference to `__sync_sub_and_fetch_8'
mempool.c:(.text+0x23c7): undefined reference to `__sync_lock_test_and_set_8'
../common/libcommon_base.a(mempool.c.o): In function `mempool_node_put':
mempool.c:(.text+0x24c5): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x24fb): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x251c): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x257a): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x259a): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x2604): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x263a): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x265b): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0x26b2): undefined reference to `__sync_add_and_fetch_8'
collect2: ld returned 1 exit status
make[2]: *** [src/login/login-server] Error 1
make[1]: *** [src/login/CMakeFiles/login-server.dir/all] Error 2
make: *** [all] Error 2

So, this is a package problem imo, but what package is outdated/missing? Or what is the main problem?

Some ideas? Thanks in advance

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  399
  • Reputation:   69
  • Joined:  12/26/15
  • Last Seen:  

5 hours ago, Igniz said:

Hi, i compiled all ok on MVS, but on centos 5 throw me annoying errors

Tried already:

  1. Install all gcc package (yum install -y gcc*)
  2. Install c++ package (yum install gcc-c++)
  3. Obviously fresh rathena

This is the error with default gcc 4.1.2 compiler:


[root@root]# make server
make[1]: Entering directory `/root/3rdparty/mt19937ar'
        CC      mt19937ar.c
cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
cc1: error: unrecognized command line option "-Wno-clobbered"
cc1: error: unrecognized command line option "-Wempty-body"
make[1]: *** [mt19937ar.o] Error 1
make[1]: Leaving directory `/root/interlude/3rdparty/mt19937ar'
make: *** [mt19937ar] Error 2

And this is the error on CMAKE 2.8.10.2:


[ 27%] Built target common
Linking C executable login-server
../common/libcommon_base.a(mempool.c.o): In function `mempool_async_allocator':
mempool.c:(.text+0x51): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x87): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xa8): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x106): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x126): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1d8): undefined reference to `__sync_add_and_fetch_8'
mempool.c:(.text+0x22d): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x263): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x284): undefined reference to `__sync_sub_and_fetch_4'
../common/libcommon_base.a(mempool.c.o): In function `mempool_final':
mempool.c:(.text+0x40b): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x486): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x4bc): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x4dd): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x53b): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x55b): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x5f7): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x62d): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x64e): undefined reference to `__sync_sub_and_fetch_4'
../common/libcommon_base.a(mempool.c.o): In function `segment_allocate_add':
mempool.c:(.text+0x97e): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x9cf): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x9fc): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0xa93): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xabc): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0xb42): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xb93): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xbc0): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0xc6b): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xcbc): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xce9): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0xd65): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xd88): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0xdf2): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xe28): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0xe49): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0xeb0): undefined reference to `__sync_fetch_and_add_8'
mempool.c:(.text+0xee6): undefined reference to `__sync_fetch_and_add_8'
mempool.c:(.text+0xf0c): undefined reference to `__sync_add_and_fetch_8'
mempool.c:(.text+0xf41): undefined reference to `__sync_fetch_and_add_8'
../common/libcommon_base.a(mempool.c.o): In function `mempool_create':
mempool.c:(.text+0x12c5): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x12fb): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x131c): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x137a): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x139a): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x13ff): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1435): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1456): undefined reference to `__sync_sub_and_fetch_4'
../common/libcommon_base.a(mempool.c.o): In function `mempool_destroy':
mempool.c:(.text+0x14fc): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x154d): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x157a): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1611): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x163a): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1728): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1779): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x17a6): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0x1851): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x18a2): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x18cf): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1966): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x198f): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x19f4): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1a45): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1a72): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1b09): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1b32): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x1d67): undefined reference to `__sync_lock_test_and_set_8'
mempool.c:(.text+0x1dab): undefined reference to `__sync_lock_test_and_set_8'
mempool.c:(.text+0x1def): undefined reference to `__sync_lock_test_and_set_8'
mempool.c:(.text+0x1e2d): undefined reference to `__sync_lock_test_and_set_8'
mempool.c:(.text+0x1e6e): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1ea4): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1ec5): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0x1f37): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1f6d): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x1f8e): undefined reference to `__sync_sub_and_fetch_4'
../common/libcommon_base.a(mempool.c.o): In function `mempool_node_get':
mempool.c:(.text+0x20e1): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x212c): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x2153): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x21bd): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x21e0): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x2255): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x228b): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x22ac): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0x2316): undefined reference to `__sync_sub_and_fetch_8'
mempool.c:(.text+0x23c7): undefined reference to `__sync_lock_test_and_set_8'
../common/libcommon_base.a(mempool.c.o): In function `mempool_node_put':
mempool.c:(.text+0x24c5): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x24fb): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x251c): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x257a): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x259a): undefined reference to `__sync_add_and_fetch_4'
mempool.c:(.text+0x2604): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x263a): undefined reference to `__sync_val_compare_and_swap_4'
mempool.c:(.text+0x265b): undefined reference to `__sync_sub_and_fetch_4'
mempool.c:(.text+0x26b2): undefined reference to `__sync_add_and_fetch_8'
collect2: ld returned 1 exit status
make[2]: *** [src/login/login-server] Error 1
make[1]: *** [src/login/CMakeFiles/login-server.dir/all] Error 2
make: *** [all] Error 2

So, this is a package problem imo, but what package is outdated/missing? Or what is the main problem?

Some ideas? Thanks in advance

since u are using centos 5, this might help u

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...