Debian Wheezy requires freeorion linked against zlib

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
cazfi
Space Floater
Posts: 42
Joined: Thu May 28, 2009 10:08 pm

Debian Wheezy requires freeorion linked against zlib

#1 Post by cazfi »

In Debian Wheezy (current 'testing' release) amd64 I get following linking error:

Code: Select all

Linking CXX executable ../../freeorion
/usr/bin/ld.bfd.real: CMakeFiles/freeorion.dir/__/__/util/GZStream.cpp.o: undefined reference to symbol 'gzclose'
/usr/bin/ld.bfd.real: note: 'gzclose' is defined in DSO /usr/lib64/libz.so.1 so try adding it to the linker command line
/usr/lib64/libz.so.1: could not read symbols: Invalid operation
Attached patch fixes that.
Attachments

[The extension diff has been deactivated and can no longer be displayed.]


User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Debian Wheezy requires freeorion linked against zlib

#2 Post by Geoff the Medio »

Do you know if something changed between Debian versions that would explain why this is needed now? It seems like a strange omission, and I don't recall (m)any previous similar issues recently...

Also, does it work fine to put the ZLIB_LIBRARY mention in the earlier list of libraries for all platforms:

Code: Select all

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 4207)
+++ CMakeLists.txt	(working copy)
@@ -221,13 +221,13 @@
     ${OGG_LIBRARY}
     ${VORBIS_LIBRARIES}
     ${BULLET_LIBRARIES}
+    ${ZLIB_LIBRARY}
 )
 
 if (WIN32)
     link_directories(${BOOST_LIBRARYDIR})
     set(THIS_EXE_LINK_LIBS
         ${THIS_EXE_LINK_LIBS}
-        ${ZLIB_LIBRARY}
         ${OPENGL_gl_LIBRARY}
         ${OPENGL_glu_LIBRARY}
         jpeg.lib libpng.lib glew32.lib

cazfi
Space Floater
Posts: 42
Joined: Thu May 28, 2009 10:08 pm

Re: Debian Wheezy requires freeorion linked against zlib

#3 Post by cazfi »

Well, my wild guess would be that this relates to the fact that at least upstream libpng has some changes how it depends on zlib. So you may not get zlib linked in for free when linking against libpng like you used to. Their homepage (http://www.libpng.org/pub/png/libpng.html) mentions just header handling, though.

cazfi
Space Floater
Posts: 42
Joined: Thu May 28, 2009 10:08 pm

Re: Debian Wheezy requires freeorion linked against zlib

#4 Post by cazfi »

Geoff the Medio wrote:Also, does it work fine to put the ZLIB_LIBRARY mention in the earlier list of libraries for all platforms
Yes, it works.

Post Reply