Please add PHP 7.3 on Xenial

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 Likes

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.

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

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?

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:

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

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.

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

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

Did I miss something?

Letā€™s just ignore that comment BanzaiMan ā€” how can I help here? Having the output from my previous comment would greatly help though.

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.

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/.

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.

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

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

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

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

memcached should be released now: https://pecl.php.net/package/memcached/3.1.2

Re-packaging 7.3.0: https://travis-ci.org/travis-ci/php-src-builder/builds/471855044

1 Like

@BanzaiMan is this repackage of 7.3.0 with memcached released?

Iā€™m getting the following errors on Trusty and Xenial
Warning: PHP Startup: Unable to load dynamic library ā€˜memcached.soā€™ (tried: /home/travis/.phpenv/versions/7.3.0/lib/php/extensions/no-debug-zts-20180731/memcached.so (/home/travis/.phpenv/versions/7.3.0/lib/php/extensions/no-debug-zts-20180731/memcached.so: cannot open shared object file: No such file or directory), /home/travis/.phpenv/versions/7.3.0/lib/php/extensions/no-debug-zts-20180731/memcached.so.so (/home/travis/.phpenv/versions/7.3.0/lib/php/extensions/no-debug-zts-20180731/memcached.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

I noticed that we had memcached hard-coded to 3.0.4. Fixed this now, so all 7.x builds going forward will use memcached 3.1.2.

2 Likes