Several PHP 7.x / 8.x extension packages do not include the actual shared libraries in Ubuntu 18.04

Bug #1950477 reported by Stefan Hanreich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php-imagick (Ubuntu)
Invalid
Undecided
Unassigned
php-mcrypt (Ubuntu)
Invalid
Undecided
Unassigned
php-xdebug (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

While trying to install the newest versions of the extensions contained in the ppa I get a broken PHP build because some extensions do not include the shared library. This is on Ubuntu 18.04

I looked into the provided package files for imagick where the PHP7.0-8.1 .deb for 18.04 files did not contain any .so files. This only seems to be the case for PHP7 packages on amd64 arch. I only checked some select few to confirm my suspicions.

here are some examples from https://launchpad.net/~ondrej/+archive/ubuntu/php/+packages?field.name_filter=imagick&field.status_filter=published&field.series_filter=:

php7.4-imagick_3.5.1-2+ubuntu18.04.1+deb.sury.org+1_amd64.deb (12.9 KiB)
php7.4-imagick_3.5.1-2+ubuntu18.04.1+deb.sury.org+1_arm64.deb (83.9 KiB)
php7.4-imagick_3.5.1-2+ubuntu18.04.1+deb.sury.org+1_armhf.deb (82.4 KiB)
php7.4-imagick_3.5.1-2+ubuntu18.04.1+deb.sury.org+1_i386.deb (96.9 KiB)
php7.4-imagick_3.5.1-2+ubuntu18.04.1+deb.sury.org+1_ppc64el.deb (89.2 KiB)

You can see already that the amd64 .deb file is far smaller than the others.
This is the case for all PHP version in 18.04.

I haven't checked for any other versions, but at least some other packages for 18.04 seem to be affected. As far as I can tell mcrypt as well as xdebug have this issue as well.

Reproduce:

Installing packages via apt:
apt-get -y update --fix-missing
apt-get -y update && \
apt-get -y install sudo \
                       git \
                       wget \
                       libmcrypt-dev \
                       libicu-dev \
                       unzip \
                       screen \
                       libpq-dev \
                       curl \
                       php7.4 \
                       libapache2-mpm-itk \
                       build-essential \
                       php7.4-mcrypt \
                       php7.4-mbstring \
                       php7.4-bcmath \
                       php7.4-intl \
                       php7.4-pgsql \
                       php7.4-imagick \
                       php7.4-xdebug \
                       php7.4-curl \
                       php7.4-xml \
                       php7.4-zip \
                       ca-certificates

Packages are installed:

root@ebd9d623c7a0:/code# apt list --installed | grep php7.4

libapache2-mod-php7.4/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 all [installed]
php7.4-bcmath/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4-cli/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-common/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-curl/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4-imagick/bionic,now 3.5.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4-intl/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4-json/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-mbstring/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4-mcrypt/bionic,now 3:1.0.4-7+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4-opcache/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-pgsql/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4-readline/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-xdebug/bionic,now 3.1.1+2.9.8+2.8.1+2.5.5-2+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4-xml/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4-zip/bionic,now 7.4.25-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]

Output of the contents of my shared library folder:

root@ebd9d623c7a0:/code# ls -alh /usr/lib/php/20190902/
total 9.3M
drwxr-xr-x 2 root root 4.0K Nov 10 14:21 .
drwxr-xr-x 4 root root 4.0K Nov 10 14:21 ..
-rw-r--r-- 1 root root 35K Oct 22 12:33 bcmath.so
-rw-r--r-- 1 root root 31K Oct 22 12:33 calendar.so
-rw-r--r-- 1 root root 15K Oct 22 12:33 ctype.so
-rw-r--r-- 1 root root 95K Oct 22 12:33 curl.so
-rw-r--r-- 1 root root 155K Oct 22 12:33 dom.so
-rw-r--r-- 1 root root 87K Oct 22 12:33 exif.so
-rw-r--r-- 1 root root 151K Oct 22 12:33 ffi.so
-rw-r--r-- 1 root root 5.5M Oct 22 12:33 fileinfo.so
-rw-r--r-- 1 root root 59K Oct 22 12:33 ftp.so
-rw-r--r-- 1 root root 15K Oct 22 12:33 gettext.so
-rw-r--r-- 1 root root 43K Oct 22 12:33 iconv.so
-rw-r--r-- 1 root root 467K Oct 22 12:33 intl.so
-rw-r--r-- 1 root root 43K Oct 22 12:33 json.so
-rw-r--r-- 1 root root 1.1M Oct 22 12:33 mbstring.so
-rw-r--r-- 1 root root 531K Oct 22 12:33 opcache.so
-rw-r--r-- 1 root root 43K Oct 22 12:33 pdo_pgsql.so
-rw-r--r-- 1 root root 107K Oct 22 12:33 pdo.so
-rw-r--r-- 1 root root 135K Oct 22 12:33 pgsql.so
-rw-r--r-- 1 root root 263K Oct 22 12:33 phar.so
-rw-r--r-- 1 root root 35K Oct 22 12:33 posix.so
-rw-r--r-- 1 root root 31K Oct 22 12:33 readline.so
-rw-r--r-- 1 root root 15K Oct 22 12:33 shmop.so
-rw-r--r-- 1 root root 51K Oct 22 12:33 simplexml.so
-rw-r--r-- 1 root root 91K Oct 22 12:33 sockets.so
-rw-r--r-- 1 root root 19K Oct 22 12:33 sysvmsg.so
-rw-r--r-- 1 root root 11K Oct 22 12:33 sysvsem.so
-rw-r--r-- 1 root root 15K Oct 22 12:33 sysvshm.so
-rw-r--r-- 1 root root 19K Oct 22 12:33 tokenizer.so
-rw-r--r-- 1 root root 31K Oct 22 12:33 xmlreader.so
-rw-r--r-- 1 root root 47K Oct 22 12:33 xml.so
-rw-r--r-- 1 root root 47K Oct 22 12:33 xmlwriter.so
-rw-r--r-- 1 root root 31K Oct 22 12:33 xsl.so
-rw-r--r-- 1 root root 63K Oct 22 12:33 zip.so

Running PHP:

root@ebd9d623c7a0:/code# php -v
PHP Warning: Failed loading Zend extension 'xdebug.so' (tried: /usr/lib/php/20190902/xdebug.so (/usr/lib/php/20190902/xdebug.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/xdebug.so.so (/usr/lib/php/20190902/xdebug.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php/20190902/imagick.so (/usr/lib/php/20190902/imagick.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/imagick.so.so (/usr/lib/php/20190902/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/lib/php/20190902/mcrypt.so (/usr/lib/php/20190902/mcrypt.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/mcrypt.so.so (/usr/lib/php/20190902/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.4.25 (cli) (built: Oct 22 2021 12:33:59) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.25, Copyright (c), by Zend Technologies

I ran all of this in an Ubuntu 18.04 docker container

Revision history for this message
Stefan Hanreich (lwli3t) wrote (last edit ):

God damn it sorry, I wanted to submit this to the respective PPA ondrej/php - SORRY! It seems to have redirected me the wrong way after registering.

edit: Seems like this is still the right place? Can you confirm this for me? Any idea where else the ondrej/php bug tracker might be?

affects: php8.1 (Ubuntu) → php-imagick (Ubuntu)
summary: - Several PHP7 extension packages do not include the actual shared
- libraries in Ubuntu 18.04
+ Several PHP 7.x / 8.x extension packages do not include the actual
+ shared libraries in Ubuntu 18.04
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Stefan, this is text from the PPA about reporting issues:

"""
You can get more information about the packages at https://deb.sury.org

IMPORTANT: The <foo>-backports is now required on older Ubuntu releases.

BUGS&FEATURES: This PPA now has a issue tracker:
https://deb.sury.org/#bug-reporting

CAVEATS:
1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
2. If you are using apache2, you are advised to add ppa:ondrej/apache2
3. If you are using nginx, you are advised to add ppa:ondrej/nginx-mainline
   or ppa:ondrej/nginx
"""

Hope this helps!

Changed in php-imagick (Ubuntu):
status: New → Invalid
Changed in php-mcrypt (Ubuntu):
status: New → Invalid
Changed in php-xdebug (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.