Subject: bug#65460: closed (Re: bug#65460: ghc/ghci are broken)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 29 Aug 2023 21:09:01 +0000

Your bug report

#65460: ghc/ghci are broken

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
65460: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65460
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#65460: ghc/ghci are broken
From: Maxim Cournoyer <[email-masked]>
To: Saku Laesvuori <[email-masked]>
Cc: [email-masked], [email-masked], Csepp <[email-masked]>, Jonas <[email-masked]>
Date: Tue, 29 Aug 2023 17:07:44 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Saku Laesvuori <[email-masked]> 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

Subject: ghc/ghci are broken
From: Jonas <[email-masked]>
To: [email-masked]
Date: Tue, 22 Aug 2023 22:57:37 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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