GNU bug report logs -
#65461
Cannot compile any Rust projects
Previous Next
Reported by: Jonas <jonas <at> moesys.no>
Date: Tue, 22 Aug 2023 23:00:02 UTC
Severity: normal
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65461 in the body.
You can then email your comments to 65461 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#65461
; Package
guix
.
(Tue, 22 Aug 2023 23:00:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jonas <jonas <at> moesys.no>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Tue, 22 Aug 2023 23:00:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi! Compiling any Rust projects with cargo/rustc gives me:
error: linking with
`/gnu/store/5lqhcv91ijy82p92ac6g5xw48l0lwwz4-gcc-11.3.0/bin/gcc` failed:
exit status: 1
|
= note: LC_ALL="en_US.UTF-8"
PATH="/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/gnu/store/na1dpbbcxjaa3n8wkwrfpch476f90hlf-ld-wrapper-0/bin:/run/setuid-programs:/home/sanoj/.config/guix/current/bin:/home/sanoj/.guix-profile/bin:/home/sanoj/.guix-profile/sbin:/run/current-system/profile/bin:/run/current-system/profile/sbin"
VSLANG="1033"
"/gnu/store/5lqhcv91ijy82p92ac6g5xw48l0lwwz4-gcc-11.3.0/bin/gcc" "-m64"
"/tmp/rustcgxwbFb/symbols.o"
"/home/sanoj/builds/lmao/target/debug/deps/lmao-acc3b21e98a3ed76.1zjflzmz4wm0rsrv.rcgu.o"
"/home/sanoj/builds/lmao/target/debug/deps/lmao-acc3b21e98a3ed76.2duafa9srarmpjnt.rcgu.o"
"/home/sanoj/builds/lmao/target/debug/deps/lmao-acc3b21e98a3ed76.443xrmazvzgsmurd.rcgu.o"
"/home/sanoj/builds/lmao/target/debug/deps/lmao-acc3b21e98a3ed76.44ggf720dnnj7j1d.rcgu.o"
"/home/sanoj/builds/lmao/target/debug/deps/lmao-acc3b21e98a3ed76.fcr051zdx2qwdyh.rcgu.o"
"/home/sanoj/builds/lmao/target/debug/deps/lmao-acc3b21e98a3ed76.okt6swwk1mh2gyh.rcgu.o"
"/home/sanoj/builds/lmao/target/debug/deps/lmao-acc3b21e98a3ed76.5g6lewwejzj1nrgt.rcgu.o"
"-Wl,--as-needed" "-L" "/home/sanoj/builds/lmao/target/debug/deps" "-L"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib"
"-Wl,-Bstatic"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-b28c98d3528d2baf.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-2841ec5be44963c5.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-7383ffa14b6461ef.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-162fa792d9ed3bfb.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-0bfd35419d2031f1.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-41e203ff41cdcead.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-34503229160295b3.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-fb9be16e6f724234.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-35b2087e9b31e588.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-205fda2dd42d3838.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-de351642646ac1bb.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-0f6e64fdc62a859f.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-d027526668cd710d.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-ad7bd3b9ed5616ab.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-4c1d266099985bae.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-36ed65d81204c951.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-3bee09dbc34bd854.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-0f3efdc599668d8b.rlib"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-36cc28fcdaa49a7b.rlib"
"-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
"-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L"
"/gnu/store/96sdk3id979vh1kc9nw9p88834014j6m-rust-1.68.2/lib/rustlib/x86_64-unknown-linux-gnu/lib"
"-o" "/home/sanoj/builds/lmao/target/debug/deps/lmao-acc3b21e98a3ed76"
"-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
= note: ld: cannot find -lrt: No such file or directory
collect2: error: ld returned 1 exit status
Information forwarded
to
bug-guix <at> gnu.org
:
bug#65461
; Package
guix
.
(Wed, 23 Aug 2023 03:38:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 65461 <at> debbugs.gnu.org (full text, mbox):
Hi Jonas,
On Wed, 23 Aug 2023 06:59:14 +0800,
Jonas via Bug reports for GNU Guix wrote:
>
[...]
> = note: ld: cannot find -lrt: No such file or directory
> collect2: error: ld returned 1 exit status
librt has been integrated into libc since glibc 2.34.
gcc-toolchain:static should provide an empty library to satisfy the
linker:
--8<---------------cut here---------------start------------->8---
$ guix shell gcc-toolchain:static -- sh -c 'ls $GUIX_ENVIRONMENT/lib/librt*'
/gnu/store/8fv6xh7nyyb4hsi7b7p2s2ihpsj0lvs9-profile/lib/librt.a
--8<---------------cut here---------------end--------------->8---
Thanks
Information forwarded
to
bug-guix <at> gnu.org
:
bug#65461
; Package
guix
.
(Wed, 23 Aug 2023 18:23:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
I'd like to propose that the ‘out’ output of gcc-toolchain include the
stub rt, pthread, and dl stub static libraries. This problem comes up on
a very regular basis, and I can think of no reason not to have the
compatibility shims made available.
They contain no code, as they only exist to satisfy linker command
lines, so they're not relevant for grafting purposes. The workaround of
including the static toolchain means that every static library, not just
the empty stubs, is made availible for linking, which is, IMHO, strictly
worse than putting empty .a files into the default output.
WDYT?
-bjc
Information forwarded
to
bug-guix <at> gnu.org
:
bug#65461
; Package
guix
.
(Wed, 23 Aug 2023 18:23:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#65461
; Package
guix
.
(Thu, 24 Aug 2023 02:10:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 65461 <at> debbugs.gnu.org (full text, mbox):
Hello Brian,
On Thu, 24 Aug 2023 02:22:07 +0800,
brian wrote:
>
> I'd like to propose that the ‘out’ output of gcc-toolchain include the
> stub rt, pthread, and dl stub static libraries. This problem comes up on
> a very regular basis, and I can think of no reason not to have the
> compatibility shims made available.
>
> They contain no code, as they only exist to satisfy linker command
> lines, so they're not relevant for grafting purposes. The workaround of
> including the static toolchain means that every static library, not just
> the empty stubs, is made availible for linking, which is, IMHO, strictly
> worse than putting empty .a files into the default output.
>
> WDYT?
Grepping "!<arch>" in gcc-toolchain:static gives me libanl.a, libdl.a,
libpthread.a, librt.a and libutil.a. Currently only librt.a is not
present in gcc-toolchain:out, so the proposal is really reasonable for
me.
Cc-ing Josselin since they have sent a patch to #63258.
Hi Josselin, what's the current state of the patch? Can you resend it
to guix-patches to trigger the build process?
Thanks
Information forwarded
to
bug-guix <at> gnu.org
:
bug#65461
; Package
guix
.
(Fri, 25 Aug 2023 11:04:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 65461 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi everyone,
Hilton Chain <hako <at> ultrarare.space> writes:
> Cc-ing Josselin since they have sent a patch to #63258.
>
> Hi Josselin, what's the current state of the patch? Can you resend it
> to guix-patches to trigger the build process?
Huh, completely forgot about this. The patch should still be ready, and
I don't expect it to cause any problems. I can have a look and maybe
merge this afternoon.
Best,
--
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#65461
; Package
guix
.
(Fri, 25 Aug 2023 13:00:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 65461 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Jonas,
Jonas via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:
> Hi! Compiling any Rust projects with cargo/rustc gives me:
>
> error: linking with
> `/gnu/store/5lqhcv91ijy82p92ac6g5xw48l0lwwz4-gcc-11.3.0/bin/gcc` failed:
> exit status: 1
Please make sure you add simple reproducers to your bug reports so that
people can check that the bug does get resolved by proposed patches. I
can't reproduce this with a simple `rustc hello.rs` where `hello.rs` is
the simplest hello world I could find.
Best,
--
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#65461
; Package
guix
.
(Fri, 25 Aug 2023 13:31:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 65461 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I can still reproduce this with:
guix shell —container rust rust-cargo
cargo new hello
cd hello
cargo build
Mvh Jonas Møller
On Fri, Aug 25, 2023 at 15:58, Josselin Poiret <[dev <at> jpoiret.xyz](mailto:On Fri, Aug 25, 2023 at 15:58, Josselin Poiret <<a href=)> wrote:
> Hi Jonas,
>
> Jonas via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:
>
>> Hi! Compiling any Rust projects with cargo/rustc gives me:
>>
>> error: linking with
>> `/gnu/store/5lqhcv91ijy82p92ac6g5xw48l0lwwz4-gcc-11.3.0/bin/gcc` failed:
>> exit status: 1
>
> Please make sure you add simple reproducers to your bug reports so that
> people can check that the bug does get resolved by proposed patches. I
> can't reproduce this with a simple `rustc hello.rs` where `hello.rs` is
> the simplest hello world I could find.
>
> Best,
> --
> Josselin Poiret
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#65461
; Package
guix
.
(Fri, 25 Aug 2023 16:39:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 65461 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi everyone,
Josselin Poiret <dev <at> jpoiret.xyz> writes:
> Hi everyone,
>
> Hilton Chain <hako <at> ultrarare.space> writes:
>
>> Cc-ing Josselin since they have sent a patch to #63258.
>>
>> Hi Josselin, what's the current state of the patch? Can you resend it
>> to guix-patches to trigger the build process?
>
> Huh, completely forgot about this. The patch should still be ready, and
> I don't expect it to cause any problems. I can have a look and maybe
> merge this afternoon.
Pushed as 6c447ababfb11581a75cff8281e96f701e216692.
A sample hello world should now build with cargo with `guix shell -C
rust rust-cargo gcc-toolchain`. This is a workaround until we add the
librt.a to the gcc package proper.
Best,
--
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Tue, 29 Aug 2023 21:04:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jonas <jonas <at> moesys.no>
:
bug acknowledged by developer.
(Tue, 29 Aug 2023 21:04:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 65461-done <at> debbugs.gnu.org (full text, mbox):
Hi Jonas,
Jonas Møller <jonas <at> moesys.no> writes:
> I can still reproduce this with:
>
> guix shell —container rust rust-cargo
> cargo new hello
> cd hello
> cargo build
If you add 'gcc-toolchain' in the container ('guix shell --container
rust rust-cargo gcc-toolchain'), it now works, using my recent Guix
9f4b6bc.
Closing, thanks to Josselin for the fix!
--
Thanks,
Maxim
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 27 Sep 2023 11:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 226 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.