| 23 Jul 2023 |
Pol | To reproduce the issue on a Darwin machine: nix build github:loophp/nix-shell/update_flake_lock_action#php56 | 08:04:57 |
Pol | Problem solved. | 09:04:02 |
Pol | The problem is the mysqlnd which requires openssl. | 09:04:13 |
Pol | OpenSSL version 1! Not 3. | 09:04:23 |
Pol | Going to push a patch to fossar/nix-phps. | 09:04:33 |
Pol | False alarm. Compiling openssl extension with PHP 5.6 on Darwin still requires Openssl 3. Weird. | 09:41:36 |
Jan Tojnar | In reply to @drupol:matrix.org Hey, I've got a weird behavior in a Nix project of mine. The project aim to maintain old versions of the PHP language. For some reason, the builds running on Darwin are picking the newest version of OpenSSL (3), not the old one (1) despite the fact that we are doing it (https://github.com/fossar/nix-phps/blob/9d00fd85709bcd48c80530cc71fbace99c375038/pkgs/package-overrides.nix#L510). See the Github actions run, almost all the Darwin builds are failing for the same reason: https://github.com/loophp/nix-shell/actions/runs/5635189875
Do you have a clue what it could be? Maybe try using builtins.trace for debugging | 10:25:56 |
Pol | I opened an issue in nix-phps, I can reproduce the issue there | 10:35:26 |
Pol | If anyone with a Darwin machine could have a look at https://github.com/fossar/nix-phps/pull/282 it would be nice. | 14:45:38 |
Pol | In reply to @jtojnar:matrix.org Maybe try using builtins.trace for debugging Without Darwin machine, it's a bit complicated :( | 14:50:34 |
Pol | I applied this patch:
diff --git i/pkgs/package-overrides.nix w/pkgs/package-overrides.nix
index 6cd988d..1691c5e 100644
--- i/pkgs/package-overrides.nix
+++ w/pkgs/package-overrides.nix
@@ -507,17 +507,21 @@ in
in
ourPatches ++ upstreamPatches;
- buildInputs =
- let
- replaceOpenssl = pkg:
- if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
- pkgs.openssl_1_1.overrideAttrs (old: {
- meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
- })
- else
- pkg;
- in
- builtins.map replaceOpenssl attrs.buildInputs;
+ buildInputs =let
+ a =
+ let
+ replaceOpenssl = pkg:
+ if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
+ pkgs.openssl_1_1.overrideAttrs (old: {
+ meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
+ })
+ else
+ pkg;
+ in
+ builtins.map replaceOpenssl attrs.buildInputs;
+ b = (lib.elemAt a 0).version;
+ in
+ builtins.trace b a;
});
openswoole =
And then I run: nix build .#php74.extensions.openssl -L
I can see: 1.1.1u.
It would be nice to do the same on a Darwin machine.
| 14:59:56 |
Pol | * I applied this patch:
diff --git i/pkgs/package-overrides.nix w/pkgs/package-overrides.nix
index 6cd988d..1691c5e 100644
--- i/pkgs/package-overrides.nix
+++ w/pkgs/package-overrides.nix
@@ -507,17 +507,21 @@ in
in
ourPatches ++ upstreamPatches;
- buildInputs =
- let
- replaceOpenssl = pkg:
- if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
- pkgs.openssl_1_1.overrideAttrs (old: {
- meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
- })
- else
- pkg;
- in
- builtins.map replaceOpenssl attrs.buildInputs;
+ buildInputs =let
+ a =
+ let
+ replaceOpenssl = pkg:
+ if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
+ pkgs.openssl_1_1.overrideAttrs (old: {
+ meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
+ })
+ else
+ pkg;
+ in
+ builtins.map replaceOpenssl attrs.buildInputs;
+ b = (lib.elemAt a 0).name
+ in
+ builtins.trace b a;
});
openswoole =
And then I run: nix build .#php74.extensions.openssl -L
I can see: 1.1.1u.
It would be nice to do the same on a Darwin machine.
| 15:04:32 |
Pol | * I applied this patch:
diff --git i/pkgs/package-overrides.nix w/pkgs/package-overrides.nix
index 6cd988d..1691c5e 100644
--- i/pkgs/package-overrides.nix
+++ w/pkgs/package-overrides.nix
@@ -507,17 +507,21 @@ in
in
ourPatches ++ upstreamPatches;
- buildInputs =
- let
- replaceOpenssl = pkg:
- if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
- pkgs.openssl_1_1.overrideAttrs (old: {
- meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
- })
- else
- pkg;
- in
- builtins.map replaceOpenssl attrs.buildInputs;
+ buildInputs =let
+ a =
+ let
+ replaceOpenssl = pkg:
+ if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
+ pkgs.openssl_1_1.overrideAttrs (old: {
+ meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
+ })
+ else
+ pkg;
+ in
+ builtins.map replaceOpenssl attrs.buildInputs;
+ b = (lib.elemAt a 0).name
+ in
+ builtins.trace b a;
});
openswoole =
And then I run: nix build .#php74.extensions.openssl -L
I can see: openssl-1.1.1u, so the replacement works. But it seems it is not on Darwin... any available to verify ?
It would be nice to do the same on a Darwin machine.
| 15:05:08 |
Pol | Maybe Stéphan ? ** | 15:11:21 |
Pol | * Maybe Stéphan ? ^^ | 15:11:37 |
Pol | I've describe the procedure here: https://github.com/fossar/nix-phps/pull/282 | 15:13:42 |
Pol | The issue has been found by the Darwin maintainer team | 16:44:44 |
Pol | Apparently, there are two different version of OpenSSL 3 and this patch should fix the issue: https://github.com/fossar/nix-phps/pull/282/commits/6712008dcaccb7f74a7b7c5bc376713d01f64e85 | 16:45:25 |
| 25 Jul 2023 |
Pol | There has been an update of libxml2 in nixpkgs and it's breaking some tests in the PHP dom extension. Do you think this approach to fix the issue is the best one ? https://github.com/fossar/nix-phps/pull/286#issuecomment-1649651146 Comments are welcome. | 14:28:20 |
| pbsds changed their display name from pbsds to pbsds (UTC+1). | 19:03:43 |
| 27 Jul 2023 |
| ribosomerocker joined the room. | 03:04:31 |
| 29 Jul 2023 |
Lars Strojny | How is the PHP interpreter selected that is used inside of the pecl script? Certain commands like pecl package require an extension, in this case, zlib but building PHP with zlib extension enabled doesn’t change the interpreter. Any way to fix that? | 09:26:34 |
Lars Strojny | This is my PHP: pkgs.php82.withExtensions ({ enabled, all }: enabled ++ [ all.zlib all.gd ])) | 09:26:57 |
Lars Strojny | But still pecl package complains about missing zlib | 09:27:08 |
Lars Strojny | I found a workaround by setting PHP_PEAR_PHP_BIN=which php`` but that’s not ideal | 09:28:49 |
Lars Strojny | * I found a workaround by setting PHP_PEAR_PHP_BIN=\which php`` but that’s not ideal | 09:29:02 |
Lars Strojny | * I found a workaround by setting `PHP_PEAR_PHP_BIN=``which php``` but that’s not ideal | 09:29:18 |
Lars Strojny | * I found a workaround by setting PHP_PEAR_PHP_BIN=which php but that’s not ideal | 09:29:39 |
Pol | In reply to @lstrojny:matrix.org But still pecl package complains about missing zlib What is doing that command, I don't know it yet. | 10:49:32 |
Lars Strojny | Pol: it’s for package maintainers to generate new release archives for PECL extensions | 12:36:27 |