See https://hydra.nixos.org/build/275613910
The issue that symbols from `session.so` cannot be loaded doesn't happen
when building a PHP with ext-soap enabled.
To me it seems as if PHP just doesn't find it on runtime. My current
hypothesis is that this is because ext-soap now depends on ext-session[1].
[1] c7797fc8c0
PHP’s m4 macros assume that the libiconv shared library can be found at
the same base path as its headers, but that’s not the case on Darwin.
Its libiconv has separate outputs.
See e.g. https://github.com/cachix/devenv/actions/runs/11125063603/job/30922426947#step:7:527
There were multiple issues I observed:
* `--offline` not being set causing several tests to try accessing the
internet:
Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'http://www.w3.org/2009/01/xml.xsd' in /build/php-8.3.12/ext/soap/tests/bugs/bug76348.php:2
I'm not really sure, why this worked before or if a default was
flipped. However, the tests are passing on Linux (both x86_64-linux
and aarch64-linux for me).
* On Darwin, a few more tests are failing like this:
reason: php_network_getaddresses: getaddrinfo for localhost failed: nodename nor servname provided, or not known
This looks like some sandbox problem on Darwin, but since we have a
working test-suite on Linux I figured that's good enough and turned it
off on Darwin.
In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
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)…
This was supposed to happen in #294504, but the commit was accidentally
left out when splitting off some libpq-related changes. Originated in
#179962, by Sandro.
Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
https://hydra.nixos.org/build/258946784/nixlog/2/tail
The issue was probably triggered by the darwin iconv changes
done during this staging-next cycle.
Also use enable tests on linux, as they pass for me
on native x86_64 and aarch64.