Fork me on GitHub
The Burning Crusade Compilation error: linking
Post: #1
Hi guys,

just (try to)got back into WoW emulation and modelchanging, butI can't get cmangos-tbc compiled.

When trying to compile this piece of software, I get this error:

Code:
[ 46%] Building CXX object src/mangosd/CMakeFiles/mangosd.dir/WorldRunnable.cpp.o
[ 46%] Building CXX object src/mangosd/CMakeFiles/mangosd.dir/soapC.cpp.o
[ 46%] Building CXX object src/mangosd/CMakeFiles/mangosd.dir/soapServer.cpp.o
[ 46%] Linking CXX executable mangosd
../shared/libshared.a(HMACSHA1.cpp.o): In function `HMACSHA1::HMACSHA1(unsigned int, unsigned char*)':
HMACSHA1.cpp:(.text+0x57): undefined reference to `HMAC_CTX_init'
../shared/libshared.a(HMACSHA1.cpp.o): In function `HMACSHA1::~HMACSHA1()':
HMACSHA1.cpp:(.text+0x97): undefined reference to `HMAC_CTX_cleanup'
collect2: error: ld returned 1 exit status
src/mangosd/CMakeFiles/mangosd.dir/build.make:289: die Regel für Ziel „src/mangosd/mangosd“ scheiterte
make[2]: *** [src/mangosd/mangosd] Fehler 1
CMakeFiles/Makefile2:755: die Regel für Ziel „src/mangosd/CMakeFiles/mangosd.dir/all“ scheiterte
make[1]: *** [src/mangosd/CMakeFiles/mangosd.dir/all] Fehler 2
Makefile:127: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2

I'm using Debian 8 64 Bit / gcc 6.2.1.
Cmake Output:Click
Tried with and without Precompiled Headers option.
Latest commit from master branch.
Compiled as root that there are no permission problems.

Maybe someone can help me.
Thanks in advance Shy
Reply
Post: #2
The unknown symbols HMAC_CTX_init and HMAC_CTX_cleanup are part of OpenSSL's crypto library and that's where the linker should find them. CMake seems to find OpenSSL on your system, as illustrated by the logs:
Quote:Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0c")

But the problem seems to be the version. According to OpenSSL documentation HMAC_CTX_init() was replaced with HMAC_CTX_reset() in OpenSSL versions 1.1.0. So it looks the developers have to update some code to work with OpenSSL 1.1 and later. What's surprising though is that you only seem to get an error at link time rather than getting one when compiling the code that's still using HMAC_CTX_init/cleanup. I would expect that the OpenSSL headers - OpenSSL/hmac.h in this case - no longer declare that function in such a case. I'm guessing you actually got compiler warnings about it though, rather than hard errors.

Apart from patching the code, the best for the time being is to go back to a somewhat older OpenSSL version. I don't know Debian, so no idea if you can easily go back to OpenSSL 1.0.x on your system...
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [TBC] VMAPS ERROR HNDRXX 3 1,197 03-26-2017, 08:27 AM
Last Post: HNDRXX
  [CLASSIC] make error gorgau 1 708 03-10-2017, 06:39 AM
Last Post: JoseQ
Exclamation [CLASSIC] Playerbot database error? Do I have the wrong classic-db? Wingblade 0 621 02-21-2017, 05:01 PM
Last Post: Wingblade
  [TBC] Compilation Errors Tlvdatsi77 1 943 01-20-2017, 04:38 PM
Last Post: Tlvdatsi77
  [WOTLK] compilation errors free 4 1,474 12-05-2016, 02:00 PM
Last Post: free
  [CLASSIC] compilation errors: cannot find boost mikool 1 1,042 12-04-2016, 10:16 PM
Last Post: mikool
  [CLASSIC] InstallFullDB.sh error 1054 Wingblade 8 2,615 11-10-2016, 05:55 PM
Last Post: Wingblade
  latest cmangos classic with playerbot compile error darkdandy 2 1,265 10-27-2016, 02:34 PM
Last Post: darkdandy
  [CATA] Error extracting resources freeman725 2 1,235 10-15-2016, 08:52 AM
Last Post: alysher
  compile error with game.lib suomaza 5 2,706 10-01-2016, 01:35 AM
Last Post: suomaza

Forum Jump:


Users browsing this thread: 1 Guest(s)

Continued MaNGOS | Return to Top | | Lite (Archive) Mode | RSS Syndication