Phpfarm在添加mysql支持时从include中删除了zlib


Phpfarm dropping zlib from include when adding mysql support

我有phpfarm编译php 5.4.21没有错误。但是当我试图通过添加自定义选项-5.4.21.sh:

来添加对mysql的支持时
configoptions="--with-mysql=/usr/"

我以失败的编译结尾:

-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

看起来phpfarm正在从链接库中删除-lz,但错误来自libz.so。1,那么这是否意味着它正在使用zlib库?

我想我明白了。在安装libmysqlclient-dev之前,我已经运行了phpfarm的compile.sh。在帖子里我发现安装的地方,帖子上说要运行一个清理。我只是假设phpfarm做到了。结果是,它在那个脚本中,但是被注释掉了。进入php源目录,运行make clean,现在可以正常编译了

我通过在配置命令的末尾包含——with-zlib来消除这个错误。下面是我所做的:

。——with-mysql——with-libdir=/lib/x86_64-linux-gnu/——with-zlib