Skip to content

Commit 2708983

Browse files
committed
Put libstdc++ on the Nix shell's library path
The shader test links glslang's C++, and under nix develop its binary could not start: "libstdc++.so.6: cannot open shared object file". The gcc in buildInputs is the wrapper; the runtime is stdenv.cc.cc.lib, which is now part of LD_LIBRARY_PATH.
1 parent 843bae6 commit 2708983

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎flake.nix‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@
6363
# add libraries here (e.g. pkgs.libvmi)
6464
];
6565

66-
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (buildInputs ++ nativeBuildInputs);
66+
# stdenv.cc.cc.lib is libstdc++.so.6, which the `gcc` above wraps but
67+
# does not put here. `cargo test -p site` links glslang's C++ and
68+
# cannot start without it.
69+
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (buildInputs ++ nativeBuildInputs ++ [pkgs.stdenv.cc.cc.lib]);
6770

6871
# Add glibc, clang, glib, and other headers to bindgen search path
6972
BINDGEN_EXTRA_CLANG_ARGS =

0 commit comments

Comments
 (0)