From: Timothy Sample <samplet@ngyro.com>
To: "Jakub Kądziołka" <kuba@kadziolka.net>
Cc: help-guix@gnu.org
Subject: Re: Using Haskell library packages - linker error
Date: Mon, 07 Sep 2020 13:36:50 -0400 [thread overview]
Message-ID: <878sdlpjyl.fsf@ngyro.com> (raw)
In-Reply-To: <20200907152902.x73pun4546wbcnfo@gravity> ("Jakub Kądziołka"'s message of "Mon, 7 Sep 2020 17:29:02 +0200")
Jakub Kądziołka <kuba@kadziolka.net> writes:
> On Mon, Sep 07, 2020 at 09:50:51AM -0400, Timothy Sample wrote:
>
>> GHC needs a special flag to link shared libraries. We recently starting
>> building shared libraries for our Haskell packages. The static ones are
>> still being built, but they go to a separate output. I think you can
>> fix your problem in one of two ways:
>>
>> 1. Pass the “-dynamic” flag to GHC (and maybe “-fPIC”);
>> 2. Use “ghc-ieee754:static”.
>
> ghc-ieee754:static doesn't seem to exist, [...]
Right. It does exist, but it’s hidden from the Guix UI. This is a
result of the finicky way the output is added.
> [...] but passing -dynamic does indeed work. The workaround also
> translates to Agda, with
>
> $ agda --ghc-flag=-dynamic --compile hello-world.agda
Cool. That’s good to know.
> I'd really rather this wasn't necessary, though. I can already imagine
> having to figure out how to pass this flag to agda through build systems
> and editor plugins.
Absolutely. I’ve done some of that work on our more complicated Haskell
packages, and it can get a little tricky. To be honest, I’m not sure
how to move forward. I know that Arch takes a similar approach to
packaging Haskell libraries, but I don’t know how they manage the
experience.
> On a related note, shouldn't it be possible to use agda without
> specifying ghc (and transitively, gcc) in your profile?
AIUI, this is following GCC. GCC by itself doesn’t know how to find the
assembler, but the “gcc-toolchain” package manages this automatically.
Similarly, GHC doesn’t know how to find GCC, and Agda doesn’t know how
to find GHC. We might need to make “ghc-toolchain” and “agda-toolchain”
packages (this has sorta been discussed before [1, 2]).
At the end of the day, our Haskell ecosystem is in need of some more
attention. It’s really not far away from being nice, but it needs some
gentle nudges here and there.
-- Tim
[1] https://lists.gnu.org/archive/html/guix-devel/2018-08/msg00175.html
[2] https://lists.gnu.org/archive/html/guix-devel/2020-04/msg00318.html
prev parent reply other threads:[~2020-09-07 17:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-06 23:27 Using Haskell library packages - linker error Jakub Kądziołka
2020-09-07 13:50 ` Timothy Sample
2020-09-07 15:29 ` Jakub Kądziołka
2020-09-07 17:36 ` Timothy Sample [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878sdlpjyl.fsf@ngyro.com \
--to=samplet@ngyro.com \
--cc=help-guix@gnu.org \
--cc=kuba@kadziolka.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.