master compile libz issue
-
nloewen
- Greenhorn
- Posts: 10
- Joined: 09 Aug 2011, 23:12
master compile libz issue
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.
/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

- Posts: 876
- Joined: 18 Jul 2008, 04:41
- Location: 45N 86W
Re: master compile libz issue
Make sure your symlinks are correct and point to the actual shared library.
-
cybersphinx
- Inactive

- Posts: 1695
- Joined: 01 Sep 2006, 19:17
Re: master compile libz issue
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
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
I'm going to assume nobody has any ideas on what might be wrong here.
-
cybersphinx
- Inactive

- Posts: 1695
- Joined: 01 Sep 2006, 19:17
Re: master compile libz issue
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
yea its in there.
-
cybersphinx
- Inactive

- Posts: 1695
- Joined: 01 Sep 2006, 19:17
Re: master compile libz issue
One last try: It uses the i386 library, which won't work if you're compiling for 64 bit.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
We want information... information... information.
-
nloewen
- Greenhorn
- Posts: 10
- Joined: 09 Aug 2011, 23:12
Re: master compile libz issue
nope. I've only got 32 bits.
-
duda
- Trained

- Posts: 141
- Joined: 30 Aug 2011, 20:36
- Location: Austria
Re: master compile libz issue
i have the same problem ...
whats going wrong?
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
-
cybersphinx
- Inactive

- Posts: 1695
- Joined: 01 Sep 2006, 19:17
Re: master compile libz issue
Use newer source, this was fixed in cd6bb3d66e719a802c82bf4a69610d3706583aae.
We want information... information... information.