master compile libz issue

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
nloewen
Greenhorn
Posts: 10
Joined: 09 Aug 2011, 23:12

master compile libz issue

Post by nloewen »

I am trying to compile the current master version of warzone from git, however attempting to compile gives this error

/usr/bin/ld: ../lib/netplay/libnetplay.a(netsocket.o): undefined reference to symbol 'deflate'
/usr/bin/ld: note: 'deflate' is defined in DSO /usr/lib/i386-linux-gnu/libz.so so try adding it to the linker command line
/usr/lib/i386-linux-gnu/libz.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

the libz development package is installed. I am running ubuntu 11.10.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: master compile libz issue

Post by stiv »

Make sure your symlinks are correct and point to the actual shared library.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: master compile libz issue

Post by cybersphinx »

Do you do funny things loke overriding the default LDFLAGS? It contains -lz here.
We want information... information... information.
nloewen
Greenhorn
Posts: 10
Joined: 09 Aug 2011, 23:12

Re: master compile libz issue

Post by nloewen »

my symlinks seem to be correct. The only messing around I've done with the LDFLAGS was to try to get it to compile. I've ran ./configure again to reset the changes I made. it does contain -lz.
nloewen
Greenhorn
Posts: 10
Joined: 09 Aug 2011, 23:12

Re: master compile libz issue

Post by nloewen »

I'm going to assume nobody has any ideas on what might be wrong here.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: master compile libz issue

Post by cybersphinx »

Not me. If -lz is in the LDFLAGS in src/Makefile, it should also appear in the linking command, and thus work.
We want information... information... information.
nloewen
Greenhorn
Posts: 10
Joined: 09 Aug 2011, 23:12

Re: master compile libz issue

Post by nloewen »

yea its in there.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: master compile libz issue

Post by cybersphinx »

nloewen wrote:/usr/bin/ld: note: 'deflate' is defined in DSO /usr/lib/i386-linux-gnu/libz.so so try adding it to the linker command line
/usr/lib/i386-linux-gnu/libz.so: could not read symbols: Invalid operation
One last try: It uses the i386 library, which won't work if you're compiling for 64 bit.
We want information... information... information.
nloewen
Greenhorn
Posts: 10
Joined: 09 Aug 2011, 23:12

Re: master compile libz issue

Post by nloewen »

nope. I've only got 32 bits.
User avatar
duda
Trained
Trained
Posts: 141
Joined: 30 Aug 2011, 20:36
Location: Austria

Re: master compile libz issue

Post by duda »

i have the same problem ...

Code: Select all

-lXrandr    
/usr/bin/ld: ../lib/netplay/libnetplay.a(netsocket.o): undefined reference to symbol 'deflate'
/usr/bin/ld: note: 'deflate' is defined in DSO /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libz.so so try adding it to the linker command line
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libz.so: could not read symbols: Invalid operation
collect2: ld gab 1 als Ende-Status zurück
make[3]: *** [warzone2100] Fehler 1
make[3]: Verlasse Verzeichnis '/home/david/warzone2100-master_20110801/src'
make[2]: *** [all] Fehler 2
make[2]: Verlasse Verzeichnis '/home/david/warzone2100-master_20110801/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlasse Verzeichnis '/home/david/warzone2100-master_20110801'
make: *** [all] Fehler 2
whats going wrong?
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: master compile libz issue

Post by cybersphinx »

Use newer source, this was fixed in cd6bb3d66e719a802c82bf4a69610d3706583aae.
We want information... information... information.