在Ubuntu 14.04上编译PHP 5.3 - libtool:版本不匹配错误

时间:2016-04-25 04:22:01

标签: php ubuntu-14.04 autotools

我有一个php属性,我们正试图从CentOS 6迁移到Ubuntu 14.04。此属性目前在php 5.3上运行,并且由于程序包冲突而无法在允许的时间内更新到更高版本(这是完整的,并且不在我手中,明年的项目)。

Ubuntu有一个目前在12.04维护的php 5.3软件包。我想做的是在14.04重新编译这个现有的包。我意识到我们必须定期执行此操作以跟上安全包或处理回滚某些版本的软件包以便它们与php 5.3一起使用。这项工作被认为是可以接受的。

这就是问题所在,而理论上的代码应该在14.04中运行良好(我们已经编译了vanilla版本没有问题)autotools文件让我们适合。

使用我们的选项运行configure后,我们得到:

root@ubuntu:~/php5-5.3.10# make
/bin/sh /home/user/php5-5.3.10/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/home/user/php5-5.3.10/ext/date/ -DPHP_ATOM_INC -I/home/user/php5-5.3.10/include -I/home/user/php5-5.3.10/main -I/home/user/php5-5.3.10 -I/home/user/php5-5.3.10/ext/date/lib -I/home/user/php5-5.3.10/ext/ereg/regex -I/usr/include/libxml2 -I/home/user/php5-5.3.10/ext/sqlite3/libsqlite -I/home/user/php5-5.3.10/TSRM -I/home/user/php5-5.3.10/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /home/user/php5-5.3.10/ext/date/php_date.c -o ext/date/php_date.lo
/home/user/php5-5.3.10/libtool: 481: /home/user/php5-5.3.10/libtool: CDPATH: not found
libtool: Version mismatch error.  This is libtool 2.4 Debian-2.4-2ubuntu1, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4 Debian-2.4-2ubuntu1
libtool: and run autoconf again.
make: *** [ext/date/php_date.lo] Error 63

从挖掘类似问题开始,建议消灭aclocal.m4文件并用aclocal重新创建它们。这样做不会改变。进一步挖掘建议使用autoreconf -i重新生成configure脚本。执行此操作并重新运行configure会产生以下结果:

root@ubuntu:~/php5-5.3.10# ./configure --prefix=/opt/php53
cat: confdefs.h: No such file or directory
./configure: 392: ./configure: ac_fn_c_try_run: not found
./configure: 408: ./configure: 5: Bad file descriptor
./configure: 408: ./configure: :: checking for pthreads_cflags: not found
./configure: 409: ./configure: 6: Bad file descriptor
./configure: 409: ./configure: checking for pthreads_cflags... : not found
cat: confdefs.h: No such file or directory
./configure: 448: ./configure: ac_fn_c_try_run: not found
cat: confdefs.h: No such file or directory
./configure: 448: ./configure: ac_fn_c_try_run: not found
cat: confdefs.h: No such file or directory
./configure: 448: ./configure: ac_fn_c_try_run: not found
cat: confdefs.h: No such file or directory
./configure: 448: ./configure: ac_fn_c_try_run: not found
cat: confdefs.h: No such file or directory
./configure: 448: ./configure: ac_fn_c_try_run: not found
cat: confdefs.h: No such file or directory
./configure: 448: ./configure: ac_fn_c_try_run: not found
cat: confdefs.h: No such file or directory
./configure: 448: ./configure: ac_fn_c_try_run: not found
cat: confdefs.h: No such file or directory
./configure: 448: ./configure: ac_fn_c_try_run: not found
./configure: 471: ./configure: 5: Bad file descriptor
./configure: 471: ./configure: :: result: : not found
./configure: 472: ./configure: 6: Bad file descriptor
./configure: 472: ./configure: : Permission denied
./configure: 474: ./configure: 5: Bad file descriptor
./configure: 474: ./configure: :: checking for pthreads_lib: not found
./configure: 475: ./configure: 6: Bad file descriptor
./configure: 475: ./configure: checking for pthreads_lib... : not found
cat: confdefs.h: No such file or directory
./configure: 514: ./configure: ac_fn_c_try_run: not found
cat: confdefs.h: No such file or directory
./configure: 514: ./configure: ac_fn_c_try_run: not found
cat: confdefs.h: No such file or directory
./configure: 514: ./configure: ac_fn_c_try_run: not found
./configure: 536: ./configure: 5: Bad file descriptor
./configure: 536: ./configure: :: result: : not found
./configure: 537: ./configure: 6: Bad file descriptor
./configure: 537: ./configure: : Permission denied
./configure: 612: ./configure: 5: Bad file descriptor
./configure: 612: ./configure: :: result: : not found
./configure: 613: ./configure: 6: Bad file descriptor
./configure: 613: ./configure: : Permission denied
./configure: 614: ./configure: 5: Bad file descriptor
./configure: 614: ./configure: :: result: Configuring SAPI modules: not found
./configure: 615: ./configure: 6: Bad file descriptor
./configure: 615: ./configure: Configuring SAPI modules: not found
./configure: 642: ./configure: 5: Bad file descriptor
./configure: 642: ./configure: :: checking for AOLserver support: not found
./configure: 643: ./configure: 6: Bad file descriptor
./configure: 643: ./configure: checking for AOLserver support... : not found
./configure: 879: ./configure: 5: Bad file descriptor
./configure: 879: ./configure: :: result: no: not found
./configure: 880: ./configure: 6: Bad file descriptor
./configure: 880: ./configure: no: not found
./configure: 907: ./configure: 5: Bad file descriptor
./configure: 907: ./configure: :: checking for Apache 1.x module support via DSO through APXS: not found
./configure: 908: ./configure: 6: Bad file descriptor
./configure: 908: ./configure: checking for Apache 1.x module support via DSO through APXS... : not found
./configure: 1219: ./configure: 5: Bad file descriptor
./configure: 1219: ./configure: :: result: no: not found
./configure: 1220: ./configure: 6: Bad file descriptor
./configure: 1220: ./configure: no: not found
./configure: 1245: ./configure: 5: Bad file descriptor
./configure: 1245: ./configure: :: checking for Apache 1.x module support: not found
./configure: 1246: ./configure: 6: Bad file descriptor
./configure: 1246: ./configure: checking for Apache 1.x module support... : not found
./configure: 2105: ./configure: 5: Bad file descriptor
./configure: 2105: ./configure: :: result: no: not found
./configure: 2106: ./configure: 6: Bad file descriptor
./configure: 2106: ./configure: no: not found
./configure: 2117: ./configure: 5: Bad file descriptor
./configure: 2117: ./configure: :: checking whether to enable Apache charset compatibility option: not found
./configure: 2118: ./configure: 6: Bad file descriptor
./configure: 2118: ./configure: checking whether to enable Apache charset compatibility option... : not found
./configure: 2131: ./configure: 5: Bad file descriptor
./configure: 2131: ./configure: :: result: no: not found
./configure: 2132: ./configure: 6: Bad file descriptor
./configure: 2132: ./configure: no: not found
./configure: 2281: ./configure: 5: Bad file descriptor
./configure: 2281: ./configure: :: checking for Apache 2.0 filter-module support via DSO through APXS: not found
./configure: 2282: ./configure: 6: Bad file descriptor
./configure: 2282: ./configure: checking for Apache 2.0 filter-module support via DSO through APXS... : not found
./configure: 3153: ./configure: 5: Bad file descriptor
./configure: 3153: ./configure: :: result: no: not found
./configure: 3154: ./configure: 6: Bad file descriptor
./configure: 3154: ./configure: no: not found
./configure: 3181: ./configure: 5: Bad file descriptor
./configure: 3181: ./configure: :: checking for Apache 2.0 handler-module support via DSO through APXS: not found
./configure: 3182: ./configure: 6: Bad file descriptor
./configure: 3182: ./configure: checking for Apache 2.0 handler-module support via DSO through APXS... : not found
./configure: 4053: ./configure: 5: Bad file descriptor
./configure: 4053: ./configure: :: result: no: not found
./configure: 4054: ./configure: 6: Bad file descriptor
./configure: 4054: ./configure: no: not found
*** snipped a lot out of the middle, you get the idea ***
cat: confdefs.h: No such file or directory
./configure: 12860: ./configure: ac_fn_c_try_compile: not found
./configure: 12944: ./configure: 5: Bad file descriptor
./configure: 12944: ./configure: :: result: no: not found
./configure: 12945: ./configure: 6: Bad file descriptor
./configure: 12945: ./configure: no: not found
./configure: 1: ./configure: ac_cv_header_dirent_dirent.h: not found
./configure: 12955: ./configure: 5: Bad file descriptor
./configure: 12955: ./configure: :: checking for dirent.h that defines DIR: not found
./configure: 12956: ./configure: 6: Bad file descriptor
./configure: 12956: ./configure: checking for dirent.h that defines DIR... : not found
./configure: 1: eval: Bad substitution

此时我们有些不知所措。一些进一步的挖掘暗示了autoreconf或autotools的版本控制问题,但我们都没有意识到如何解决这个问题。

如果我们可以避免使用C开发或者从源代码处理构建,那么在这种情况下,它是不可避免的。建立在12.04也不是一个选项,因为没有批准的基本图像。这必须以某种方式在14.04上运行。

编辑:尝试来自此线程libtool version mismatch error的建议,即擦除所有autoconf文件并使用autoconf重新生成它们--force --install也不起作用。 ./configure提供与上面相同的输出。似乎没有使用ubuntu 12.02上的php 5.3中的源代码签入bootstrap或autogen.sh脚本。

0 个答案:

没有答案