0

I have a php property which we are trying to migrate from CentOS 6 to Ubuntu 14.04. This property currently runs on php 5.3 and cannot be updated to a later version in the time allowed due to package conflicts (this is set in stone and out of my hands, a project for next year).

Ubuntu has a package for php 5.3 currently maintained in 12.04. What I would like to do is recompile this existing package on 14.04. I realize we will have to do this periodically to keep up with security packages or deal with rolling back some version of packages so that they work with php 5.3. That work has been deemed acceptable.

Here's the problem, while the code in theory should work fine in 14.04 (we've compiled the vanilla version with no issue) the autotools files are giving us fits.

After running configure with our options we get this:

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

From digging around similar questions it's suggested to wipe out the aclocal.m4 files and recreate them with aclocal. Doing this makes no change. Some further digging suggests regenerating the configure script with autoreconf -i. Doing this and rerunning configure nets the following result:

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

At this point we are somewhat at a loss. Some further digging suggests a versioning issue with autoreconf or autotools but none of us are aware of how to fix that.

We don't really do C development or deal with builds from source if we can avoid it however, in this case, it's unavoidable. Building on 12.04 is also not an option as there's no approved base image. This has to be made to run on 14.04 in some fashion.

edit: Trying the suggestions from this thread libtool version mismatch error i.e. wiping all the autoconf files and regenerating them with autoconf --force --install does not work either. ./configure gives the same output as above. There does not appear to be a bootstrap or autogen.sh script checked in with the source code from php 5.3 on ubuntu 12.02.

Community
  • 1
  • 1
  • What does `autoreconf -i -f -v ; automake` give you? – nneonneo Apr 25 '16 at 04:32
  • Apologies, the output does not fit in the comment block. See this pastebin http://pastebin.com/zs0HTGbP Basically autoreconf -i -f -v says that I'm giving it bad syntax. automake spits a pile of output. The configure script still fails with the above errors. – jameswilsongrant Apr 25 '16 at 04:34
  • Autoreconf is version 2.13 from running apt-get install autoreconf2.13 in another thread with a similar issue. – jameswilsongrant Apr 25 '16 at 04:41
  • It's not surprising that `automake` fails, since `automake` depends on `autoconf` and friends. You're running a _very_ old version of autoconf. Any particular reason for avoiding the latest version (2.69)? – nneonneo Apr 25 '16 at 04:44
  • Running ./buildconf in php5.3 looks for autoconf2.13, it won't run with the newer versions. PHP 5.3 in every modern distro is EOL as of 2014 however CentOS 6 still ships with it with redhat handling bugfixes and security updates. This is a very old (and luckily very profitable or I wouldn't be going through this much trouble) project. – jameswilsongrant Apr 25 '16 at 04:46
  • I believe running apt-get install autoconf2.13 on ubuntu 14.04 is also installing the appropriate version of automake, I'm assuming for this exact situation (i.e. autoconf 2.13 shipped in the previous LTS edition and you need to build something from there). Automake --version says it's 1.14.1 – jameswilsongrant Apr 25 '16 at 04:49
  • Ah well, you can try `autoreconf -f -i --verbose`. Hopefully this prints something useful. – nneonneo Apr 25 '16 at 06:03

0 Answers0