-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: rustc missing library iconv on darwin #3482
Comments
@neosimsim any updates on this? did you found a better solution? |
Not yet, no. |
I have this same problem also.. |
This is unrelated to Home Manager and a duplicate of NixOS/nixpkgs#206242. |
Note that rust 1.66 (which apparently fixes the issue out of the box) is in nixpkgs unstable already, so you might want to use rustc from unstable. |
Yes it works. Thanks for the hint. |
See nix-community/home-manager#3482 note: ld: library not found for -liconv clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
@ncfavier I'm still running into this problem with |
The MacOS build fails with: > ++ command cargo build --release --message-format json-render-diagnostics --locked > Compiling gitlab-timelogs v0.2.2 (/private/tmp/nix-build-gitlab-timelogs-0.2.2.drv-0/8bm81sjfqmsk7lclw7pnddrxv785aaj3-source) > error: linking with `cc` failed: exit status: 1 Fix by manually adding iconv as a dependency. Other people also have encountered this: nix-community/home-manager#3482
The MacOS build fails with: > ++ command cargo build --release --message-format json-render-diagnostics --locked > Compiling gitlab-timelogs v0.2.2 (/private/tmp/nix-build-gitlab-timelogs-0.2.2.drv-0/8bm81sjfqmsk7lclw7pnddrxv785aaj3-source) > error: linking with `cc` failed: exit status: 1 Fix by manually adding iconv as a dependency. Other people also have encountered this: nix-community/home-manager#3482
Same issue here, I ended up following the fix referenced in the commit above which involves conditionally adding libiconv to buildInputs. |
Generally libiconv should be depended on unconditionally, as it's not part of libc on more platforms than just Darwin, and it's a no-op on platforms where it is part of libc (most Linux ones). |
Issue description
I installed rust and cargo using the following flake.nix
But when I try compile the following main.rs
The build failed with
I could fix my setup by adding
But I have the impression this should not be necessary.
Maintainer CC
No response
System information
The text was updated successfully, but these errors were encountered: