[pkg-uWSGI-devel] Bug#962186: Bug#962186: uwsgi-plugin-php: CI fails with SIG_SEGV in bullseye
Alexandre Rossi
niol at zincube.net
Fri Jun 5 11:24:12 BST 2020
> > The problem seems to be that the PHP plugin is compiled against PHP7.4
> > and is linked with libphp.so which points to 7.3 in bullseye and 7.4 in sid.
> >
> > $ ldd /usr/lib/uwsgi/plugins/php_plugin.so | grep php
> > libphp7.so => /usr/lib/libphp7.so (0x00007f4b8ca48000)
> > $ ls -l /usr/lib/libphp7.so
> > lrwxrwxrwx 1 root root 25 mai 11 19:41 /usr/lib/libphp7.so -> /etc/alternatives/libphp7
> > $ ls -l /etc/alternatives/libphp7
> > lrwxrwxrwx 1 root root 21 mai 11 19:41 /etc/alternatives/libphp7 -> /usr/lib/libphp7.4.so
> >
> > The php plugin should explicitly be linked against /usr/lib/libphp7.4.so
>
> It seems uwsgi gets its information for which library to link against
> from /usr/bin/php-config (see /usr/src/uwsgi/plugins/php/uwsgiplugin.py).
>
> And it seems php-dev and php4.7-dev ships php-config* tools that (I guess)
> both provides that name using the dpkg alternatives systems.
>
> Try check if those varying build tools offer different build hints,
> and if they do then try comeup with a patch for plugins/php/uwsgiplugin.py
> to use php-config only by default, overridable by an environment variable.
I do not have much experience with shared object libraries, but as
libphp7.3.so and libphp7.4.so declare the same soname libphp7.so, I could
not find a way for uwsgi-plugin-php to explicitely reference libphp7.4.so :
passing -lphp7.4 to the linker still goes back to linking to libphp7.so .
The only solution I found is to explicitely depend[1] on libphp7.4-embed in
the dependencies. I tested in a bullseye chroot and it works. Actually,
libphp7.3.so and libphp7.4.so cannot be installed at the same time:
# apt install libphp7.4-embed
[...]
# apt install libphp7.3-embed
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php-common : Breaks: php7.3-common but 7.3.15-3 is to be installed
While debugging this, I found it usefull to have the uwsgi build system do
verbose[2] builds.
[1] https://salsa.debian.org/uwsgi-team/uwsgi-plugin-php/-/commit/d031916dfe72cca4831c4eb2efcb2db3058e8533
[2] https://salsa.debian.org/uwsgi-team/uwsgi/-/commit/7ba0a0b19818e1e886924fb9227be32e4e0af6f9
Thanks,
Alex
More information about the pkg-uWSGI-devel
mailing list