Repository navigation
"Linking with cc failed" - trying to cargo compile rust-based find-fd on OmniOS #145
Description
Activity
The error here is this line:
= note: ld: fatal: file crt1.o: open failed: No such file or directoryThis file belongs in /usr/lib and needs to be provided by the OS, I think on OmniOS it is in the "gcc-runtime" package but I am not sure. Install the relevant package and things should work.
- On 9/18/18 11:12 , Jonathan Perkin wrote: The error here is this line: ``` = note: ld: fatal: file crt1.o: open failed: No such file or directory ``` This file belongs in /usr/lib and needs to be provided by the OS, I think on OmniOS it is in the "gcc-runtime" package but I am not sure. Install the relevant package and things should work.In illumos it's the package 'pkg:/system/library/c-runtime'.
Thank you for quick reply. After installing proper OmniOS tooling,
lderror disappear, whilecc failederror remains, with no explanation. It seems there's some kind of "impedence mismatch" between pkgsrc and OmniOS native packages. I will investigate this further and report back.I am back as promised. It turns out it was not a missing dependency, but rather an issue with nix missing Illumos/Solaris Bindings.
Since I am able to compile smoothly other rust apps, like ripgrep's latest version, I hope that issue will solve this as well.
- changed the title
[-]"Linking with cc failed" - trying to cargo compile rust-based find-fd[/-][+]"Linking with cc failed" - trying to cargo compile rust-based find-fd on OmniOS[/+]on Oct 6, 2018 - added a commit that references this issue
on Dec 1, 2018 @priyadarshan btw here are the missing pieces in libc needed by nix:
papertigers/libc@6b9b207I have also hacked nix to a state where it can compile and I was able to successfully build fd-find on illumos. It seems to function correctly and all of its tests pass via
cargo test.Next steps:
- Validate the libc crate changes look sane. I used awk to generate some of it.
- Fix nix properly. Currently a lot of tests fail on my first pass.
Thank you so much for the enormous work.
I am sure many, including the open nix issue will benefit.- added a commit that references this issue
on Mar 26, 2019 - added a commit that references this issue
on Oct 20, 2019 115 remaining items
- added 2 commits that reference this issue
on May 14, 2026 - added 2 commits that reference this issue
on May 22, 2026 - added a commit that references this issue
on Jun 9, 2026 - added 2 commits that reference this issue
on Jun 24, 2026 - added 2 commits that reference this issue
on Aug 7, 2026 - added 3 commits that reference this issue
on Aug 25, 2026 - added a commit that references this issue
on Sep 26, 2026
I need to run rust-based fd-find.
Instead of bothering the super-busy Joyent/pkgsrc devs (by the way thank you for
ripgrep!), I thought of compiling it usingcargo.On OmniOS r151026 with pkgsrc 2018Q2,
I have successfully installed
rustand gcc,Also, I have this as
$PATHStill, trying to install fd-find using cargo I get errors like
error: linking withccfailed: exit code: 1,It seems like
cargodoes not seecc?Could somebody point to me pages or tips on how to solve this?
It would be good for others to know too, as quite a few very nice tools are developed in rust nowadays.
Thank you in advance.