Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 770487 - dev-lang/php-7.4.14 - php-fpm cannot load extensions mysqli, pdo and pdo_mysql
Summary: dev-lang/php-7.4.14 - php-fpm cannot load extensions mysqli, pdo and pdo_mysql
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-14 11:46 UTC by Stephen Bosch
Modified: 2021-02-14 12:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Bosch 2021-02-14 11:46:03 UTC
When I build dev-lang/php-7.4.14 with USE="fpm mysql mysqli pdo" and then start php-fpm, I get error messages saying the dynamic libraries cannot be found.

Reproducible: Always

Steps to Reproduce:
1. Build dev-lang/php-7.4.14 with USE="fpm mysql mysqli pdo"
2. Start php-fpm
Actual Results:  
# rc-service php-fpm restart
 * Testing PHP FastCGI Process Manager configuration ...                                                      [ ok ]
 * Stopping php-fpm ...                                                                                       [ ok ]
 * Starting php-fpm ...
[14-Feb-2021 11:32:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/mysqli (/usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/mysqli: cannot open shared object file: No such file or directory), /usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/mysqli.so (/usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/mysqli.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[14-Feb-2021 11:32:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/pdo_mysql (/usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/pdo_mysql.so (/usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/pdo_mysql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[14-Feb-2021 11:32:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo' (tried: /usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/pdo (/usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/pdo: cannot open shared object file: No such file or directory), /usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/pdo.so (/usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902/pdo.so: cannot open shared object file: No such file or directory)) in Unknown on line 0   

The directory /usr/lib64/php7.4/lib/ contains the directory 'build' with these contents:

# LANG=C ls -liah
total 915K
569330 drwxr-xr-x 2 root root   15 Feb 14 11:23 .
569329 drwxr-xr-x 3 root root    3 Feb 11 14:42 ..
438284 -rw-r--r-- 1 root root 6.9K Feb 14 11:22 Makefile.global
438281 -rw-r--r-- 1 root root 2.1K Feb 14 11:22 ax_check_compile_flag.m4
437971 -rw-r--r-- 1 root root 8.3K Feb 14 11:22 ax_gcc_func_attribute.m4
438061 -rwxr-xr-x 1 root root  48K Feb 14 11:22 config.guess
438187 -rwxr-xr-x 1 root root  32K Feb 14 11:22 config.sub
437970 -rw-r--r-- 1 root root 225K Feb 14 11:22 libtool.m4
438190 -rw-r--r-- 1 root root 196K Feb 14 11:22 ltmain.sh
437973 -rw-r--r-- 1 root root  71K Feb 14 11:22 php.m4
437972 -rw-r--r-- 1 root root  18K Feb 14 11:22 php_cxx_compile_stdcxx.m4
437969 -rw-r--r-- 1 root root 5.0K Feb 14 11:22 phpize.m4
438283 -rw-r--r-- 1 root root  11K Feb 14 11:22 pkg.m4
438285 -rw-r--r-- 1 root root 124K Feb 14 11:22 run-tests.php
437967 -rwxr-xr-x 1 root root  65K Feb 14 11:22 shtool

which suggests that some build step did not complete.


Expected Results:  
I would expect the shared libraries to be found at the paths above and for php-fpm to start without errors.

# emerge --info dev-lang/php
Portage 3.0.13 (python 3.8.7-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.32-r6, 4.19.146-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.146-gentoo-x86_64-Intel-R-_Core-TM-_i7-7600U_CPU_@_2.80GHz-with-glibc2.2.5
KiB Mem:     1953124 total,   1780896 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 12 Feb 2021 12:07:58 +0000
Head commit of repository gentoo: 0fde117f76d9e83a2f5c25bf7b3e20393d5d1c5f

sh bash 5.0_p18
ld GNU ld (Gentoo 2.35.1 p2) 2.35.1
app-shells/bash:          5.0_p18::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.8.7-r1::gentoo, 3.9.1-r1::gentoo
dev-util/cmake:           3.18.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.2-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            9.3.0-r1::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 berkdb bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de-DE en-CA en-GB fr-CA fr nb" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-lang/php-7.4.14::gentoo was built with the following:
USE="acl berkdb bzip2 cgi cli ctype curl fileinfo filter flatfile fpm gd gdbm iconv ipv6 json mysql mysqli nls opcache pdo phar posix readline session simplexml ssl tokenizer unicode xml zlib -apache2 -argon2 -bcmath -calendar -cdb -cjk (-coverage) -debug -embed -enchant -exif -ffi (-firebird) -ftp -gmp -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit (-libressl) -lmdb -mhash -mssql -oci8-instant-client -odbc -pcntl -phpdbg -postgres -qdbm (-selinux) -session-mm -sharedmem -snmp -soap -sockets -sodium -spell -sqlite -systemd -sysvipc -test -threads -tidy -tokyocabinet -truetype -webp -xmlreader -xmlrpc -xmlwriter -xpm -xslt -zip" ABI_X86="(64)"
FEATURES="usersync unmerge-logs config-protect-if-modified fixlafiles binpkg-dostrip binpkg-docompress ebuild-locks unmerge-orphans ipc-sandbox qa-unresolved-soname-deps pid-sandbox sfperms sandbox network-sandbox userpriv xattr protect-owned strict multilib-strict parallel-fetch userfetch unknown-features-warn news assume-digests preserve-libs binpkg-logs merge-sync distlocks usersandbox"
Comment 1 Brian Evans (RETIRED) gentoo-dev 2021-02-14 12:54:31 UTC
Please do not add "extension=" configuration for any extension which are built with dev-lang/php.  They are all statically linked and always available.  The configuration file is for dynamically loaded extensions.