Open pfzetto opened 3 months ago
https://github.com/NixOS/nixpkgs/issues/177952 looks related? Tl;DR: spaces in paths are hard to handle on UNIX without breaking separator assumptions.
Were you ever able to come up with a workaround? I'm trying to use a devshell in a remotely mounted directory that has commas in the name (based on how GNOME mounts the files).
Commas are probably even worse as -Wl,
compiler option uses it as a separator to pass spaces to the linker.
Were you ever able to come up with a workaround? I'm trying to use a devshell in a remotely mounted directory that has commas in the name (based on how GNOME mounts the files).
Not really. I've worked around it by creating a bind-mount to a good path. A hardlink would propably also work.
Describe the bug
A devshell adds
-rpath $out/lib
toNIX_LDFLAGS
when entered usingnix develop
. If the file path of$out
includes spaces, the second part of the path is interpreted as a new argument by a Linker, causing it to fail.I think that this bug is caused by this function.
Steps To Reproduce
Steps to reproduce the behavior:
Create a new flake in a path that includes spaces:
/tmp/Hello\ World/flake.nix
and enter it usingnix develop
clang -c test.c -o test.o
clang -o test test.o
Expected behavior
The linker exits successfully and
test
is a working executable.Notify maintainers
@Ericson2314
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.