From bc905dffb221b5795f4dfe32cbf9278ba5154ddb Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 5 Nov 2025 22:22:11 +0000 Subject: [PATCH] doctest: disable tests on `isStatic` platforms Without the change `doctest` can't be built as https://hydra.nixos.org/build/311427996: [ 80%] Linking CXX shared library libimplementation.so ld: crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status Thus is fail `nixStatic` and `lixStatic` packages in `master`. Let's disable tests that require stared libraries. ZHF: #457852 --- pkgs/by-name/do/doctest/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/do/doctest/package.nix b/pkgs/by-name/do/doctest/package.nix index 590252b0fdad..d9d8769f102b 100644 --- a/pkgs/by-name/do/doctest/package.nix +++ b/pkgs/by-name/do/doctest/package.nix @@ -29,6 +29,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; + cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [ + # One of the examples tests shared library support + # and fails linking. + "-DDOCTEST_WITH_TESTS=OFF" + ]; + doCheck = true; # Fix the build with LLVM 21 / GCC 15.