From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EJ52K7yEyl7ETQAA0tVLHw (envelope-from ) for ; Sun, 24 May 2020 14:29:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eFpRJ7yEyl4+FQAA1q6Kng (envelope-from ) for ; Sun, 24 May 2020 14:29:16 +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 95779940B2B for ; Sun, 24 May 2020 14:29:15 +0000 (UTC) Received: from localhost ([::1]:48796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcrco-0007VO-JP for larch@yhetil.org; Sun, 24 May 2020 10:29:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcrcc-0007Ry-DA for bug-guix@gnu.org; Sun, 24 May 2020 10:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55113) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcrcc-0007Ie-3K for bug-guix@gnu.org; Sun, 24 May 2020 10:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcrcc-0007rm-15 for bug-guix@gnu.org; Sun, 24 May 2020 10:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41508: GHC retains references to Perl, GCC, and others Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 24 May 2020 14:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41508 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 41508@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159033052730216 (code B ref -1); Sun, 24 May 2020 14:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2020 14:28:47 +0000 Received: from localhost ([127.0.0.1]:38426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcrcE-0007r8-3w for submit@debbugs.gnu.org; Sun, 24 May 2020 10:28:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:49932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcrcC-0007r1-Gv for submit@debbugs.gnu.org; Sun, 24 May 2020 10:28:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcrc8-0006or-Bq for bug-guix@gnu.org; Sun, 24 May 2020 10:28:35 -0400 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21322) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jcrc3-0007DN-21 for bug-guix@gnu.org; Sun, 24 May 2020 10:28:32 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1590330504; cv=none; d=zohomail.com; s=zohoarc; b=DnZhZ+d6uQgmEKLsiWy/Bm/d1Et3278gaTw9J5DtifwEUt08njHUPTUxR+urYVCnBPy/R5T+mTNjDA+bngQ7uMTD4engvhFFSh++sD+SWL9ixaZcD5/5juXaj/eYa3mmd5ximcJK0n7q5rfCXBFMAaDcgelQB0fqHG9wx3Iv8xI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590330504; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=q8VRw/8F4DiJ44WNyarEs9XIDQXGRVT3mpZI2wghPPA=; b=KY5fo6AOUW/E9bGYDpadYBZhy3ssaeonCBFVwZQ/soG/KIaFoR7NjHAJvuFlXfKl5XTjD1P31du00n11ztwW5ButDwYNrIZvBbqMV2enOWM+hgCT6Sx+3DlU8rPZbIgxdcj3jhgYnBMrC1GbP3IrJvULYHGJZnPZe/WH6tyMttk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1590330504; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=q8VRw/8F4DiJ44WNyarEs9XIDQXGRVT3mpZI2wghPPA=; b=I6+klvHBn0N6HdX0bbUlqNquBBMaZCfARzOYxRPzgHrgcKw7HoN4BhOkxLukVrd8 wKQCPRjEY8crecFO5enwe+7Xrpjtsgg3bOrfX1MQvdCMXCK42zxjDBKH1TsRnl1sqg5 qqmAlc0iDsTS4CPHZUgcFWXNCmI1prWVFxPoeH4U= Received: from localhost (p54ad47fe.dip0.t-ipconnect.de [84.173.71.254]) by mx.zohomail.com with SMTPS id 1590330501617301.73975174022087; Sun, 24 May 2020 07:28:21 -0700 (PDT) User-agent: mu4e 1.4.4; emacs 26.3 From: Ricardo Wurmus X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Sun, 24 May 2020 16:28:18 +0200 Message-ID: <874ks5csql.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.53; envelope-from=rekado@elephly.net; helo=sender4-of-o53.zoho.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/24 10:28:25 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=elephly.net header.s=zoho header.b=I6+klvHB; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 3.49 X-TUID: 06ZIElttJNAp GHC installs a lib/settings file with references to build-time tools, such as Perl, GCC, and others. I tried building with a phase that removed those references: (match (find-files (string-append (assoc-ref outputs "out") "/lib") "settings") ((settings) (remove-store-references settings)) (_ #f)) Unfortunately, this breaks all Haskell packages as GHC always first tries to set up its build environment. Any Haskell package=E2=80=99s confi= gure phase fails as GHC fails to find GCC. It seems to me that the only way around this is to patch GHC to allow looking up of GCC and Perl through environment variables, but perhaps this is unrealistic. For comparison, this is the size of the broken GHC: --8<---------------cut here---------------start------------->8--- $ guix size /gnu/store/x2rv5wz3d9z35p93sjv42gxs34y18ky3-ghc-8.6.5 store item total s= elf /gnu/store/x2rv5wz3d9z35p93sjv42gxs34y18ky3-ghc-8.6.5 1639.2 1= 358.0 82.8% /gnu/store/g8x8isxfg7in2w4jrmmh9r4zb9c8vfwn-ghc-8.6.5-doc 165.7 = 126.3 7.7% /gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2 146.2 = 57.1 3.5% /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31 38.4 = 36.7 2.2% /gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib 71.0 = 32.6 2.0% /gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32 88.0 = 17.0 1.0% /gnu/store/zzkly5rbfvahwqgcs7crz0ilpi7x5g5p-ncurses-6.2 76.9 = 5.9 0.4% /gnu/store/35afkywncrr5xsb4cxcljf6rpjcb7f61-gmp-6.2.0 73.8 = 2.7 0.2% /gnu/store/mmhimfwmmidf09jw1plw3aw1g1zn2nkh-bash-static-5.0.16 1.6 = 1.6 0.1% /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16 39.4 = 1.0 0.1% /gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3 71.2 = 0.2 0.0% total: 1639.2 MiB --8<---------------cut here---------------end--------------->8--- and this is the size of the unpatched GHC: --8<---------------cut here---------------start------------->8--- $ guix size $(guix build ghc) store item total s= elf /gnu/store/vdwkplh23jr54bg9mqvym26l8fv6x6kw-ghc-8.6.5 1862.1 1= 346.9 72.3% /gnu/store/6yx0cw49561iyikkvb37hd0li6hkcg8z-ghc-8.6.5-doc 176.7 = 137.3 7.4% /gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0 178.5 = 107.3 5.8% /gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2 146.2 = 57.1 3.1% /gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34 93.0 = 54.6 2.9% /gnu/store/0m0vd873jp61lcm4xa3ljdgx381qa782-guile-3.0.2 132.8 = 53.2 2.9% /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31 38.4 = 36.7 2.0% /gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib 71.0 = 32.6 1.8% /gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32 88.0 = 17.0 0.9% /gnu/store/zzkly5rbfvahwqgcs7crz0ilpi7x5g5p-ncurses-6.2 76.9 = 5.9 0.3% /gnu/store/35afkywncrr5xsb4cxcljf6rpjcb7f61-gmp-6.2.0 73.8 = 2.7 0.1% /gnu/store/6fvqsjy4m5zbkipwh8grv94snlhnsnag-gmp-6.2.0 73.8 = 2.7 0.1% /gnu/store/rip41jax9swcx356sj43h5xqads9fih5-libunistring-0.9.10 73.4 = 2.4 0.1% /gnu/store/mmhimfwmmidf09jw1plw3aw1g1zn2nkh-bash-static-5.0.16 1.6 = 1.6 0.1% /gnu/store/58aqsgnc8sz70zkqp6ad9k72s7vy2fk5-pkg-config-0.29.2 72.3 = 1.3 0.1% /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16 39.4 = 1.0 0.1% /gnu/store/hg5z55cy28qxq3v2s9d9lw6dkhyfya84-libgc-8.0.4 71.8 = 0.8 0.0% /gnu/store/g2s5jfkfd4k973wb58476b1bbv9zpm6m-zlib-1.2.11 38.6 = 0.2 0.0% /gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3 71.2 = 0.2 0.0% /gnu/store/vd0876ky3ip8zgl5m15l23vqnpqx7y5v-libffi-3.3 71.2 = 0.2 0.0% /gnu/store/vv9j7pi05daplyv61jv9yhj5vpmn0p2n-libltdl-2.4.6 71.2 = 0.2 0.0% /gnu/store/mpa04aq8lblbcviyxywxcsb1zbi0mf39-ld-wrapper-0 187.5 = 0.1 0.0% total: 1862.1 MiB --8<---------------cut here---------------end--------------->8--- This is what the settings file looks like: --8<---------------cut here---------------start------------->8--- [("GCC extra via C opts", " -fwrapv -fno-builtin"), ("C compiler command", "/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.= 5.0/bin/gcc"), ("C compiler flags", " -fno-stack-protector"), ("C compiler link flags", " "), ("C compiler supports -no-pie", "YES"), ("Haskell CPP command","/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.= 5.0/bin/gcc"), ("Haskell CPP flags","-E -undef -traditional"), ("ld command", "/gnu/store/mpa04aq8lblbcviyxywxcsb1zbi0mf39-ld-wrapper-0/b= in/ld"), ("ld flags", ""), ("ld supports compact unwind", "YES"), ("ld supports build-id", "YES"), ("ld supports filelist", "NO"), ("ld is GNU ld", "YES"), ("ar command", "/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/= bin/ar"), ("ar flags", "q"), ("ar supports at file", "YES"), ("ranlib command", "/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2= .34/bin/ranlib"), ("touch command", "touch"), ("dllwrap command", "/bin/false"), ("windres command", "/bin/false"), ("libtool command", "libtool"), ("perl command", "/gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/= bin/perl"), ("cross compiling", "NO"), ("target os", "OSLinux"), ("target arch", "ArchX86_64"), ("target word size", "8"), ("target has GNU nonexec stack", "True"), ("target has .ident directive", "True"), ("target has subsections via symbols", "False"), ("target has RTS linker", "YES"), ("Unregisterised", "NO"), ("LLVM llc command", "llc"), ("LLVM opt command", "opt"), ("LLVM clang command", "clang") ] --8<---------------cut here---------------end--------------->8--- --=20 Ricardo