Компиляция PHP 5.3 на Ubuntu 14.04 — libtool: Ошибка несоответствия версий

У меня есть свойство php, которое мы пытаемся перенести из CentOS 6 в Ubuntu 14.04. Это свойство в настоящее время работает на php 5.3 и не может быть обновлено до более поздней версии в отведенное время из-за конфликтов в пакете (это установлено в камне и не в моих руках, проект на следующий год).

В Ubuntu есть пакет для php 5.3, который поддерживается 12.04. Я хотел бы перекомпилировать этот существующий пакет 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. Выполнение этого и повторный запуск настройки приводит к следующему результату:

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, но никто из нас не знает, как это исправить.

Мы на самом деле не занимаемся разработкой на С или не имеем дело со сборками из исходного кода, если мы можем избежать этого, однако в этом случае это неизбежно. Построение 12.04 также не вариант, так как нет утвержденного базового образа. Это должно быть сделано для запуска 14.04 каким-то образом.

редактировать: пробовать предложения из этой темы Ошибка несоответствия версии libtool то есть стирание всех файлов autoconf и их регенерация с помощью autoconf —force —install также не работает. ./configure выдает тот же вывод, что и выше. Похоже, что нет скрипта начальной загрузки или autogen.sh, зарегистрированного с исходным кодом из php 5.3 на Ubuntu 12.02.

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …