all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#63728: GHC cannot find lrt
@ 2023-05-25 22:25 Antero Mejr via Bug reports for GNU Guix
  2023-05-26  9:17 ` Mekeor Melire
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Antero Mejr via Bug reports for GNU Guix @ 2023-05-25 22:25 UTC (permalink / raw)
  To: 63728

Attempting to build a trivial Haskell program using ghc fails, as the
linker cannot find the rt library:

```
~ $ ghc -O2 test.hs
Linking test ...
/home/a/.guix-profile/bin/ld: cannot find -lrt: No such file or directory
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
```

Glibc and gcc-toolchain are installed in the profile, and
~/.guix-profile/lib/librt.so.1 exists.

Maybe this is related to this new bug, or the recent core-updates merge?
https://issues.guix.gnu.org/63238




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

* bug#63728: GHC cannot find lrt
  2023-05-25 22:25 bug#63728: GHC cannot find lrt Antero Mejr via Bug reports for GNU Guix
@ 2023-05-26  9:17 ` Mekeor Melire
  2023-05-26 15:44   ` Antero Mejr via Bug reports for GNU Guix
  2023-05-26  9:21 ` Mekeor Melire
  2023-05-26 15:16 ` bug#63728: (no subject) Antero Mejr via Bug reports for GNU Guix
  2 siblings, 1 reply; 7+ messages in thread
From: Mekeor Melire @ 2023-05-26  9:17 UTC (permalink / raw)
  To: Antero Mejr; +Cc: 63728

2023-05-25 22:25 bug-guix@gnu.org:

> Attempting to build a trivial Haskell program using ghc fails, 
> as the linker cannot find the rt library:

Does installing gcc-toolchain:static help as a work-around?




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

* bug#63728: GHC cannot find lrt
  2023-05-25 22:25 bug#63728: GHC cannot find lrt Antero Mejr via Bug reports for GNU Guix
  2023-05-26  9:17 ` Mekeor Melire
@ 2023-05-26  9:21 ` Mekeor Melire
  2023-05-26 15:16 ` bug#63728: (no subject) Antero Mejr via Bug reports for GNU Guix
  2 siblings, 0 replies; 7+ messages in thread
From: Mekeor Melire @ 2023-05-26  9:21 UTC (permalink / raw)
  To: Antero Mejr; +Cc: 63728

2023-05-25 22:25 bug-guix@gnu.org:

> Attempting to build a trivial Haskell program using ghc fails, 
> as the linker cannot find the rt library:
>
> ```
> ~ $ ghc -O2 test.hs
> Linking test ...
> /home/a/.guix-profile/bin/ld: cannot find -lrt: No such file or 
> directory
> collect2: error: ld returned 1 exit status
> `gcc' failed in phase `Linker'. (Exit code: 1)
> ```
>
> Glibc and gcc-toolchain are installed in the profile, and
> ~/.guix-profile/lib/librt.so.1 exists.
>
> Maybe this is related to this new bug, or the recent 
> core-updates merge? https://issues.guix.gnu.org/63238

There is also this bug I had reported:

https://issues.guix.gnu.org/63258

I suggest to merge this bug (63728) and the bug I just linked 
(63258). What do you think?




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

* bug#63728: (no subject)
  2023-05-25 22:25 bug#63728: GHC cannot find lrt Antero Mejr via Bug reports for GNU Guix
  2023-05-26  9:17 ` Mekeor Melire
  2023-05-26  9:21 ` Mekeor Melire
@ 2023-05-26 15:16 ` Antero Mejr via Bug reports for GNU Guix
  2 siblings, 0 replies; 7+ messages in thread
From: Antero Mejr via Bug reports for GNU Guix @ 2023-05-26 15:16 UTC (permalink / raw)
  To: control; +Cc: 63728

merge 63258 63728




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

* bug#63728: GHC cannot find lrt
  2023-05-26  9:17 ` Mekeor Melire
@ 2023-05-26 15:44   ` Antero Mejr via Bug reports for GNU Guix
  2023-05-29 20:04     ` Mekeor Melire
  0 siblings, 1 reply; 7+ messages in thread
From: Antero Mejr via Bug reports for GNU Guix @ 2023-05-26 15:44 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: 63728

Mekeor Melire <mekeor@posteo.de> writes:

> 2023-05-25 22:25 bug-guix@gnu.org:
>
>> Attempting to build a trivial Haskell program using ghc fails, as the linker
>> cannot find the rt library:
>
> Does installing gcc-toolchain:static help as a work-around?

I merged this bug with #63258.

The gcc-toolchain:static workaround fixes the rt problem, but now the
binaries aren't linked to libgmp and libffi, even though gmp and libffi
packages are installed in the profile:

--8<---------------cut here---------------start------------->8---
~$ ghc -O2 test.hs
~$ ldd ./test
  linux-vdso.so.1 (0x00007ffe0956f000)
  libgmp.so.10 => not found
  libc.so.6 => /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/libc.so.6 (0x00007fbe27e3f000)
  libm.so.6 => /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/libm.so.6 (0x00007fbe27d62000)
  libffi.so.8 => not found
  libgcc_s.so.1 => /gnu/store/qcg59v4yg239jj1k0xvqqqkqv6l8q6ll-gcc-12.2.0-lib/lib/libgcc_s.so.1 (0x00007fbe27d41000)
  /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/ld-linux-x86-64.so.2 => /gnu/store/ip9mj1pwymxi1yq32zbhwp3n3bycy6yi-glibc-2.35/lib/ld-linux-x86-64.so.2 (0x00007fbe2803d000)
--8<---------------cut here---------------end--------------->8---

Maybe there should be a ghc-toolchain package that has libgmp and
libffi as inputs, and makes sure GHC links them correctly?




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

* bug#63728: GHC cannot find lrt
  2023-05-26 15:44   ` Antero Mejr via Bug reports for GNU Guix
@ 2023-05-29 20:04     ` Mekeor Melire
  2023-05-31 18:40       ` Josselin Poiret via Bug reports for GNU Guix
  0 siblings, 1 reply; 7+ messages in thread
From: Mekeor Melire @ 2023-05-29 20:04 UTC (permalink / raw)
  To: Antero Mejr; +Cc: 63728

2023-05-26 15:44 antero@mailbox.org:

> The gcc-toolchain:static workaround fixes the rt problem, but 
> now the binaries aren't linked to libgmp and libffi, even though 
> gmp and libffi packages are installed in the profile:
>
> Maybe there should be a ghc-toolchain package that has libgmp 
> and libffi as inputs, and makes sure GHC links them correctly?

Hm. Alternatively, we could just fix gcc-toolchain (so that it 
includes rt). But maintainers (understandably) hesitate because 
this will trigger a world rebuild.




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

* bug#63728: GHC cannot find lrt
  2023-05-29 20:04     ` Mekeor Melire
@ 2023-05-31 18:40       ` Josselin Poiret via Bug reports for GNU Guix
  0 siblings, 0 replies; 7+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-05-31 18:40 UTC (permalink / raw)
  To: Mekeor Melire, Antero Mejr; +Cc: 63728

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

Hi everyone,

Mekeor Melire <mekeor@posteo.de> writes:

> Hm. Alternatively, we could just fix gcc-toolchain (so that it 
> includes rt). But maintainers (understandably) hesitate because 
> this will trigger a world rebuild.

Yet another alternative would be to patch GHC to not include `-lrt` in
its flags.  Yet another big rebuild though!  The proper fix in the
meantime is as you mentioned: add ghc-toolchain to contain everything
that's needed.  I find it weird though, since I've never had to do
anything of the sort when building Agda locally since the core-updates
merge though.

Best,
-- 
Josselin Poiret

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

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

end of thread, other threads:[~2023-05-31 18:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-25 22:25 bug#63728: GHC cannot find lrt Antero Mejr via Bug reports for GNU Guix
2023-05-26  9:17 ` Mekeor Melire
2023-05-26 15:44   ` Antero Mejr via Bug reports for GNU Guix
2023-05-29 20:04     ` Mekeor Melire
2023-05-31 18:40       ` Josselin Poiret via Bug reports for GNU Guix
2023-05-26  9:21 ` Mekeor Melire
2023-05-26 15:16 ` bug#63728: (no subject) Antero Mejr via Bug reports for GNU Guix

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.