bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63238: issue linking to librt


From: Ava Hahn
Subject: bug#63238: issue linking to librt
Date: Tue, 02 May 2023 13:01:28 -0700
User-agent: Cyrus-JMAP/3.9.0-alpha0-386-g2404815117-fm-20230425.001-g24048151

Hello All,

I believe I have stumbled on an issue with how the libraries in glibc are stored.
If I run "ld -lrt" it reports "ld: cannot find -lrt: No such file or directory"
Meanwhile, I can find librt with "ldconfig -p | grep librt": "librt.so.1 ... => /gnu/store/...".

In order to get ld to find librt I need to take the following steps:
- make a folder I can write to (not .~/guix-profile/lib)
- symlink ~/.guix-profile/lib/librt.so.1 to /my-folder/librt.so
- add the corresponding option to ld: "ld -lrt -L ~/lib"
Then ld is able to find librt.

I stumbled on this while trying to compile a rust project with "cargo build".
Compiling any dependency that relied on libc failed on linking to librt.

Feel free to let me know if there is some Guix facility I should be using instead. I am pretty new to this. I tried using cargo in a Guix shell but the same problem persisted.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]