[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compile
From: |
zimoun |
Subject: |
Re: compile |
Date: |
Mon, 02 May 2022 22:21:22 +0200 |
Hi Mario,
On Mon, 02 May 2022 at 19:04, marioBB <marJobb@protonmail.com> wrote:
> I used manifest file with:
>
> (specifications->manifest
> '("ghc@8.10.7"
> "ghc-zstd"))
>
> $ guix shell
[...]
> Loaded package environment from
> /home/ms/.ghc/x86_64-linux-8.10.7/environments/default
> <command line>: cannot satisfy -package zstd
> (use -v for more information)
Well, I do not know what is wrong with your Guix config but something is
wrong. I guess you installed Haskell packages via another method
(stack?) and they are in ~/.ghc; and I guess ztsd is not part of the
ones you installed via this very method. ;-)
If you run ’guix shell --pure’ or ’cp Source.hs /tmp/; cp guix.scm
/tmp/; cd /tmp; guix shell -C -- ghc Source’, then you will see.
For instance, consider the snippet:
--8<---------------cut here---------------start------------->8---
$ cat Source.hs
import Codec.Compression.Zstd
main = pure ()
$ guix shell ghc ghc-zstd -C -- ghc Source
[1 of 1] Compiling Main ( Source.hs, Source.o )
<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
--8<---------------cut here---------------end--------------->8---
Well, contrary to ’haskell-platform’ which provides a ready-to-use
computational environment, it is not the case with Guix. Something to
improve. :-)
As you see, it also requires ’gcc-toolchain’. However, I get,
--8<---------------cut here---------------start------------->8---
$ guix shell ghc ghc-zstd -C gcc-toolchain -- ghc Source
[1 of 1] Compiling Main ( Source.hs, Source.o )
Linking Source ...
ld: cannot find -lHSzstd-0.1.3.0-4d3LhFnhVBND893zIj2UnM
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
--8<---------------cut here---------------end--------------->8---
which is unexpected. I do not know what could be wrong.
Sorry, it does not help. :-(
Cheers,
simon