• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Erro when try compile tfs 1.3 - ubuntu 16.04 - DSO missing from command line -- symbol 'deflate'

Dohko

Active Member
Joined
Mar 7, 2017
Messages
100
Reaction score
29
Hello otland friends, how are you?

Does anyone know how to solve this problem when compiling? I did not compile for a while on my vps, and now i'm having some mistakes i never had, as below:
Zp8oQzt.png


"undefined reference to the 'deflate' symbol" and
"error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status"

I'm using tfs 1.3 and ubuntu 16.04

Edit: i already executed

sed -i 's/ -lxml2$/ -lxml2 -lpthread/' Makefile

and not worked :(


thanks in advance
 
need help with this too!


CMake Error at CMakeLists.txt:20 (include):
include could not find load file:
FindCXX11
CMake Error at CMakeLists.txt:21 (include):
include could not find load file:
FindLTO
-- Found Crypto++: /usr/include
-- Found PugiXML: /usr/include
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- MySQL Include dir: /usr/include/mysql library dir: /usr/lib/x86_64-linux-gnu
-- MySQL client libraries: /usr/lib/x86_64-linux-gnu/libmysqlclient.so;-ldl
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found LuaJIT: /usr/lib/x86_64-linux-gnu/libluajit-5.1.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "2.0.4
")

[100%] Linking CXX executable tfs
/usr/bin/ld: /tmp/ccuc3LIS.ltrans5.ltrans.o: undefined reference to symbol 'deflate'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/tfs.dir/build.make:2174: recipe for target 'tfs' failed
make[2]: *** [tfs] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tfs.dir/all' failed
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
 
Last edited:
same error for me too, ubuntu 20.04
/usr/bin/ld: /tmp/tfs.8vLSJb.ltrans0.ltrans.o: undefined reference to symbol 'deflate' /usr/bin/ld: /lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/tfs.dir/build.make:1337: tfs] Error 1 make[1]: *** [CMakeFiles/Makefile2:180: CMakeFiles/tfs.dir/all] Error 2 make: *** [Makefile:84: all] Error 2
 
Hello.
Forgive me for the answer not on time, but you know - today I ran into the same compilation errors and was looking on the forum. Nobody added a solution here, so here's a solution.
In CMakeLists.txt under:
# Find packages.
Paste:
find_package(ZLIB REQUIRED)
And in the line:
target_link_libraries(tfs
for example, after
${LIBXML2_LIBRARIES}
Paste:
${ZLIB_LIBRARY}
Now you can do:
make clean && make
Or you can delete build folder and use commands:
mkdir build && cd build && cmake .. && make

I hope it will be useful to someone else.
Adrik
 
Back
Top