From 7d831bec51b321f7d875abfcb3440716b909c746 Mon Sep 17 00:00:00 2001 From: Kornelijus Survila Date: Wed, 10 Dec 2025 00:41:15 -0700 Subject: [PATCH] foundationdb: do not statically link libcxx/libstdc++/libgcc FDB defaults to statically linking libcxx, libstdc++, and libgcc. This leads to non-obvious problems when the dependencies bring in their own copies. Do not do that as we're not trying to build and package portable binaries. Fixes #319537. Fixes #378888. --- pkgs/by-name/fo/foundationdb/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/fo/foundationdb/package.nix b/pkgs/by-name/fo/foundationdb/package.nix index bea37684bd7b..4929c546d61c 100644 --- a/pkgs/by-name/fo/foundationdb/package.nix +++ b/pkgs/by-name/fo/foundationdb/package.nix @@ -107,6 +107,12 @@ stdenv.mkDerivation rec { "-DBUILD_DOCUMENTATION=FALSE" + # Disable the default static linking to libc++, libstdc++ and libgcc. + # + # This leads to various, non-obvious problems as our dependencies bring in + # their own copies of these libraries. + "-DSTATIC_LINK_LIBCXX=FALSE" + # LTO brings up overall build time, but results in much smaller # binaries for all users and the cache. "-DUSE_LTO=ON"