Compile error: undefined reference to symbol 'compressBound@@ZLIB\_1.2.0'
Issue generated from Tuleap's migration script. Originally submitted by: szotsaki (szotsaki)
When compiling libring on openSUSE I get the following error message:
[ 121s] ld: ../src/.libs/libring.a(libring\_la-archiver.o): undefined reference to symbol 'compressBound@@ZLIB\_1.2.0' [ 121s] /lib64/libz.so.1: error adding symbols: DSO missing from command line [ 121s] collect2: error: ld returned 1 exit status [ 121s] Makefile:586: recipe for target 'dring' failed
The reason for this is that zlib is not linked against libring. I have the following patch, however maybe this is not the best place to insert "-lz" (but it makes it work):
--- ring-daemon.original/src/Makefile.am 2016-05-31 08:56:02.089787560 +0200 +++ ring-daemon/src/Makefile.am 2016-06-01 11:41:39.099929430 +0200 @@ -80,7 +80,8 @@ $(TLS\_LIB) \\ $(IAX\_LIB) \\ $(IM\_LIB) \\ - $(PCRE\_LIBS) + $(PCRE\_LIBS) \\ + -lz if USE\_DHT libring\_la\_LDFLAGS += $(OPENDHT\_LIBS)