GNU bug report logs -
#63238
issue linking to librt
Previous Next
To reply to this bug, email your comments to 63238 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#63238
; Package
guix
.
(Wed, 03 May 2023 01:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Ava Hahn" <avavava <at> sunnypup.io>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Wed, 03 May 2023 01:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[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)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#63238
; Package
guix
.
(Thu, 04 May 2023 09:51:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 63238 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I encountered the same issue recently. I used to be able to compile with
`cargo build` just fine just a few days ago. I recently upgraded my
system from glibc 2.33 to 2.35, and I'd guess it's related to that.
However, running it in `guix shell glibc <at> 2.33` results in the same
problem, so I'm not sure.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#63238
; Package
guix
.
(Fri, 26 May 2023 15:59:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 63238 <at> debbugs.gnu.org (full text, mbox):
librt and libpthread were merged into libc with glibc 2.34, however, for
compatibility, there exist empty .a files to satisfy the linker. But
because Guix has a separate output for the static libraries, they need
to be explicitly installed from ‘glibc:static’, which allows Cargo to do
its thing.
Cargo itself should probably be fixed so that it no longer tries to link
with these libraries, but until that time, the above work-around suffices.
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.