0

I have phpfarm compiling php 5.4.21 without error. But when I try to add in support for mysql by adding a custom-options-5.4.21.sh:

configoptions="--with-mysql=/usr/"

I end up with a failed compile ending with:

-L/usr//lib/x86_64-linux-gnu -lcrypt -lresolv -lcrypt -lrt -lmysqlclient -lrt -lm -ldl -lnsl -lxml2 -lxml2 -lxml2 -lcrypt -lxml2 -lxml2 -lxml2 -lcrypt    -Wl,--rpath -Wl,/usr//lib/x86_64-linux-gnu
/usr/bin/ld: ext/standard/image.o: undefined reference to symbol 'uncompress'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line

It looks like phpfarm is dropping -lz from the linked libraries, but the error is coming from libz.so.1, so does that mean that it is using the zlib library?

Shi
  • 4,178
  • 1
  • 26
  • 31
sidney_h
  • 49
  • 4

2 Answers2

0

Think I figured it out. I had run phpfarm's compile.sh before I had installed libmysqlclient-dev. In the post where I found to install that the post had said to run a make clean. I just assumed phpfarm did that. Turns out, it's in that scipt, but commented out. Went into the php source directory and ran make clean and now it compiles fine.

sidney_h
  • 49
  • 4
0

i got rid of this error by including --with-zlib in the end of configuration command. here is what i have done:

./configure --with-mysql --with-libdir=/lib/x86_64-linux-gnu/ --with-zlib

black_spark
  • 319
  • 5
  • 11