From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ADs4N5dSVl9PEgAA0tVLHw (envelope-from ) for ; Mon, 07 Sep 2020 15:32:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0ADeMpdSVl+gBAAAbx9fmQ (envelope-from ) for ; Mon, 07 Sep 2020 15:32:39 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 27DD3940309 for ; Mon, 7 Sep 2020 15:32:39 +0000 (UTC) Received: from localhost ([::1]:43722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFJ8H-0001Od-5p for larch@yhetil.org; Mon, 07 Sep 2020 11:32:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFJ4z-0006Bc-80 for help-guix@gnu.org; Mon, 07 Sep 2020 11:29:14 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:47622) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFJ4u-0007OI-IP for help-guix@gnu.org; Mon, 07 Sep 2020 11:29:12 -0400 Received: (qmail 7827 invoked by uid 1009); 7 Sep 2020 17:29:04 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25922. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.051584 secs); 07 Sep 2020 15:29:04 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 7 Sep 2020 17:29:04 +0200 Date: Mon, 7 Sep 2020 17:29:02 +0200 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: Timothy Sample Subject: Re: Using Haskell library packages - linker error Message-ID: <20200907152902.x73pun4546wbcnfo@gravity> References: <20200906232752.atko55zzp2pyexvz@gravity> <87eendpuf8.fsf@ngyro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nb2cgemg42vjizxc" Content-Disposition: inline In-Reply-To: <87eendpuf8.fsf@ngyro.com> Received-SPF: none client-ip=37.59.186.212; envelope-from=kuba@kadziolka.net; helo=pat.zlotemysli.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/07 11:29:04 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -2.61 X-TUID: vrDVrRm7H7PN --nb2cgemg42vjizxc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 07, 2020 at 09:50:51AM -0400, Timothy Sample wrote: > Hi Jakub, >=20 > Jakub K=C4=85dzio=C5=82ka writes: >=20 > > I am trying to set up Agda, and I have reduced it to a simpler problem: > > > > $ cat test.hs > > import Numeric.IEEE > > > > main =3D return () > > $ genv --pure --ad-hoc ghc@8.6 ghc-ieee754 gcc-toolchain > > % ghc test.hs > > Linking test ... > > ld: cannot find -lHSieee754-0.8.0-IfCS1Dp7pQVIOQRslM6kD > > collect2: error: ld returned 1 exit status > > `gcc' failed in phase `Linker'. (Exit code: 1) > > > > How can I fix this error? Am I doing something wrong, or is this a > > packaging bug? >=20 > 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: >=20 > 1. Pass the =E2=80=9C-dynamic=E2=80=9D flag to GHC (and maybe =E2=80= =9C-fPIC=E2=80=9D); > 2. Use =E2=80=9Cghc-ieee754:static=E2=80=9D. ghc-ieee754:static doesn't seem to exist, but passing -dynamic does indeed work. The workaround also translates to Agda, with $ agda --ghc-flag=3D-dynamic --compile hello-world.agda 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. On a related note, shouldn't it be possible to use agda without specifying ghc (and transitively, gcc) in your profile? Regards, Jakub K=C4=85dzio=C5=82ka --nb2cgemg42vjizxc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl9WUb4ACgkQ4xWnWEYT FWRPiQ//RpoQa0RPBQ6veQoiANHLfKyG6c13myswU+KuWT6/iS7cD0eaNyJRumvX 25x0CwcazLPThgjIwKfE6kaL+zjmyJ6sJu2NvEM18vr7q3pVgcvNyxajabOllaZ7 vTzQBu8OjtkgNMRluLhlscao6q44zSo9WmWJQfvFw6kaicwFOD+CAPl/olemWHLB xix3Di7NEqPfAuAamGtO616udAQr/tyxoDfnsa0xrFBmzrBvt+qS52aFy7Vh8o0P /DZ8W7+ltxWaJjXKIAbrZCbpevL4Zgw0WI7O46RneW4mqYCOziYsZHfYvA9qyGUJ r8UBeEq0WI6B83Q4eI9jWIcTGq0hy8FDvxCGUlWXnnfFhh1SPeP6jmBP35mV41Ge hUDmZUQdYClOkkHBgJA75zjsuGHdnFmt/ctpdbEIar0cO5UiSSAUCx8BcHRLt/kH GL/Rb/swJZMzd48oedHvRfrMp0Y6K9TkhtLIYtzAK+AnmOcFQWlKpPBG6miVfs4V 8LXcodowNw4qFFW1rl7wBl6s3xbeOm8pRY0NxoDcG/rNGy2jManjBlWP3JTOvTDh OEXOY0sDCyRunwFADhSta5cf0xCqVg6ufhAsmCD4WHNdaTjIXj/0OSMlnXfxfG0A 6B7YfVulA9sjYTfkXHe8MeXTfKcobe/VGgubV6ljuLY0Ij40CWA= =EXi7 -----END PGP SIGNATURE----- --nb2cgemg42vjizxc--