From ffc8004c3d64226ec57b6a7ada4edd94c1b147c7 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 26 Aug 2024 04:28:51 +0200 Subject: [PATCH] php.extensions.mysqlnd: Fix libz underlinking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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)… --- pkgs/top-level/php-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index e85ae6dea40a..c4c985ed6dc7 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -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.