all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#65461: Cannot compile any Rust projects
@ 2023-08-22 22:59 Jonas via Bug reports for GNU Guix
  2023-08-23  3:36 ` Hilton Chain via Bug reports for GNU Guix
  2023-08-25 12:58 ` Josselin Poiret via Bug reports for GNU Guix
  0 siblings, 2 replies; 9+ messages in thread
From: Jonas via Bug reports for GNU Guix @ 2023-08-22 22:59 UTC (permalink / raw)
  To: 65461

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






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#65461: Cannot compile any Rust projects
  2023-08-22 22:59 bug#65461: Cannot compile any Rust projects Jonas via Bug reports for GNU Guix
@ 2023-08-23  3:36 ` Hilton Chain via Bug reports for GNU Guix
  2023-08-23 18:22   ` brian via Bug reports for GNU Guix
  2023-08-25 12:58 ` Josselin Poiret via Bug reports for GNU Guix
  1 sibling, 1 reply; 9+ messages in thread
From: Hilton Chain via Bug reports for GNU Guix @ 2023-08-23  3:36 UTC (permalink / raw)
  To: Jonas; +Cc: 65461

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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#65461: Cannot compile any Rust projects
  2023-08-23  3:36 ` Hilton Chain via Bug reports for GNU Guix
@ 2023-08-23 18:22   ` brian via Bug reports for GNU Guix
  2023-08-24  2:08     ` Hilton Chain via Bug reports for GNU Guix
  0 siblings, 1 reply; 9+ messages in thread
From: brian via Bug reports for GNU Guix @ 2023-08-23 18:22 UTC (permalink / raw)
  To: 65461; +Cc: hako, jonas

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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#65461: Cannot compile any Rust projects
  2023-08-23 18:22   ` brian via Bug reports for GNU Guix
@ 2023-08-24  2:08     ` Hilton Chain via Bug reports for GNU Guix
  2023-08-25 11:03       ` Josselin Poiret via Bug reports for GNU Guix
  0 siblings, 1 reply; 9+ messages in thread
From: Hilton Chain via Bug reports for GNU Guix @ 2023-08-24  2:08 UTC (permalink / raw)
  To: Brian Cully; +Cc: 65461, Josselin Poiret, Jonas

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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#65461: Cannot compile any Rust projects
  2023-08-24  2:08     ` Hilton Chain via Bug reports for GNU Guix
@ 2023-08-25 11:03       ` Josselin Poiret via Bug reports for GNU Guix
  2023-08-25 16:37         ` Josselin Poiret via Bug reports for GNU Guix
  0 siblings, 1 reply; 9+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-08-25 11:03 UTC (permalink / raw)
  To: Hilton Chain, Brian Cully; +Cc: 65461, Jonas

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

Hi everyone,

Hilton Chain <hako@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#65461: Cannot compile any Rust projects
  2023-08-22 22:59 bug#65461: Cannot compile any Rust projects Jonas via Bug reports for GNU Guix
  2023-08-23  3:36 ` Hilton Chain via Bug reports for GNU Guix
@ 2023-08-25 12:58 ` Josselin Poiret via Bug reports for GNU Guix
  2023-08-25 13:30   ` Jonas Møller via Bug reports for GNU Guix
  1 sibling, 1 reply; 9+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-08-25 12:58 UTC (permalink / raw)
  To: Jonas, 65461

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

Hi Jonas,

Jonas via Bug reports for GNU Guix <bug-guix@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#65461: Cannot compile any Rust projects
  2023-08-25 12:58 ` Josselin Poiret via Bug reports for GNU Guix
@ 2023-08-25 13:30   ` Jonas Møller via Bug reports for GNU Guix
  2023-08-29 21:03     ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Jonas Møller via Bug reports for GNU Guix @ 2023-08-25 13:30 UTC (permalink / raw)
  To: Josselin Poiret, 65461@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 829 bytes --]

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@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@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

[-- Attachment #2: Type: text/html, Size: 3696 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#65461: Cannot compile any Rust projects
  2023-08-25 11:03       ` Josselin Poiret via Bug reports for GNU Guix
@ 2023-08-25 16:37         ` Josselin Poiret via Bug reports for GNU Guix
  0 siblings, 0 replies; 9+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-08-25 16:37 UTC (permalink / raw)
  To: Hilton Chain, Brian Cully; +Cc: 65461, Jonas

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

Hi everyone,

Josselin Poiret <dev@jpoiret.xyz> writes:

> Hi everyone,
>
> Hilton Chain <hako@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#65461: Cannot compile any Rust projects
  2023-08-25 13:30   ` Jonas Møller via Bug reports for GNU Guix
@ 2023-08-29 21:03     ` Maxim Cournoyer
  0 siblings, 0 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2023-08-29 21:03 UTC (permalink / raw)
  To: Jonas Møller; +Cc: Josselin Poiret, 65461-done

Hi Jonas,

Jonas Møller <jonas@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




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-08-29 21:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-22 22:59 bug#65461: Cannot compile any Rust projects Jonas via Bug reports for GNU Guix
2023-08-23  3:36 ` Hilton Chain via Bug reports for GNU Guix
2023-08-23 18:22   ` brian via Bug reports for GNU Guix
2023-08-24  2:08     ` Hilton Chain via Bug reports for GNU Guix
2023-08-25 11:03       ` Josselin Poiret via Bug reports for GNU Guix
2023-08-25 16:37         ` Josselin Poiret via Bug reports for GNU Guix
2023-08-25 12:58 ` Josselin Poiret via Bug reports for GNU Guix
2023-08-25 13:30   ` Jonas Møller via Bug reports for GNU Guix
2023-08-29 21:03     ` Maxim Cournoyer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.