unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65460: ghc/ghci are broken
@ 2023-08-22 22:57 Jonas via Bug reports for GNU Guix
  2023-08-23  5:14 ` paren--- via Bug reports for GNU Guix
  0 siblings, 1 reply; 8+ messages in thread
From: Jonas via Bug reports for GNU Guix @ 2023-08-22 22:57 UTC (permalink / raw)
  To: 65460

Hi! Running ghci gives me:

GHCi, version 9.2.5: https://www.haskell.org/ghc/  :? for help
ghc: loadArchive: Not an archive: 
`/gnu/store/kqb5pmdy950b53v4ga97qvhhdfqxv9rs-glibc-2.35-static/lib/libm.a'
ghc: panic! (the 'impossible' happened)
   (GHC version 9.2.5:
     loadArchive 
"/gnu/store/kqb5pmdy950b53v4ga97qvhhdfqxv9rs-glibc-2.35-static/lib/libm.a": 
failed

Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug


And compiling a hello-world program with ghc gives me:

[1 of 1] Compiling Main             ( hello.hs, hello.o )

<no location info>: error:
     Warning: Couldn't figure out C compiler information!
              Make sure you're using GNU gcc, or clang






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

* bug#65460: ghc/ghci are broken
  2023-08-22 22:57 bug#65460: ghc/ghci are broken Jonas via Bug reports for GNU Guix
@ 2023-08-23  5:14 ` paren--- via Bug reports for GNU Guix
  2023-08-23 10:39   ` Jonas via Bug reports for GNU Guix
  0 siblings, 1 reply; 8+ messages in thread
From: paren--- via Bug reports for GNU Guix @ 2023-08-23  5:14 UTC (permalink / raw)
  To: Jonas; +Cc: 65460

Jonas via Bug reports for GNU Guix <bug-guix@gnu.org> writes:
> And compiling a hello-world program with ghc gives me:
>
> [1 of 1] Compiling Main             ( hello.hs, hello.o )
>
> <no location info>: error:
>      Warning: Couldn't figure out C compiler information!
>               Make sure you're using GNU gcc, or clang

At the risk of stating an obvious thing that you've probably already
tried; is `gcc-toolchain` available in the environment?

-- (




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

* bug#65460: ghc/ghci are broken
  2023-08-23  5:14 ` paren--- via Bug reports for GNU Guix
@ 2023-08-23 10:39   ` Jonas via Bug reports for GNU Guix
  2023-08-23 14:42     ` Csepp
  2023-08-24  7:01     ` paren--- via Bug reports for GNU Guix
  0 siblings, 2 replies; 8+ messages in thread
From: Jonas via Bug reports for GNU Guix @ 2023-08-23 10:39 UTC (permalink / raw)
  To: (; +Cc: 65460

Thanks! Adding gcc-toolchain to the profile fixed it, but shouldn't this 
be automatically brought in by `guix install ghc`? This does still feels 
like a bug to me, shouldn't gcc-toolchain be a part of ghcs native-inputs?

sanoj@deimos ~/builds/hs-hello$ guix shell --container ghc -- ghc hello.hs
Linking hello ...

<no location info>: error:
     Warning: Couldn't figure out C compiler information!
              Make sure you're using GNU gcc, or clang
ghc: could not execute: gcc

Den 8/23/23 07:14, skrev (:
> Jonas via Bug reports for GNU Guix <bug-guix@gnu.org> writes:
>> And compiling a hello-world program with ghc gives me:
>>
>> [1 of 1] Compiling Main             ( hello.hs, hello.o )
>>
>> <no location info>: error:
>>       Warning: Couldn't figure out C compiler information!
>>                Make sure you're using GNU gcc, or clang
> At the risk of stating an obvious thing that you've probably already
> tried; is `gcc-toolchain` available in the environment?
>
> -- (





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

* bug#65460: ghc/ghci are broken
  2023-08-23 10:39   ` Jonas via Bug reports for GNU Guix
@ 2023-08-23 14:42     ` Csepp
  2023-08-23 16:16       ` Saku Laesvuori via Bug reports for GNU Guix
  2023-08-24  7:01     ` paren--- via Bug reports for GNU Guix
  1 sibling, 1 reply; 8+ messages in thread
From: Csepp @ 2023-08-23 14:42 UTC (permalink / raw)
  To: Jonas; +Cc: 65460, paren


Jonas via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

> Thanks! Adding gcc-toolchain to the profile fixed it, but shouldn't this 
> be automatically brought in by `guix install ghc`? This does still feels 
> like a bug to me, shouldn't gcc-toolchain be a part of ghcs native-inputs?
>
> sanoj@deimos ~/builds/hs-hello$ guix shell --container ghc -- ghc hello.hs
> Linking hello ...
>
> <no location info>: error:
>      Warning: Couldn't figure out C compiler information!
>               Make sure you're using GNU gcc, or clang
> ghc: could not execute: gcc
>
> Den 8/23/23 07:14, skrev (:
>> Jonas via Bug reports for GNU Guix <bug-guix@gnu.org> writes:
>>> And compiling a hello-world program with ghc gives me:
>>>
>>> [1 of 1] Compiling Main             ( hello.hs, hello.o )
>>>
>>> <no location info>: error:
>>>       Warning: Couldn't figure out C compiler information!
>>>                Make sure you're using GNU gcc, or clang
>> At the risk of stating an obvious thing that you've probably already
>> tried; is `gcc-toolchain` available in the environment?
>>
>> -- (

I assume GHC can work with other toolchains, like Clang, so it's better
to be explicit about what you want to use.




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

* bug#65460: ghc/ghci are broken
  2023-08-23 14:42     ` Csepp
@ 2023-08-23 16:16       ` Saku Laesvuori via Bug reports for GNU Guix
  2023-08-29 21:07         ` Maxim Cournoyer
  0 siblings, 1 reply; 8+ messages in thread
From: Saku Laesvuori via Bug reports for GNU Guix @ 2023-08-23 16:16 UTC (permalink / raw)
  To: Csepp; +Cc: 65460, paren, Jonas

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

> > Thanks! Adding gcc-toolchain to the profile fixed it, but shouldn't this 
> > be automatically brought in by `guix install ghc`? This does still feels 
> > like a bug to me, shouldn't gcc-toolchain be a part of ghcs native-inputs?

native-inputs are for buildtime inputs and here ghc needs a c toolchain
at runtime to compile another haskell program so gcc-toolchain should be
in "normal" inputs.

> I assume GHC can work with other toolchains, like Clang, so it's better
> to be explicit about what you want to use.

I think it would still be good to have a c toolchain as an input. Guix
packages are, if I understand correctly, supposed to work without having
to explicitly install their dependencies. If someone wants to use a
different c toolchain than the default, they can use a package
transformation to change it.

Maybe we could even have the current ghc as a hidden package and have
the public package wrap the hidden ghc adding gcc-toolchain to it's
environment, so that changing the c toolchain wouldn't require
rebuilding ghc.

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

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

* bug#65460: ghc/ghci are broken
  2023-08-23 10:39   ` Jonas via Bug reports for GNU Guix
  2023-08-23 14:42     ` Csepp
@ 2023-08-24  7:01     ` paren--- via Bug reports for GNU Guix
  1 sibling, 0 replies; 8+ messages in thread
From: paren--- via Bug reports for GNU Guix @ 2023-08-24  7:01 UTC (permalink / raw)
  To: Jonas; +Cc: 65460

Jonas <jonas@moesys.no> writes:
> Thanks! Adding gcc-toolchain to the profile fixed it, but shouldn't this 
> be automatically brought in by `guix install ghc`? This does still feels 
> like a bug to me, shouldn't gcc-toolchain be a part of ghcs native-inputs?

If this is to happen, it should be a regular input, and the strings
containing the programs to invoke should be replaced with their full
/gnu/store paths.

  -- (




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

* bug#65460: ghc/ghci are broken
  2023-08-23 16:16       ` Saku Laesvuori via Bug reports for GNU Guix
@ 2023-08-29 21:07         ` Maxim Cournoyer
  2023-09-05 17:42           ` Simon Tournier
  0 siblings, 1 reply; 8+ messages in thread
From: Maxim Cournoyer @ 2023-08-29 21:07 UTC (permalink / raw)
  To: Saku Laesvuori; +Cc: 65460-done, paren, Csepp, Jonas

Hi,

Saku Laesvuori <saku@laesvuori.fi> writes:

>> > Thanks! Adding gcc-toolchain to the profile fixed it, but shouldn't this
>> > be automatically brought in by `guix install ghc`? This does still feels
>> > like a bug to me, shouldn't gcc-toolchain be a part of ghcs native-inputs?
>
> native-inputs are for buildtime inputs and here ghc needs a c toolchain
> at runtime to compile another haskell program so gcc-toolchain should be
> in "normal" inputs.
>
>> I assume GHC can work with other toolchains, like Clang, so it's better
>> to be explicit about what you want to use.
>
> I think it would still be good to have a c toolchain as an input. Guix
> packages are, if I understand correctly, supposed to work without having
> to explicitly install their dependencies. If someone wants to use a
> different c toolchain than the default, they can use a package
> transformation to change it.
>
> Maybe we could even have the current ghc as a hidden package and have
> the public package wrap the hidden ghc adding gcc-toolchain to it's
> environment, so that changing the c toolchain wouldn't require
> rebuilding ghc.

For building tools requiring a compiler, the current expectation across
Guix packages is that the user provides the one it wants.  Even if using
GCC, you may want to use a different version, and rebuilding GHC just to
do so is... expensive.

I'm closing, but if you'd like this to be further discussed you could
start a thread on guix-devel.

-- 
Thanks,
Maxim




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

* bug#65460: ghc/ghci are broken
  2023-08-29 21:07         ` Maxim Cournoyer
@ 2023-09-05 17:42           ` Simon Tournier
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Tournier @ 2023-09-05 17:42 UTC (permalink / raw)
  To: Maxim Cournoyer, Saku Laesvuori; +Cc: 65460-done, paren, Csepp, Jonas

Hi Maxim,

On Tue, 29 Aug 2023 at 17:07, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

> For building tools requiring a compiler, the current expectation across
> Guix packages is that the user provides the one it wants.  Even if using
> GCC, you may want to use a different version, and rebuilding GHC just to
> do so is... expensive.

Well, I have a patch series somewhere on my disk that adds ghc-toolchain
and hides ghc, similarly as gcc-toolchain.  Somehow, I think that, “guix
shell ghc-toolchain” should just work out-of-the-box.  And the
replacement of the C toolchain would be done with the package
transformation with-c-toolchain.

Bah, the series needs polishing…  arf!

Cheers,
simon




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

end of thread, other threads:[~2023-09-05 19:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 22:57 bug#65460: ghc/ghci are broken Jonas via Bug reports for GNU Guix
2023-08-23  5:14 ` paren--- via Bug reports for GNU Guix
2023-08-23 10:39   ` Jonas via Bug reports for GNU Guix
2023-08-23 14:42     ` Csepp
2023-08-23 16:16       ` Saku Laesvuori via Bug reports for GNU Guix
2023-08-29 21:07         ` Maxim Cournoyer
2023-09-05 17:42           ` Simon Tournier
2023-08-24  7:01     ` paren--- via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).