Skip to content

Commit

Permalink
php.extensions.mysqlnd: Fix libz underlinking
Browse files Browse the repository at this point in the history
Prior to 2.13 bump, libxml2 linked zlib so the `compress` symbol was available in the namespace.
This is no longer the case so mysqlnd extension failed to load:

    $ nix-build --expr 'let pkgs = import ./. {}; in pkgs.php.withExtensions ({ all, ... }: [ all.mysqlnd ])' && result/bin/php -i | grep Warning
    /nix/store/rgmbjkdf8vixqq644b3nydcsvqm3m2mi-php-with-extensions-8.2.22
    Warning: PHP Startup: Unable to load dynamic library '/nix/store/c9yffs97qgdp97kz4frsy06r1way30nn-php-mysqlnd-8.2.22/lib/php/extensions/mysqlnd.so' (tried: /nix/store/c9yffs97qgdp97kz4frsy06r1way30nn-php-mysqlnd-8.2.22/lib/php/extensions/mysqlnd.so (/nix/store/c9yffs97qgdp97kz4frsy06r1way30nn-php-mysqlnd-8.2.22/lib/php/extensions/mysqlnd.so: undefined symbol: compress)…
  • Loading branch information
jtojnar committed Aug 26, 2024
1 parent a2f47ce commit ffc8004
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/top-level/php-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ in {
# The configure script doesn't correctly add library link
# flags, so we add them to the variable used by the Makefile
# when linking.
MYSQLND_SHARED_LIBADD = "-lssl -lcrypto";
MYSQLND_SHARED_LIBADD = "-lz -lssl -lcrypto";
# The configure script builds a config.h which is never
# included. Let's include it in the main header file
# included by all .c-files.
Expand Down

0 comments on commit ffc8004

Please sign in to comment.