From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EOTcHztCa2JmTAAAbAwnHQ (envelope-from ) for ; Fri, 29 Apr 2022 03:41:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SDgFIDtCa2LqWgEAauVa8A (envelope-from ) for ; Fri, 29 Apr 2022 03:41:15 +0200 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 C852BD284 for ; Fri, 29 Apr 2022 03:41:11 +0200 (CEST) Received: from localhost ([::1]:38010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkFd8-0004kk-70 for larch@yhetil.org; Thu, 28 Apr 2022 21:41:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkFd0-0004ka-FW for bug-guix@gnu.org; Thu, 28 Apr 2022 21:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkFd0-0003OL-6x for bug-guix@gnu.org; Thu, 28 Apr 2022 21:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nkFd0-0001Yr-2i for bug-guix@gnu.org; Thu, 28 Apr 2022 21:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55178: ghc cannot find libraries of ghc-comonad Resent-From: Christoph Schumacher Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 29 Apr 2022 01:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55178 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 55178@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16511964335958 (code B ref -1); Fri, 29 Apr 2022 01:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Apr 2022 01:40:33 +0000 Received: from localhost ([127.0.0.1]:50355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkFcQ-0001Xs-0f for submit@debbugs.gnu.org; Thu, 28 Apr 2022 21:40:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:47076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkFcJ-0001Xf-5D for submit@debbugs.gnu.org; Thu, 28 Apr 2022 21:40:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkFcI-0004dO-6d for bug-guix@gnu.org; Thu, 28 Apr 2022 21:40:18 -0400 Received: from mx1.hrz.uni-dortmund.de ([129.217.128.51]:45745 helo=unimail.uni-dortmund.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkFcE-0002tI-7j for bug-guix@gnu.org; Thu, 28 Apr 2022 21:40:17 -0400 Received: from hermes.mathematik.tu-dortmund.de (hermes.mathematik.tu-dortmund.de [129.217.151.250]) by unimail.uni-dortmund.de (8.17.1.9/8.17.1) with ESMTPS id 23T1d3DW001363 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 29 Apr 2022 03:39:08 +0200 (CEST) Received: from webmail.mathematik.tu-dortmund.de (webmail.mathematik.tu-dortmund.de [129.217.151.35]) by hermes.mathematik.tu-dortmund.de (Postfix) with ESMTPA id 8F74830C2D59 for ; Fri, 29 Apr 2022 03:39:03 +0200 (CEST) MIME-Version: 1.0 Date: Fri, 29 Apr 2022 03:39:03 +0200 From: Christoph Schumacher Mail-Reply-To: christoph.schumacher@mathematik.tu-dortmund.de Message-ID: <27d96a4a345b1d66cb4108dbfa27e79e@mathematik.tu-dortmund.de> X-Sender: christoph.schumacher@mathematik.tu-dortmund.de User-Agent: Roundcube Webmail/1.3.16 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=129.217.128.51; envelope-from=christoph.schumacher@mathematik.tu-dortmund.de; helo=unimail.uni-dortmund.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: christoph.schumacher@mathematik.tu-dortmund.de Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651196474; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=wQjR07925pYl5TUdoaZYwU24n6nNs5/NGapEwG7Z43c=; b=PdHHTUN4ruoGWgpyZBUaLJZuAwW8niy0Syoiqq2BU1OPTCKxTUoHVNr8SRl6uBySYipos5 yvcuLIzkW3OP91Rs2QvuzCxzQnDDh8hsm0/En9GYpZUZu2vrN4wlQgB57YuBGssGeMyR46 rZmyMR7kf0LqV1Vku+bfycwZeBSFn+ZVRXk/7/NPW/AF7eDYXhzhecJhIR9zhYCsVOTnnM 8HGeBbxq0b7bXko13Fd4CwYjNsfRwAoP4QGkXakfzUlJZ1Lm+DfmDaZOHNLLFEBlqjLd2f 1lPMjMCZeYhVnSjiJ+5+eMqIcWiKBeRmo0iRCA/4LoejOEwr1JslaPGK8AnhVQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651196474; a=rsa-sha256; cv=none; b=ia8YEJqDISlbyWzf9aGYjmrZkYm0QbKoPXAGwH2Qwp36OVJc4M5f28t2+1oaHFqWF8rX0Z qELjhIpFxx9maRzI5Lvh3pjAtAER4v2eEcFzECK/ebo+0BDUb+hYJQ21eLRHIKaDooz84e GcsQ3/l1H2vYiuR73wphEletMhGCtPlfxr1ZrxAPdJXBhCxQWrYteNddLnbb37EPVFSEzx qWv0z0+pFZ86OsXZjjj9SiP85D+gVW8FV4RBEHZsoZlfspyrkEgG9A6FFqAtkTIFX65fzB TXBGK9KUTmiSS5mlq+XSF3Xop2VPZGxn5mcxmfpa+G54xw1o4pBkDchH/X5taQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.40 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C852BD284 X-Spam-Score: -3.40 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4gC4Awi0XgJi I found several bugs with the ghc and ghc-comonad packages: - ghc needs gcc-toolchain in order to work. This has already been reported: https://issues.guix.gnu.org/32131 and https://issues.guix.gnu.org/34850 - In the store, ghc-libraries seem to have the version appended to their name. The linker does not know this and cannot find the libraries. - I created soft links with the names ghc expects in the current working directory and extended LIBRARY_PATH to include the current working directory. Then linking succeeds. - But the executable again fails to find the libraries. It knows about the appended version strings, but it cannot find the files anyway. So I created more soft links, and now the simple test program runs. - But as soon as I try to use a Comonad, the executable crashes. Here is a minimal example: > ls LinkMe.hs Main.hs > cat LinkMe.hs import Control.Comonad main = putStrLn "Congratulations!" > guix shell --pure ghc ghc-comonad -- ghc LinkMe.hs [1 of 1] Compiling Main ( LinkMe.hs, LinkMe.o ) : error: Warning: Couldn't figure out C compiler information! Make sure you're using GNU gcc, or clang ghc: could not execute: gcc > guix shell --pure ghc ghc-comonad gcc-toolchain -- ghc LinkMe.hs [1 of 1] Compiling Main ( LinkMe.hs, LinkMe.o ) Linking LinkMe ... ld: cannot find -lHScomonad-5.0.8-KDPzf2kORSz9Qeif8nQH6d ld: cannot find -lHStransformers-compat-0.6.6-9ADqfwGTALm8Nq2ZeUpa4p ld: cannot find -lHSindexed-traversable-0.1.1-Dfr00dUbJtB3rFEVdhtcE9 ld: cannot find -lHSdistributive-0.6.2.1-L7rr3EplzD03NITUnJxmCO ld: cannot find -lHStagged-0.8.6.1-EiQY3za6Q5HE9cdvqupke2 ld: cannot find -lHSbase-orphans-0.8.5-Iz1X6ZIULaHC76vf03czEu collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) > ln -s > /gnu/store/7xfvafaxbpc88bjmvijg38pr8djjx465-ghc-base-orphans-0.8.5/lib/x86_64-linux-ghc-8.10.7/libHSbase-orphans-0.8.5-Iz1X6ZIULaHC76vf03czEu-ghc8.10.7.so > libHSbase-orphans-0.8.5-Iz1X6ZIULaHC76vf03czEu.so > ln -s > /gnu/store/rjkyixykafdhbf67aa3zlhappxl1dgai-ghc-comonad-5.0.8/lib/x86_64-linux-ghc-8.10.7/libHScomonad-5.0.8-KDPzf2kORSz9Qeif8nQH6d-ghc8.10.7.so > libHScomonad-5.0.8-KDPzf2kORSz9Qeif8nQH6d.so > ln -s > /gnu/store/4jfs13lg5g93ssbfdr4hqqadw2iadir7-profile/lib/x86_64-linux-ghc-8.10.7/libHSdistributive-0.6.2.1-L7rr3EplzD03NITUnJxmCO-ghc8.10.7.so > libHSdistributive-0.6.2.1-L7rr3EplzD03NITUnJxmCO.so > ln -s > /gnu/store/4jfs13lg5g93ssbfdr4hqqadw2iadir7-profile/lib/x86_64-linux-ghc-8.10.7/libHSindexed-traversable-0.1.1-Dfr00dUbJtB3rFEVdhtcE9-ghc8.10.7.so > libHSindexed-traversable-0.1.1-Dfr00dUbJtB3rFEVdhtcE9.so > ln -s > /gnu/store/4jfs13lg5g93ssbfdr4hqqadw2iadir7-profile/lib/x86_64-linux-ghc-8.10.7/libHStagged-0.8.6.1-EiQY3za6Q5HE9cdvqupke2-ghc8.10.7.so > libHStagged-0.8.6.1-EiQY3za6Q5HE9cdvqupke2.so > ln -s > /gnu/store/4jfs13lg5g93ssbfdr4hqqadw2iadir7-profile/lib/x86_64-linux-ghc-8.10.7/libHStransformers-compat-0.6.6-9ADqfwGTALm8Nq2ZeUpa4p-ghc8.10.7.so > libHStransformers-compat-0.6.6-9ADqfwGTALm8Nq2ZeUpa4p.so > guix shell --pure ghc ghc-comonad gcc-toolchain coreutils -- env > LIBRARY_PATH=$LIBRARY_PATH:. ghc LinkMe.hs Linking LinkMe ... > ./LinkMe ./LinkMe: error while loading shared libraries: libHScomonad-5.0.8-KDPzf2kORSz9Qeif8nQH6d-ghc8.10.7.so: cannot open shared object file: No such file or directory > ln -s > /gnu/store/rjkyixykafdhbf67aa3zlhappxl1dgai-ghc-comonad-5.0.8/lib/x86_64-linux-ghc-8.10.7/libHScomonad-5.0.8-KDPzf2kORSz9Qeif8nQH6d-ghc8.10.7.so > ./ > ./LinkMe ./LinkMe: error while loading shared libraries: libHStransformers-compat-0.6.6-9ADqfwGTALm8Nq2ZeUpa4p-ghc8.10.7.so: cannot open shared object file: No such file or directory > ln -s > /gnu/store/4jfs13lg5g93ssbfdr4hqqadw2iadir7-profile/lib/x86_64-linux-ghc-8.10.7/libHStransformers-compat-0.6.6-9ADqfwGTALm8Nq2ZeUpa4p-ghc8.10.7.so > ./ > ./LinkMe ./LinkMe: error while loading shared libraries: libHSindexed-traversable-0.1.1-Dfr00dUbJtB3rFEVdhtcE9-ghc8.10.7.so: cannot open shared object file: No such file or directory > ln -s > /gnu/store/4jfs13lg5g93ssbfdr4hqqadw2iadir7-profile/lib/x86_64-linux-ghc-8.10.7/libHSindexed-traversable-0.1.1-Dfr00dUbJtB3rFEVdhtcE9-ghc8.10.7.so > ./ ./LinkMe ./LinkMe: error while loading shared libraries: libHSdistributive-0.6.2.1-L7rr3EplzD03NITUnJxmCO-ghc8.10.7.so: cannot open shared object file: No such file or directory > ln -s > /gnu/store/4jfs13lg5g93ssbfdr4hqqadw2iadir7-profile/lib/x86_64-linux-ghc-8.10.7/libHSdistributive-0.6.2.1-L7rr3EplzD03NITUnJxmCO-ghc8.10.7.so > ./ > ./LinkMe ./LinkMe: error while loading shared libraries: libHStagged-0.8.6.1-EiQY3za6Q5HE9cdvqupke2-ghc8.10.7.so: cannot open shared object file: No such file or directory > ln -s > /gnu/store/4jfs13lg5g93ssbfdr4hqqadw2iadir7-profile/lib/x86_64-linux-ghc-8.10.7/libHStagged-0.8.6.1-EiQY3za6Q5HE9cdvqupke2-ghc8.10.7.so > ./ > ./LinkMe ./LinkMe: error while loading shared libraries: libHSbase-orphans-0.8.5-Iz1X6ZIULaHC76vf03czEu-ghc8.10.7.so: cannot open shared object file: No such file or directory > ln -s > /gnu/store/7xfvafaxbpc88bjmvijg38pr8djjx465-ghc-base-orphans-0.8.5/lib/x86_64-linux-ghc-8.10.7/libHSbase-orphans-0.8.5-Iz1X6ZIULaHC76vf03czEu-ghc8.10.7.so > ./ > ./LinkMe Congratulations! > cat Main.hs {-# LANGUAGE DeriveFunctor #-} import Control.Comonad (Comonad(..), extend) data C a = C a deriving (Show, Functor) instance Comonad C where extract (C a) = a duplicate x = C x main :: IO () main = print $ extend id (C 0) > guix shell --pure ghc ghc-comonad gcc-toolchain coreutils -- env > LIBRARY_PATH=$LIBRARY_PATH:. ghc Main.hs [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... > guix shell --pure ghc ghc-comonad gcc-toolchain coreutils -- env > LIBRARY_PATH=$LIBRARY_PATH:. ./Main Main: internal error: stg_ap_p_ret (GHC version 8.10.7 for x86_64_unknown_linux) Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug