NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.99k stars 14.01k forks source link

flutter/ld: spaces in path makes building impossible #299917

Open stereomato opened 7 months ago

stereomato commented 7 months ago

Describe the bug

Basically, if you try to build a flutter project in a path with spaces using nix, it just fails with

/nix/store/j2y057vz3i19yh4zjsan1s3q256q15rd-binutils-2.41/bin/ld: cannot find $REST_OF_PATH/outputs/out/lib: No such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Steps To Reproduce

Steps to reproduce the behavior:

  1. create a flutter project (using a nix flake) in a path that has spaces
  2. use nix develop or vscode + extensions to run "flutter build"
  3. fails as described

Expected behavior

Just runs

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

If it's in a path without spaces, it works. On a Fedora VM, exact same path, without nix, just the sdk downloaded and set up in $PATH, it works fine too. Maybe related to https://github.com/NixOS/nixpkgs/issues/226034 ?

Notify maintainers

@hacker1024

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.0-zen1, NixOS, 24.05 (Uakari), 24.05.20240323.44d0940`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/amxd2p02wx78nyaa4bkb0hjvgwhz1dq7-source`

Add a :+1: reaction to issues you find important.

hacker1024 commented 7 months ago

Thanks for the report - I'll look into this shortly.

CC @NixOS/flutter