Jump to content

strange errors while compiling


Go to solution Solved by TheEqualizer,

Recommended Posts

/usr/local/bin/ld: ../../../Extern/lib/libcryptopp.a(integer.o): in function `std::__new_allocator<unsigned int>::allocate(unsigned int, void const*)':
/usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: undefined reference to `std::__throw_bad_array_new_length()'
/usr/local/bin/ld: /usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: undefined reference to `std::__throw_bad_array_new_length()'
/usr/local/bin/ld: /usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: undefined reference to `std::__throw_bad_array_new_length()'
/usr/local/bin/ld: /usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: undefined reference to `std::__throw_bad_array_new_length()'
/usr/local/bin/ld: /usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: undefined reference to `std::__throw_bad_array_new_length()'
/usr/local/bin/ld: ../../../Extern/lib/libcryptopp.a(integer.o):/usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: more undefined references to `std::__throw_bad_array_new_length()' follow
collect2: error: ld returned 1 exit status
gmake[1]: *** [Makefile:180: ../game_r41024] Error 1
gmake[1]: Leaving directory '/usr/src/Server/game/src'
gmake: *** [Makefile:115: all] Error 2

I tried everything but can't find a solution, I'm doing this for hobby/learning but this is too much even for me willing to spend hours lol

any idea/tip?

Edited by Kushino
Link to comment
Share on other sites

7 hours ago, TheEqualizer said:

These appear to be linker errors. Make sure the linker is properly configured and that you are not using incompatible libraries.

Libs seem okay, I checked the linker and made some changes according to what I know and now I get same error plus another one.

/usr/local/bin/ld: ../../../Extern/lib/libcryptopp.a(integer.o): in function `st                                   d::__new_allocator<unsigned int>::allocate(unsigned int, void const*)':
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: undefined reference t                                   o `std::__throw_bad_array_new_length()'
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/bin/ld: /usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: un                                   defined reference to `std::__throw_bad_array_new_length()'
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/bin/ld: /usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: un                                   defined reference to `std::__throw_bad_array_new_length()'
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/bin/ld: /usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: un                                   defined reference to `std::__throw_bad_array_new_length()'
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/bin/ld: /usr/local/lib/gcc12/include/c++/bits/new_allocator.h:125: un                                   defined reference to `std::__throw_bad_array_new_length()'
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/bin/ld: ../../../Extern/lib/libcryptopp.a(integer.o):/usr/local/lib/g                                   cc12/include/c++/bits/new_allocator.h:125: more undefined references to `std::__                                   throw_bad_array_new_length()' follow
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/bin/ld: /usr/local/lib/mysql/libmysqlclient.a(client.c.o): in functio                                   n `ssl_verify_server_cert':
Unmatched '`'.
root@vanilla:/usr/src/Server # client.c:(.text+0x60a8): undefined reference to `SSL_get_peer_certificate'
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/bin/ld: /usr/local/lib/mysql/libmysqlclient.a(my_aes_openssl.cc.o): i                                   n function `my_aes_encrypt':
Unmatched '`'.
root@vanilla:/usr/src/Server # my_aes_openssl.cc:(.text+0x5a): undefined reference to `EVP_CIPHER_iv_length'
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/bin/ld: /usr/local/lib/mysql/libmysqlclient.a(my_aes_openssl.cc.o): i                                   n function `my_aes_decrypt':
Unmatched '`'.
root@vanilla:/usr/src/Server # my_aes_openssl.cc:(.text+0x214): undefined reference to `EVP_CIPHER_iv_length'
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/bin/ld: /usr/local/lib/mysql/libmysqlclient.a(my_aes_openssl.cc.o): i                                   n function `my_aes_get_size':
Unmatched '`'.
root@vanilla:/usr/src/Server # my_aes_openssl.cc:(.text+0x2ee): undefined reference to `EVP_CIPHER_block_size'
Unmatched '`'.
root@vanilla:/usr/src/Server # /usr/local/bin/ld: /usr/local/lib/mysql/libmysqlclient.a(my_aes_openssl.cc.o): i                                   n function `my_aes_needs_iv':
Unmatched '`'.
root@vanilla:/usr/src/Server # my_aes_openssl.cc:(.text+0x32a): undefined reference to `EVP_CIPHER_iv_length'
Unmatched '`'.
root@vanilla:/usr/src/Server # collect2: error: ld returned 1 exit status
collect2:: Too many arguments.
root@vanilla:/usr/src/Server # gmake[1]: *** [Makefile:180: ../game_r41024] Error 1
gmake[1]:: Too many arguments.
root@vanilla:/usr/src/Server # gmake[1]: Leaving directory '/usr/src/Server/game/src'
gmake[1]:: Too many arguments.
root@vanilla:/usr/src/Server # gmake: *** [Makefile:115: all] Error 2

 

Link to comment
Share on other sites

  • Solution

I don't know what you changed but you better revert the changes because you made the problem worse. std::__throw_bad_array_new_length() is an internal GCC/libstdc++ function. So, it's possible the GCC compiler is attempting to use this function, but the linker can't find it in the libstdc++ library you are using.

So this tells me something is wrong with your compiler installation/configuration. You might want to install a different gcc package or use static linking.

  • Good 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.