From 8efa0cf1e562cffab9a435081fd38c7dd7d3fd1f Mon Sep 17 00:00:00 2001 From: simonzkl <110235118+simonzkl@users.noreply.github.com> Date: Wed, 19 Nov 2025 19:11:37 +0100 Subject: [PATCH 1/2] Revert "openssl: help build system to detect cross builds" This reverts commit 5d006774c0de6e698ad96bdc0dd3acf779b167da. --- pkgs/development/libraries/openssl/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 7c702660d390..bb9eb51123d2 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -186,11 +186,6 @@ let "--openssldir=/.$(etc)/etc/ssl" ) ] - # Tell build system it's cross environment. This allows to skip tests - # that would fail when libc is different. Otherwise, run the tests. - ++ lib.optional ( - !lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform - ) "--cross-compile-prefix=${lib.getBin stdenv.cc}/bin/" ++ lib.optionals withCryptodev [ "-DHAVE_CRYPTODEV" "-DUSE_CRYPTODEV_DIGESTS" From 54efca0fbb6a15d2cfe1a0e2b2bea4f56f220ea3 Mon Sep 17 00:00:00 2001 From: simonzkl <110235118+simonzkl@users.noreply.github.com> Date: Wed, 19 Nov 2025 19:11:47 +0100 Subject: [PATCH 2/2] Reapply "openssl: disable failing test on cross to musl" This reverts commit 27278f6e01f295df6e9af60f994e1e200e6ce8a0. --- pkgs/development/libraries/openssl/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index bb9eb51123d2..d7f9a42511ad 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -90,7 +90,15 @@ let substituteInPlace Configurations/unix-Makefile.tmpl \ --replace 'ENGINESDIR=$(libdir)/engines-{- $sover_dirname -}' \ 'ENGINESDIR=$(OPENSSLDIR)/engines-{- $sover_dirname -}' - ''; + '' + # This test will fail if the error strings between the build libc and host + # libc mismatch, e.g. when cross-compiling from glibc to musl + + + lib.optionalString + (finalAttrs.finalPackage.doCheck && stdenv.hostPlatform.libc != stdenv.buildPlatform.libc) + '' + rm test/recipes/02-test_errstr.t + ''; outputs = [ "bin"