GNU bug report logs - #63238
issue linking to librt

Previous Next

Package: guix;

Reported by: "Ava Hahn" <avavava <at> sunnypup.io>

Date: Wed, 3 May 2023 01:47:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: "Ava Hahn" <avavava <at> sunnypup.io>
To: 63238 <at> debbugs.gnu.org
Subject: bug#63238: issue linking to librt
Date: Tue, 02 May 2023 13:01:28 -0700
[Message part 1 (text/plain, inline)]
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.

[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.