undefined reference to symbol 'uncompress', DSO missing from command line

I'm trying to manually compile my php iconv extension so it uses libiconv instead of glibc. I downloaded libiconv, and configured with ./configure --prefix=/usr/local , make then sudo make install.

I found this instructions about manual compiling:

I have a php version 5.6.10 and it was installed using phpbrew so I started at Step #3.

At step #5 (make), I encountered the following error:

/usr/bin/ld: ext/standard/.libs/image.o: undefined reference to symbol 'uncompress'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

Would you know how to fix this? Thanks a lot.

3

1 Answer

I solved this by editing the Makefile, and adding -lz in EXTRA_LIBS.

  1. Look for Makefile in the php directory.
  2. Search for EXTRA_LIBS.
  3. Add the -lz flag.

That links to the library that was missing. -lz links to zlib.

This solution is based on kevinf's answer to Strange linking error: DSO missing from command line on Stack Overflow.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like