Please add PHP 7.3 on Xenial


#1

This is a follow up to issue #9717 on GitHub that has been closed, like all other GitHub issues.

PHP 7.3 is now available on Trusty, but still not on Xenial.

Could you please add PHP 7.3 support on Xenial? Thanks.


#2

As mentioned elsewhere, we have been having difficulties compiling PHP 7.3 archives on Xenial. See, for example, https://travis-ci.org/travis-ci/php-src-builder/jobs/463704619#L2855-L2908

The error indicates problems with zip, but we have not been able to figure this out.


#3

In any case, it would be great to also get the final PHP 7.3.0 release on Travis, which got released earlier today: http://php.net/archive/2018.php#id2018-12-06-1

I’m happy to help trying to figure out the zip problem too, so that we can get it on Xenial too. Locally, that just seems to compile “just fine”.

cheers,
Derick


#4

How do you compile PHP 7.3.0 on your Xenial machine? What configuration flags do you pass? Do you use php-build, or do you construct the configure command from scratch?


#5

I did the following:

sudo apt-get install libzip-dev
wget http://uk3.php.net/get/php-7.3.0.tar.bz2/from/this/mirror -O php-7.3.0.tar.bz2
tar -xvjf php-7.3.0.tar.bz2
cd php-7.3.0
./configure --with-libzip

checking libzip… yes
checking for the location of zlib… /usr
checking for pkg-config… /usr/bin/pkg-config
checking for libzip… from pkgconfig: version 1.0.1 found in /usr/lib/x86_64-linux-gnu
checking for zip_open in -lzip… yes

make
./sapi/cli/php --ri zip

zip

Zip => enabled
Zip version => 1.15.4
Libzip version => 1.0.1

I don’t quite understand why you’re fetching libzip from a random github repo:
https://travis-ci.org/travis-ci/php-src-builder/jobs/463704619#L1041

But if I use that, by compiling it myself:

sudo apt install cmake
git clone -b rel-1-5-1 https://github.com/nih-at/libzip.git
cd libzip
cmake -DCMAKE_INSTALL_PREFIX=/home/derick/.phpenv/versions/7.3snapshot .

– The C compiler identification is GNU 5.4.0

make -j11
make install

And then use that for PHP:

cd ..
cd php-7.3.0
make clean
./configure --enable-zip --with-libzip=/home/derick/.phpenv/versions/7.3snapshot

checking for pkg-config… /usr/bin/pkg-config
checking for libzip… from option: found in /home/derick/.phpenv/versions/7.3snapshot
checking for zip_open in -lzip… yes
checking for zip_file_set_encryption in -lzip… yes
checking for zip_libzip_version in -lzip… yes

make clean
make
./sapi/cli/php --ri zip

zip

Zip => enabled
Zip version => 1.15.4
Libzip headers version => 1.5.1
Libzip library version => 1.5.1


#6

Unfortunately, your build output doesn’t include the output of either ./configure, or the full make, or ./config.log which is useful in case things fail.


#7

I guess all my build are just going to fail now, great.


#8

How would they? We are discussing how to compile 7.3. Existing builds should continue to work.

Did I miss something?


#9

Let’s just ignore that comment BanzaiMan — how can I help here? Having the output from my previous comment would greatly help though.


#10

My projects have been updated to use PHP 7.3 features, I can’t test on anything lower. I will admit I did not read the post, only the title and assumed this was about adding PHP to Xenial, not how to build it myself.


#11

I’ve added the output from configure. It’s long—e.g., see https://travis-ci.org/travis-ci/php-src-builder/jobs/466553053#L2854

By the way, I do not believe https://github.com/nih-at/libzip is a “random” repo (as you phrased it). It is one that’s pointed to from https://libzip.org/.


#12

It looked “random” :slight_smile: And there is an OS distributed package for libzip already too, so I don’t think it is necessary to install it from source.

In any case, I had a look at the ./configure output, and it seems like the symbols are found just fine:

configure:90772: checking for zip archive read/writesupport
configure:90807: result: yes
configure:90842: checking pcre install prefix
configure:90857: result: no
configure:90866: checking libzip
configure:90881: result: /home/travis/.phpenv/versions/7.3snapshot
configure:90911: checking for the location of zlib
configure:90916: result: /usr
configure:91052: checking for pkg-config
configure:91083: result: /usr/bin/pkg-config
configure:91092: checking for libzip
configure:91097: result: from option: found in /home/travis/.phpenv/versions/7.3snapshot
configure:91226: checking for zip_open in -lzip
configure:91251: cc -o conftest -I/usr/include -g -O2 -fvisibility=hidden -pthread  -D_REENTRANT -Wl,-rpath,/home/travis/.phpenv/versions/7.3snapshot/lib -L/home/travis/.phpenv/versions/7.3snapshot/lib -L/usr/lib  -Wl,-rpath,/usr/lib/x86_64-linux-gnu/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/home/travis/.phpenv/versions/7.3snapshot/lib -L/home/travis/.phpenv/versions/7.3snapshot/lib conftest.c -lzip  -lz -lexslt -ltidy -largon2 -lresolv -lcrypt -lsodium -lreadline -lncurses -lpq -lrt -lpq -lldap -llber -lstdc++ -lcrypt -lpam -lgmp -lpng -lz -ljpeg -lbz2 -lz -lrt -lm -ldl -lnsl  -lpthread -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lssl -lcrypto -lfreetype -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -licui18n -licuuc -licudata -licuio -lxml2 -lxml2 -lcrypt -largon2 -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lxml2 >&5
configure:91251: $? = 0
configure:91260: result: yes
configure:91478: checking for zip_file_set_encryption in -lzip
configure:91503: cc -o conftest -I/usr/include -g -O2 -fvisibility=hidden -pthread  -D_REENTRANT -Wl,-rpath,/home/travis/.phpenv/versions/7.3snapshot/lib -L/home/travis/.phpenv/versions/7.3snapshot/lib -L/usr/lib  -Wl,-rpath,/usr/lib/x86_64-linux-gnu/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/home/travis/.phpenv/versions/7.3snapshot/lib -L/home/travis/.phpenv/versions/7.3snapshot/lib conftest.c -lzip  -lzip -lz -lexslt -ltidy -largon2 -lresolv -lcrypt -lsodium -lreadline -lncurses -lpq -lrt -lpq -lldap -llber -lstdc++ -lcrypt -lpam -lgmp -lpng -lz -ljpeg -lbz2 -lz -lrt -lm -ldl -lnsl  -lpthread -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lssl -lcrypto -lfreetype -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -licui18n -licuuc -licudata -licuio -lxml2 -lxml2 -lcrypt -largon2 -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lxml2 >&5
configure:91503: $? = 0
configure:91512: result: yes
configure:91731: checking for zip_libzip_version in -lzip
configure:91756: cc -o conftest -I/usr/include -g -O2 -fvisibility=hidden -pthread  -D_REENTRANT -Wl,-rpath,/home/travis/.phpenv/versions/7.3snapshot/lib -L/home/travis/.phpenv/versions/7.3snapshot/lib -L/usr/lib  -Wl,-rpath,/usr/lib/x86_64-linux-gnu/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/home/travis/.phpenv/versions/7.3snapshot/lib -L/home/travis/.phpenv/versions/7.3snapshot/lib conftest.c -lzip  -lzip -lzip -lz -lexslt -ltidy -largon2 -lresolv -lcrypt -lsodium -lreadline -lncurses -lpq -lrt -lpq -lldap -llber -lstdc++ -lcrypt -lpam -lgmp -lpng -lz -ljpeg -lbz2 -lz -lrt -lm -ldl -lnsl  -lpthread -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lssl -lcrypto -lfreetype -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -licui18n -licuuc -licudata -licuio -lxml2 -lxml2 -lcrypt -largon2 -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lxml2 >&5
configure:91756: $? = 0
configure:91765: result: yes

I also see that -l libzip is added to the link line for later:

cc -o conftest -I/usr/include -g -O2 -fvisibility=hidden -pthread  -D_REENTRANT -L/usr/lib  -Wl,-rpath,/usr/lib/x86_64-linux-gnu/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/home/travis/.phpenv/versions/7.3snapshot/lib -L/home/travis/.phpenv/versions/7.3snapshot/lib conftest.c -lcrypto  -lzip -lzip -lz -lexslt -ltidy -largon2 -lresolv -lcrypt -lsodium -lreadline -lncurses -lpq -lrt -lpq -lldap -llber -lstdc++ -lcrypt -lpam -lgmp -lpng -lz -ljpeg -lbz2 -lz -lrt -lm -ldl -lnsl  -lpthread -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lssl -lcrypto -lfreetype -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -licui18n -licuuc -licudata -licuio -lxml2 -lxml2 -lcrypt -largon2 -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lxml2 >&5

However, this does not conclude that the wrong libzip might be linked against. Perhaps there is one available / installed on the system already too, which conflicts. Perhaps you can check that? If it is at all possible, I’d be happy to login to a snapshot and look around a little. As I said, I can’t reproduce this problem locally with with what I think are the same versions.


#13

Removing libzip* APT packages seems to be sufficient to have a successful compilation https://travis-ci.org/travis-ci/php-src-builder/builds/467114373

Though memcached installation fails (https://travis-ci.org/travis-ci/php-src-builder/jobs/467114374#L6322) (https://github.com/php-memcached-dev/php-memcached says it’s not supported on 7.3), the 7.3.0 archive is now available for Xenial https://travis-ci.org/BanzaiMan/travis_production_test/builds/467129289#L91 and Trusty https://travis-ci.org/BanzaiMan/travis_production_test/builds/467129954#L434


#14

If you see problems, do open a separate ticket. Thanks.


#15

There is a ticket for memcached already: https://github.com/php-memcached-dev/php-memcached/issues/408 — they just need to make a release.


#16

Ah, nice. I’ll try to remember to recompile the archive when memcached is released.