You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compile the project using gcc main.c. This should run without issues
Now rename the parent directory name to Test Dir and run steps 2. and 3. again. This failed with:
/nix/store/vk4mlknqk9yjbqa68a7rvpfxfdw3rad7-binutils-2.43.1/bin/ld: cannot find Dir/outputs/out/lib: No such file or directory
collect2: error: ld returned 1 exit status
Expected behavior
Compilation should succeed without any error.
Metadata
<!-- Please insert the output of running nix-env --version` below this line -->
nix-env (Nix) 2.24.12
FreaxMATE
changed the title
Flake nix shells: Build fails on filepaths containing spaces
Flake nix shells: Build fails when working directory path contains spaces
Feb 3, 2025
Describe the bug
Compilation of a c/c++ file fails in flake-based nix shell development environment when directory name contains spaces.
Steps To Reproduce
flake.nix
andmain.c
in directoryTestDir
flake.nix
main.c
nix develop
gcc main.c
. This should run without issuesTest Dir
and run steps 2. and 3. again. This failed with:/nix/store/vk4mlknqk9yjbqa68a7rvpfxfdw3rad7-binutils-2.43.1/bin/ld: cannot find Dir/outputs/out/lib: No such file or directory collect2: error: ld returned 1 exit status
Expected behavior
Compilation should succeed without any error.
Metadata
<
!-- Please insert the output of running
nix-env --version` below this line -->nix-env (Nix) 2.24.12
Additional context
Similar issue: #7707
Checklist
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: