bug#65460: ghc/ghci are broken
Hi Maxim, On Tue, 29 Aug 2023 at 17:07, Maxim Cournoyer 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
bug#65460: ghc/ghci are broken
Hi, Saku Laesvuori 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
bug#65460: ghc/ghci are broken
Jonas 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. -- (
bug#65460: ghc/ghci are broken
> > 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. signature.asc Description: PGP signature
bug#65460: ghc/ghci are broken
Jonas via Bug reports for GNU Guix 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 ... > > : 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 writes: >>> And compiling a hello-world program with ghc gives me: >>> >>> [1 of 1] Compiling Main ( hello.hs, hello.o ) >>> >>> : 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.
bug#65460: ghc/ghci are broken
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 ... : 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 writes: >> And compiling a hello-world program with ghc gives me: >> >> [1 of 1] Compiling Main ( hello.hs, hello.o ) >> >> : 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? > > -- (
bug#65460: ghc/ghci are broken
Jonas via Bug reports for GNU Guix writes: > And compiling a hello-world program with ghc gives me: > > [1 of 1] Compiling Main ( hello.hs, hello.o ) > > : 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? -- (
bug#65460: ghc/ghci are broken
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 ) : error: Warning: Couldn't figure out C compiler information! Make sure you're using GNU gcc, or clang