bug#65461: Cannot compile any Rust projects

2023-08-29 Thread Maxim Cournoyer
Hi Jonas,

Jonas Møller  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#65461: Cannot compile any Rust projects

2023-08-25 Thread Josselin Poiret via Bug reports for GNU Guix
Hi everyone,

Josselin Poiret  writes:

> Hi everyone,
>
> Hilton Chain  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
Description: PGP signature


bug#65461: Cannot compile any Rust projects

2023-08-25 Thread Jonas Møller via Bug reports for GNU Guix
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 <[d...@jpoiret.xyz](mailto:On 
Fri, Aug 25, 2023 at 15:58, Josselin Poiret < wrote:

> Hi Jonas,
>
> Jonas via Bug reports for GNU Guix  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

bug#65461: Cannot compile any Rust projects

2023-08-25 Thread Josselin Poiret via Bug reports for GNU Guix
Hi Jonas,

Jonas via Bug reports for GNU Guix  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
Description: PGP signature


bug#65461: Cannot compile any Rust projects

2023-08-25 Thread Josselin Poiret via Bug reports for GNU Guix
Hi everyone,

Hilton Chain  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
Description: PGP signature


bug#65461: Cannot compile any Rust projects

2023-08-23 Thread Hilton Chain via Bug reports for GNU Guix
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 "!" 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





bug#65461: Cannot compile any Rust projects

2023-08-23 Thread brian via Bug reports for GNU Guix
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





bug#65461: Cannot compile any Rust projects

2023-08-22 Thread Hilton Chain via Bug reports for GNU Guix
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





bug#65461: Cannot compile any Rust projects

2023-08-22 Thread Jonas via Bug reports for GNU Guix
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