From unknown Sat Aug 16 16:09:37 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#47921 <47921@debbugs.gnu.org> To: bug#47921 <47921@debbugs.gnu.org> Subject: Status: [PATCH] build: Fix elf-dynamic-info-soname. Reply-To: bug#47921 <47921@debbugs.gnu.org> Date: Sat, 16 Aug 2025 23:09:37 +0000 retitle 47921 [PATCH] build: Fix elf-dynamic-info-soname. reassign 47921 guix-patches submitter 47921 Dion Mendel severity 47921 normal tag 47921 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 20 16:56:20 2021 Received: (at submit) by debbugs.gnu.org; 20 Apr 2021 20:56:21 +0000 Received: from localhost ([127.0.0.1]:56174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYxPw-0002Jb-HL for submit@debbugs.gnu.org; Tue, 20 Apr 2021 16:56:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:59462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYwIc-0006sw-I1 for submit@debbugs.gnu.org; Tue, 20 Apr 2021 15:44:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYwIc-0008WE-A0 for guix-patches@gnu.org; Tue, 20 Apr 2021 15:44:42 -0400 Received: from donkey.elm.relay.mailchannels.net ([23.83.212.49]:51511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYwIZ-00078W-Ac for guix-patches@gnu.org; Tue, 20 Apr 2021 15:44:41 -0400 X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 74EC83421B7 for ; Tue, 20 Apr 2021 19:44:34 +0000 (UTC) Received: from pdx1-sub0-mail-a33.g.dreamhost.com (100-96-17-224.trex.outbound.svc.cluster.local [100.96.17.224]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0C22A3421E9 for ; Tue, 20 Apr 2021 19:44:34 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from pdx1-sub0-mail-a33.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.17.224 (trex/6.1.1); Tue, 20 Apr 2021 19:44:34 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|smtp@dm9.info X-MailChannels-Auth-Id: dreamhost X-Well-Made-Cold: 48a0c264219079fb_1618947874251_2891751553 X-MC-Loop-Signature: 1618947874250:1733234350 X-MC-Ingress-Time: 1618947874250 Received: from pdx1-sub0-mail-a33.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a33.g.dreamhost.com (Postfix) with ESMTP id B5F0B8289F for ; Tue, 20 Apr 2021 12:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=dm9.info; h=date:from:to :subject:message-id:mime-version:content-type; s=dm9.info; bh=U6 2LK1IxP+Cgs+qmJVmG31yU/9g=; b=CAT05WLKExM5wBEmi3OlgLkrNmyX2ZqrLO QKzNaNCAN0qgSPggvAqyOnn9CcUnnBcfk9stmGJ3JvnbPEmoL4X49E00B0/zqZo/ e2PkzkJuMu5YDQqDvWrJbWDyXgsf9XYcFAQySSRDVMcwdWyrQM4UnCUhi90mp7qm JwoEWbMzA= Received: from mail.localdomain (61-245-140-70.3df58c.per.nbn.aussiebb.net [61.245.140.70]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: smtp@dm9.info) by pdx1-sub0-mail-a33.g.dreamhost.com (Postfix) with ESMTPSA id 75AB57F08C for ; Tue, 20 Apr 2021 12:44:33 -0700 (PDT) Received: by mail.localdomain (Postfix, from userid 2001) id 7BC814FEE07; Wed, 21 Apr 2021 03:44:29 +0800 (AWST) Date: Wed, 21 Apr 2021 03:44:29 +0800 X-DH-BACKEND: pdx1-sub0-mail-a33 From: Dion Mendel To: guix-patches@gnu.org Subject: [PATCH] build: Fix elf-dynamic-info-soname. Message-ID: <20210420194429.GB29387@dm9.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Received-SPF: none client-ip=23.83.212.49; envelope-from=guix@dm9.info; helo=donkey.elm.relay.mailchannels.net 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 20 Apr 2021 16:56:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/build/gremlin.scm (elf-dynamic-info-soname): Return the value of the dynamic-entry instead of the dynamic-entry record itself. --- guix/build/gremlin.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm index e8ea66dfb3..4a31c3cfaf 100644 --- a/guix/build/gremlin.scm +++ b/guix/build/gremlin.scm @@ -215,7 +215,10 @@ string table if the type is a string." (#f #f) ((? elf-segment? dynamic) (let ((entries (dynamic-entries elf dynamic))) - (%elf-dynamic-info (find (matching-entry DT_SONAME) entries) + (%elf-dynamic-info (or (and=> (find (matching-entry DT_SONAME) + entries) + dynamic-entry-value) + #f) (filter-map (lambda (entry) (and (= (dynamic-entry-type entry) DT_NEEDED) -- 2.31.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 20 22:47:00 2021 Received: (at 47921) by debbugs.gnu.org; 21 Apr 2021 02:47:00 +0000 Received: from localhost ([127.0.0.1]:56551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZ2tI-0002qS-4l for submit@debbugs.gnu.org; Tue, 20 Apr 2021 22:47:00 -0400 Received: from cyan.elm.relay.mailchannels.net ([23.83.212.47]:18413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZ2tF-0002qJ-JK for 47921@debbugs.gnu.org; Tue, 20 Apr 2021 22:46:58 -0400 X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 410ED1E258A for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 02:46:56 +0000 (UTC) Received: from pdx1-sub0-mail-a78.g.dreamhost.com (100-105-161-119.trex.outbound.svc.cluster.local [100.105.161.119]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 716C21E23E1 for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 02:46:55 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from pdx1-sub0-mail-a78.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.105.161.119 (trex/6.1.1); Wed, 21 Apr 2021 02:46:56 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|smtp@dm9.info X-MailChannels-Auth-Id: dreamhost X-Zesty-Share: 249fdbd90f408ffc_1618973216079_2431200060 X-MC-Loop-Signature: 1618973216079:3651069109 X-MC-Ingress-Time: 1618973216079 Received: from pdx1-sub0-mail-a78.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTP id 2FCEC8BC2B for <47921@debbugs.gnu.org>; Tue, 20 Apr 2021 19:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=dm9.info; h=date:from:to :subject:message-id:mime-version:content-type; s=dm9.info; bh=Qw SLmtj3V/x3fkToWU44CbkSb58=; b=1aPQKg/vHCQji1RogIPs+yjUMmOpBz5XiK 1yNcbqsleWRE+StYaGYGxQxnbPGHqiAWG8dMm2C9Ih63Y1a3HWbWANJqy+edgmF0 2KMeHKjmynGTKbUBovcXzbsUjfCKPgkVmQnSfYbionNbWZHcqxRD2T944kA77Jhi Uadz4y5oE= Received: from mail.localdomain (61-245-140-70.3df58c.per.nbn.aussiebb.net [61.245.140.70]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: smtp@dm9.info) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTPSA id E158F8B930 for <47921@debbugs.gnu.org>; Tue, 20 Apr 2021 19:46:54 -0700 (PDT) Received: by mail.localdomain (Postfix, from userid 2001) id BF4504FF0D7; Wed, 21 Apr 2021 10:46:50 +0800 (AWST) Date: Wed, 21 Apr 2021 10:46:50 +0800 X-DH-BACKEND: pdx1-sub0-mail-a78 From: Dion Mendel To: 47921@debbugs.gnu.org Subject: [bug#47921] [PATCH] build: Fix elf-dynamic-info-soname. Message-ID: <20210421024650.GA30794@dm9.info> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47921 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Oops, forgot to refactor. Replacement patch attached. Rationale: The elf-dynamic-info-soname function is currently implemented but unused. The current implementation does not work as it omits unwrapping the dynamic-entry record. This patch makes the function work as intended. --nFreZHaLTZJo0R7j Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-build-Fix-elf-dynamic-info-soname.patch" >From b15d9d708900f6713e5f40afdce66f3bb443e36b Mon Sep 17 00:00:00 2001 From: Dion Mendel Date: Wed, 21 Apr 2021 10:36:32 +0800 Subject: [PATCH] build: Fix elf-dynamic-info-soname. * guix/build/gremlin.scm (elf-dynamic-info-soname): Return the value of the dynamic-entry instead of the dynamic-entry record. --- guix/build/gremlin.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm index e8ea66dfb3..4710502426 100644 --- a/guix/build/gremlin.scm +++ b/guix/build/gremlin.scm @@ -215,7 +215,9 @@ string table if the type is a string." (#f #f) ((? elf-segment? dynamic) (let ((entries (dynamic-entries elf dynamic))) - (%elf-dynamic-info (find (matching-entry DT_SONAME) entries) + (%elf-dynamic-info (and=> (find (matching-entry DT_SONAME) + entries) + dynamic-entry-value) (filter-map (lambda (entry) (and (= (dynamic-entry-type entry) DT_NEEDED) -- 2.31.0 --nFreZHaLTZJo0R7j-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 21 07:50:00 2021 Received: (at 47921) by debbugs.gnu.org; 21 Apr 2021 11:50:00 +0000 Received: from localhost ([127.0.0.1]:57084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZBMl-0004nm-Tl for submit@debbugs.gnu.org; Wed, 21 Apr 2021 07:50:00 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:57706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZBMj-0004nd-Ld for 47921@debbugs.gnu.org; Wed, 21 Apr 2021 07:49:58 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id vPpv240070mfAB406Ppvwn; Wed, 21 Apr 2021 13:49:56 +0200 Message-ID: <76bb70d22fed27efd4a15308abdd9e95fb1aa929.camel@telenet.be> Subject: Re: [bug#47921] [PATCH] build: Fix elf-dynamic-info-soname. From: Maxime Devos To: Dion Mendel , 47921@debbugs.gnu.org Date: Wed, 21 Apr 2021 13:49:33 +0200 In-Reply-To: <20210420194429.GB29387@dm9.info> References: <20210420194429.GB29387@dm9.info> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-PedjPFlex0pO2t1JPxzw" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1619005796; bh=M0/FL7fFhk/B1cFTLVkZi7UT6RlYkLe9bHHNVl9+Gig=; h=Subject:From:To:Date:In-Reply-To:References; b=YP578Uodxz8iVa1SvuY/PjTU+8G3oNctj+/ufkfiLI1GqL3N/BFptOy3I9nOti3Sw FKSLUeNjVR1bo54vxM1kXAtEVvjnfDLv/UdCfjLjCe1ngul2QAD+8l6kGadLjKNTIL 9vIg9jLoqN4N22G6bzujx2t5F/ANV1VWan+sHTQ5My1RtWyMtzfKruFTWBp/D93yVH PA5irn/tG26i54xZIb9m8TfphKWmugU2Ckuw4V4/8/jmK9uNUAbUmXUuR2PWd9sWk+ bsuiX8Cuc7KyYqivps9OD69GKGRyqFuCr/DCkvIbma4kS/fd5fFCPk3v9+19AuspOF FGp4eSWkJjU+A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47921 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-PedjPFlex0pO2t1JPxzw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dion Mendel schreef op wo 21-04-2021 om 03:44 [+0800]: > * guix/build/gremlin.scm (elf-dynamic-info-soname): Return the value of > the dynamic-entry instead of the dynamic-entry record itself. 1. IIUC, this change would cause a world-rebuild, so this patch would have to applied on core-updates. The subject line should have been [PATCH core-updates]: etcetera. 2. How did you test this patch? 3. What does this patch fix? 4. elf-dynamic-info-soname is a record accessor. Did you mean elf-dynamic-= info? 5. According to the docstring (core-updates, c9a61dff8242612ae8275829a5ee31= ff45ff08b1): "Return dynamic-link information for ELF as an object,= or #f if ELF lacks dynamic-link information." So this patch actually _introduces_ a bug. Or you need to modify the doc= string as well. Greetings, Maxime. --=-PedjPFlex0pO2t1JPxzw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYIARTRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7s4+AQCLYWoM4kFdfx71ROh7Einp1SkI 1pDYaIj02WLFBsxPnwEAsCSVBbYQpEHrWrtKuSlmhUzMzezudedJ8cPPKHRqVwQ= =xFl0 -----END PGP SIGNATURE----- --=-PedjPFlex0pO2t1JPxzw-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 21 11:46:23 2021 Received: (at 47921) by debbugs.gnu.org; 21 Apr 2021 15:46:23 +0000 Received: from localhost ([127.0.0.1]:59537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZF3X-00056W-G2 for submit@debbugs.gnu.org; Wed, 21 Apr 2021 11:46:23 -0400 Received: from crocodile.elm.relay.mailchannels.net ([23.83.212.45]:51321) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZF3U-00056M-La for 47921@debbugs.gnu.org; Wed, 21 Apr 2021 11:46:22 -0400 X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B98E740202E for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 15:46:18 +0000 (UTC) Received: from pdx1-sub0-mail-a41.g.dreamhost.com (100-96-18-74.trex.outbound.svc.cluster.local [100.96.18.74]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id EE4D44024BF for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 15:46:17 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from pdx1-sub0-mail-a41.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.18.74 (trex/6.2.1); Wed, 21 Apr 2021 15:46:18 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|smtp@dm9.info X-MailChannels-Auth-Id: dreamhost X-Rock-Ruddy: 2c3b551524a0a89e_1619019978197_1323615873 X-MC-Loop-Signature: 1619019978197:3584591508 X-MC-Ingress-Time: 1619019978197 Received: from pdx1-sub0-mail-a41.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a41.g.dreamhost.com (Postfix) with ESMTP id 6462D7E48D for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 08:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=dm9.info; h=date:from:to :subject:message-id:references:mime-version:content-type :in-reply-to; s=dm9.info; bh=qv9PxgVgiRrqgYf/3fWbEdBh8nI=; b=pwA 42aSeJAZP3HuxurpHejR3LsYhMN6zcUg83Ght/RaK27w+u2B3RQtKALThuzCBSPj eaggTEYkGzmnaUb3zRWhFHCoIggQPX5UFwUb0oradx1r9RSDwhvTN6wZT71Mdv1d 5Z//jzMLWiLwum/MWv/9mGvjyLM3R4TXf4nXHzJg= Received: from mail.localdomain (61-245-140-70.3df58c.per.nbn.aussiebb.net [61.245.140.70]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: smtp@dm9.info) by pdx1-sub0-mail-a41.g.dreamhost.com (Postfix) with ESMTPSA id 5CF707E48A for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 08:46:16 -0700 (PDT) Received: by mail.localdomain (Postfix, from userid 2001) id 448D64FF677; Wed, 21 Apr 2021 23:46:12 +0800 (AWST) Date: Wed, 21 Apr 2021 23:46:12 +0800 X-DH-BACKEND: pdx1-sub0-mail-a41 From: Dion Mendel To: 47921@debbugs.gnu.org Subject: Re: [bug#47921] [PATCH] build: Fix elf-dynamic-info-soname. Message-ID: <20210421154612.GA956@dm9.info> References: <20210420194429.GB29387@dm9.info> <76bb70d22fed27efd4a15308abdd9e95fb1aa929.camel@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <76bb70d22fed27efd4a15308abdd9e95fb1aa929.camel@telenet.be> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47921 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks for the follow up. >1. IIUC, this change would cause a world-rebuild, so this patch would >have to applied on core-updates. The subject line should have been >[PATCH core-updates]: etcetera. Are you sure? This patch will modify guix. guix graph --type=reverse-package guix Only shows a few packages to be rebuilt. I am new to guix so I may be wrong about this. >2. How did you test this patch? Tested in the repl. Current behaviour: (elf-dynamic-info-soname (call-with-input-file "/path/to/libz.so.1.2.11" (compose elf-dynamic-info parse-elf get-bytevector-all))) => #< type: 14 value: "libz.so.1" offset: 5764> There is no way to extract the value as dynamic-entry is private to the module. After the patch: (elf-dynamic-info-soname (call-with-input-file "/path/to/libz.so.1.2.11" (compose elf-dynamic-info parse-elf get-bytevector-all))) => "libz.so.1" >3. What does this patch fix? Module (guix build gremlin) exports several functions to extract information from the dynamic section of an elf file. elf-dynamic-info-soname is one of these functions. It is not called anywhere in guix. I would like to use it for packaging, but it is currently non functioning. >4. elf-dynamic-info-soname is a record accessor. Did you mean >elf-dynamic-info? No, I do not mean elf-dynamic-info. elf-dynamic-info-soname is a record accessor which is currently broken because it doesn't unwrap an internal structure, namely . All the other accessors unwrap this internal structure. This patch brings this accessor into line with the others. >5. According to the docstring (core-updates, c9a61dff8242612ae8275829a5ee31ff45ff08b1): > > "Return dynamic-link information for ELF as an object, or >#f if ELF lacks dynamic-link information." > > So this patch actually _introduces_ a bug. Or you need to modify the docstring > as well. No. This patch does not affect elf-dynamic-info. It fixes one of its accessors. Nothing else is affected. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 21 14:34:16 2021 Received: (at 47921) by debbugs.gnu.org; 21 Apr 2021 18:34:16 +0000 Received: from localhost ([127.0.0.1]:59780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZHg0-0005BT-AV for submit@debbugs.gnu.org; Wed, 21 Apr 2021 14:34:16 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:50918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZHfx-0005BJ-FA for 47921@debbugs.gnu.org; Wed, 21 Apr 2021 14:34:14 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id vWaA2400a0mfAB401WaBiK; Wed, 21 Apr 2021 20:34:11 +0200 Message-ID: <92c4f265369735c71c6f358cfee29fb7cc6a38d2.camel@telenet.be> Subject: Re: [bug#47921] [PATCH] build: Fix elf-dynamic-info-soname. From: Maxime Devos To: Dion Mendel , 47921@debbugs.gnu.org Date: Wed, 21 Apr 2021 20:33:57 +0200 In-Reply-To: <20210421154612.GA956@dm9.info> References: <20210420194429.GB29387@dm9.info> <76bb70d22fed27efd4a15308abdd9e95fb1aa929.camel@telenet.be> <20210421154612.GA956@dm9.info> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-iea5yQ7SNz67mT0nsNvX" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1619030051; bh=FW22FJQ+OTvdkeLlgBAJnVgvN/62EINWMIl1aq9I4zg=; h=Subject:From:To:Date:In-Reply-To:References; b=IPkomk0vRH1sKJQ88JHLQ0hUD3b/0+cA8mG+/kRfWXUAbHedbEwLSyN9SJIwiCPAh vRPqt0VP03I+6PPWbnpeHz6f1eN6F37LMtxfGNqpH0So5C8fUFYKmab3i2tDA1Drnn 3O8EbZfutjbYQjWKh9lJETwt5L+IReRiizfVY6jNQECl6YYn2+DGU0PXEGYVTdrv9w eyQaPQ7gZMb5rcaQU5i3gYJxPI1jwcb406wjCPgMFAO4g+VVVNsBHGW4uE+l4mdHn9 36FlskDVAkLHbmiyD2/S+oh//zivl1gYuoLm/iDgnysERiHrm6DI2S/8J+RvWZ+nKt BbYkkd1Xrp4Vw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47921 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-iea5yQ7SNz67mT0nsNvX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dion Mendel schreef op wo 21-04-2021 om 23:46 [+0800]: > Thanks for the follow up. >=20 > > 1. IIUC, this change would cause a world-rebuild, so this patch would= =20 > > have to applied on core-updates. The subject line should have been > > [PATCH core-updates]: etcetera. >=20 > Are you sure? This patch will modify guix. >=20 > guix graph --type=3Dreverse-package guix > > Only shows a few packages to be rebuilt. I am new to guix so I may be= =20 > wrong about this. If this patch modified something in, say, guix/scripts or gnu/packages, targetting "master" should be perfectly fine. But this patch modifies something under guix/build. Modules under guix/build can be used from the build environment, that is, from within the compilation process of a package. By modifying guix/build/gremlin.scm, a widely-used module in package definitions (used indirectly via gnu-build-system IIRC), practically all packages would be rebuilt. Unless I'm severely mistaken, you can see this for yourself by: 0. start from a checkout of guix *without* your patch 1. # you probably have its dependencies already, but let's make sure ./pre-inst-env guix build hello 2. apply your patch to your local checkout of guix 3. make 4. ./pre-inst-env guix build hello # This will probably rebuild GCC, binutils, etc.! > 2. How did you test this patch? >=20 > Tested in the repl. >=20 > Current behaviour: >=20 > (elf-dynamic-info-soname > (call-with-input-file "/path/to/libz.so.1.2.11" > (compose elf-dynamic-info parse-elf > get-bytevector-all))) > =3D> #< type: 14 value: "libz.so.1" offset: 5764> >=20 > There is no way to extract the value as dynamic-entry is private to the= =20 > module. >=20 > After the patch: >=20 > (elf-dynamic-info-soname > (call-with-input-file "/path/to/libz.so.1.2.11" > (compose elf-dynamic-info parse-elf > get-bytevector-all))) > =3D> "libz.so.1" So you didn't try to build any package with this patch? I would recommend to make sure this patch doesn't break any packages. While you can't test all packages (unless you have a *really big* build farm), I would at least suggest running "./pre-inst-env guix build hello". If that takes too long to complete, don't worry, just interrupt it and let us now you couldn't test it completely. To make sure this new functionality does not break in the future, please write an unit test (in tests/gremlin.scm). > > 3. What does this patch fix? >=20 > Module (guix build gremlin) exports several functions to extract=20 > information from the dynamic section of an elf file. >=20 > elf-dynamic-info-soname is one of these functions. It is not called=20 > anywhere in guix. I would like to use it for packaging, but it is=20 > currently non functioning. Your patch doesn't modify elf-dynamic-info-soname. It modifies elf-dynamic= -info. > > 4. elf-dynamic-info-soname is a record accessor. Did you mean=20 > > elf-dynamic-info? In case I wasn't clear, I was referring to the commit message. In the comm= it message, you say you modified elf-dynamic-info-soname, but you actually mod= ified elf-dynamic-info. =20 > No, I do not mean elf-dynamic-info. See two comments above. > elf-dynamic-info-soname is a record accessor which is currently broken= =20 Record accessors are correct by construction. Perhaps you meant that the "soname" field is initialised incorrectly by elf-dynamic-info? > because it doesn't unwrap an internal structure, namely . = =20 > All the other accessors unwrap this internal structure. I think you can predict my response about accessors here (-:. I'll interpret this as =E2=80=98in all other fields, the internal structure= is unwrapped=E2=80=99. That's a good point! Your patch seems good to me, but the commit message d= oesn't and it has a lack of testing. > This patch brings this accessor into line with the others. You didn't modify the elf-dynamic-info-soname, you modified elf-dynamic-inf= o. See comments above. > > 5. According to the docstring (core-updates, c9a61dff8242612ae8275829a5= ee31ff45ff08b1): > >=20 > > "Return dynamic-link information for ELF as an obje= ct, or > > #f if ELF lacks dynamic-link information." > >=20 > > So this patch actually _introduces_ a bug. Or you need to modify the = docstring > > as well. On second thought, the (revised) patch actually seems correct, and my comme= nt here doesn't make much sense. > No. This patch does not affect elf-dynamic-info. It fixes one of its= =20 > accessors. You modified elf-dynamic-info, so this patch does affect it. elf-dynamic-info is a procedure, so it cannot have any accessors (unless yo= u play weird tricks with Guile's undocumented =E2=80=98applicable structs=E2=80=99= ). The record is . !=3D elf-dynamic-info. Greetings, Maxime. --=-iea5yQ7SNz67mT0nsNvX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYIBwFxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pa3AP0eO1dvfn0dRTqTiWeQYeNbjnHo uojs3GcmouqOm174KQD7BKZGhwJvRAQS2F8rtpY9T8fgmWxBb+CrPMfJqxt6GQY= =E43E -----END PGP SIGNATURE----- --=-iea5yQ7SNz67mT0nsNvX-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 21 22:55:37 2021 Received: (at 47921) by debbugs.gnu.org; 22 Apr 2021 02:55:37 +0000 Received: from localhost ([127.0.0.1]:60197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZPVA-0000au-Pr for submit@debbugs.gnu.org; Wed, 21 Apr 2021 22:55:37 -0400 Received: from black.elm.relay.mailchannels.net ([23.83.212.19]:5123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZPV4-0000ai-PX for 47921@debbugs.gnu.org; Wed, 21 Apr 2021 22:55:35 -0400 X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4F891401D39 for <47921@debbugs.gnu.org>; Thu, 22 Apr 2021 02:55:29 +0000 (UTC) Received: from pdx1-sub0-mail-a31.g.dreamhost.com (100-96-133-91.trex.outbound.svc.cluster.local [100.96.133.91]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 019A54019A3 for <47921@debbugs.gnu.org>; Thu, 22 Apr 2021 02:55:28 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from pdx1-sub0-mail-a31.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.133.91 (trex/6.2.1); Thu, 22 Apr 2021 02:55:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|smtp@dm9.info X-MailChannels-Auth-Id: dreamhost X-Illegal-Shrill: 5ffaa6bd48cc293a_1619060129050_962905446 X-MC-Loop-Signature: 1619060129049:2041269736 X-MC-Ingress-Time: 1619060129049 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id AA67D8623F for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 19:55:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=dm9.info; h=date:from:to :subject:message-id:mime-version:content-type; s=dm9.info; bh=0k VddxxAQfi9ym2AViCARvrrcaY=; b=szb56Wjzm4VheUGwqYTQXtEAaETvedSweO /m1uvXCPibib4zIHkMwYjWkIrMGdesWZDtOeD0F+Qu8SeT/afvrrk+zKGeiqD+wM 5vY0rYpMkjW7Dlr/62xZWjUYIolwkTsh04G8PYG/hUUDlm35NVq9nWXEnH5d0YSh yC9I/ylGE= Received: from mail.localdomain (61-245-140-70.3df58c.per.nbn.aussiebb.net [61.245.140.70]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: smtp@dm9.info) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTPSA id 6C8557F0E6 for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 19:55:28 -0700 (PDT) Received: by mail.localdomain (Postfix, from userid 2001) id 862F84FFA1D; Thu, 22 Apr 2021 10:55:24 +0800 (AWST) Date: Thu, 22 Apr 2021 10:55:24 +0800 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Dion Mendel To: 47921@debbugs.gnu.org Subject: retitle Message-ID: <20210422025524.GA2930@dm9.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47921 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) retitle 47921 [PATCH core-updates] build: Fix elf-dynamic-info-soname. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 21 23:14:00 2021 Received: (at 47921) by debbugs.gnu.org; 22 Apr 2021 03:14:00 +0000 Received: from localhost ([127.0.0.1]:60272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZPmx-000160-OY for submit@debbugs.gnu.org; Wed, 21 Apr 2021 23:14:00 -0400 Received: from hedgehog.birch.relay.mailchannels.net ([23.83.209.81]:11414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZPmu-00015q-OH for 47921@debbugs.gnu.org; Wed, 21 Apr 2021 23:13:58 -0400 X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 491BC702B78 for <47921@debbugs.gnu.org>; Thu, 22 Apr 2021 03:13:55 +0000 (UTC) Received: from pdx1-sub0-mail-a31.g.dreamhost.com (100-105-161-122.trex.outbound.svc.cluster.local [100.105.161.122]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id DAE547027F8 for <47921@debbugs.gnu.org>; Thu, 22 Apr 2021 03:13:54 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from pdx1-sub0-mail-a31.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.105.161.122 (trex/6.2.1); Thu, 22 Apr 2021 03:13:55 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|smtp@dm9.info X-MailChannels-Auth-Id: dreamhost X-Absorbed-Absorbed: 66a2ab62597703e7_1619061235129_4086720310 X-MC-Loop-Signature: 1619061235129:938427322 X-MC-Ingress-Time: 1619061235129 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 8C42D86788 for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 20:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=dm9.info; h=date:from:to :subject:message-id:references:mime-version:content-type :in-reply-to; s=dm9.info; bh=YhARz76WFgqv/6u0IM+GGlrY+mo=; b=ld8 MV79An6XiPjN2iP1zGxSFlLg/+RQOp80X/iuk57YOTWpI6GWK/F1J5l/kHSYj3kD 5bWRtSyspHCRox2Q1z0Aj201KXHBv3LwtYISUzhN+WRoKTp5kvZI/gR3/h+fJc7L p4WXqO61J8yEH6AtNfTg3D31NH8HOmodAOErQlZg= Received: from mail.localdomain (61-245-140-70.3df58c.per.nbn.aussiebb.net [61.245.140.70]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: smtp@dm9.info) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTPSA id 4E4F286787 for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 20:13:53 -0700 (PDT) Received: by mail.localdomain (Postfix, from userid 2001) id 4A95E4FFA6A; Thu, 22 Apr 2021 11:13:50 +0800 (AWST) Date: Thu, 22 Apr 2021 11:13:50 +0800 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Dion Mendel To: 47921@debbugs.gnu.org Subject: Re: [bug#47921] [PATCH] build: Fix elf-dynamic-info-soname. Message-ID: <20210422031350.GB2930@dm9.info> References: <20210420194429.GB29387@dm9.info> <76bb70d22fed27efd4a15308abdd9e95fb1aa929.camel@telenet.be> <20210421154612.GA956@dm9.info> <92c4f265369735c71c6f358cfee29fb7cc6a38d2.camel@telenet.be> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline In-Reply-To: <92c4f265369735c71c6f358cfee29fb7cc6a38d2.camel@telenet.be> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47921 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Thanks for your explanations. It's cleared up my understanding. I've tried to retitled to target core-updates, but I'm not sure if it applied. I've updated the patch to include a unit test. I am currently testing by rebuilding as you suggest. ./pre-inst-env guix build hello Yes this is building the world so I will report back when it completes. >The record is . != elf-dynamic-info. Thank you. Yes I was confused regarding this. I've updated the commit changelog accordingly. --ZPt4rx8FFjLCG7dd Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-guix-build-gremlin.scm-elf-dynamic-info-Correctly-se.patch" >From bfc69ea726e0f5c1955e629e92af377ffb90c2c5 Mon Sep 17 00:00:00 2001 From: Dion Mendel Date: Thu, 22 Apr 2021 10:32:35 +0800 Subject: [PATCH] * guix/build/gremlin.scm (elf-dynamic-info): Correctly set the value of soname in . --- guix/build/gremlin.scm | 4 +++- tests/gremlin.scm | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm index e8ea66dfb3..4710502426 100644 --- a/guix/build/gremlin.scm +++ b/guix/build/gremlin.scm @@ -215,7 +215,9 @@ string table if the type is a string." (#f #f) ((? elf-segment? dynamic) (let ((entries (dynamic-entries elf dynamic))) - (%elf-dynamic-info (find (matching-entry DT_SONAME) entries) + (%elf-dynamic-info (and=> (find (matching-entry DT_SONAME) + entries) + dynamic-entry-value) (filter-map (lambda (entry) (and (= (dynamic-entry-type entry) DT_NEEDED) diff --git a/tests/gremlin.scm b/tests/gremlin.scm index b0bb7a8e49..50ad0d70f5 100644 --- a/tests/gremlin.scm +++ b/tests/gremlin.scm @@ -96,4 +96,22 @@ (close-pipe pipe) str))))))) +(unless c-compiler + (test-skip 1)) +(test-equal "elf-dynamic-info-soname" + "libfoo.so.2" + (call-with-temporary-directory + (lambda (directory) + (with-directory-excursion directory + (call-with-output-file "t.c" + (lambda (port) + (display "// empty file" port))) + (invoke c-compiler "t.c" + "-shared" "-Wl,-soname,libfoo.so.2") + (let* ((dyninfo (elf-dynamic-info + (parse-elf (call-with-input-file "a.out" + get-bytevector-all)))) + (soname (elf-dynamic-info-soname dyninfo))) + soname))))) + (test-end "gremlin") -- 2.31.0 --ZPt4rx8FFjLCG7dd-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 21 23:26:20 2021 Received: (at 47921) by debbugs.gnu.org; 22 Apr 2021 03:26:20 +0000 Received: from localhost ([127.0.0.1]:60279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZPyt-0001OI-Ud for submit@debbugs.gnu.org; Wed, 21 Apr 2021 23:26:20 -0400 Received: from cornsilk.ash.relay.mailchannels.net ([23.83.222.40]:57538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZPyo-0001O4-KT for 47921@debbugs.gnu.org; Wed, 21 Apr 2021 23:26:18 -0400 X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9E2055425EA for <47921@debbugs.gnu.org>; Thu, 22 Apr 2021 03:26:10 +0000 (UTC) Received: from pdx1-sub0-mail-a31.g.dreamhost.com (100-96-11-138.trex.outbound.svc.cluster.local [100.96.11.138]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id A7A11542516 for <47921@debbugs.gnu.org>; Thu, 22 Apr 2021 03:26:09 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from pdx1-sub0-mail-a31.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.11.138 (trex/6.2.1); Thu, 22 Apr 2021 03:26:10 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|smtp@dm9.info X-MailChannels-Auth-Id: dreamhost X-Madly-Stretch: 4ba55f854d0b6471_1619061970341_3644672098 X-MC-Loop-Signature: 1619061970341:4198421244 X-MC-Ingress-Time: 1619061970341 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 5E1BA8623F for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 20:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=dm9.info; h=date:from:to :subject:message-id:mime-version:content-type; s=dm9.info; bh=1e Zrl/39rGOTmtEYF7zioi3n5Mk=; b=TPoQPGQQZxcsRMo8B/QtrKQLWteOkTBdVt t7l+SHqLBggQwOky+S7nkkFf52udyK6j+Z+ZT0t/fACKg18JIf6nIQP7+0BdSgtl EXppFQu3Q+zPqnNcb+uF8QrfTVNhfUtLojbHvu2QIqfbrYUpkkUnM3IB+Z8Vu74p LiGoAcnqg= Received: from mail.localdomain (61-245-140-70.3df58c.per.nbn.aussiebb.net [61.245.140.70]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: smtp@dm9.info) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTPSA id 1F3E07F0E6 for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 20:26:08 -0700 (PDT) Received: by mail.localdomain (Postfix, from userid 2001) id 95BD34FFA72; Thu, 22 Apr 2021 11:26:05 +0800 (AWST) Date: Thu, 22 Apr 2021 11:26:05 +0800 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Dion Mendel To: 47921@debbugs.gnu.org Subject: Include correct commit message Message-ID: <20210422032605.GA3138@dm9.info> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47921 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Correct changelog message. --6c2NcOVqGQ03X4Wi Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-build-Fix-elf-dynamic-info-soname.patch" >From c9df762924ac28bc7cab6c7c1f9acda0db378f7e Mon Sep 17 00:00:00 2001 From: Dion Mendel Date: Thu, 22 Apr 2021 11:21:35 +0800 Subject: [PATCH] build: Fix elf-dynamic-info-soname. * guix/build/gremlin.scm (elf-dynamic-info): Correctly set the value of soname in . --- guix/build/gremlin.scm | 4 +++- tests/gremlin.scm | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm index e8ea66dfb3..4710502426 100644 --- a/guix/build/gremlin.scm +++ b/guix/build/gremlin.scm @@ -215,7 +215,9 @@ string table if the type is a string." (#f #f) ((? elf-segment? dynamic) (let ((entries (dynamic-entries elf dynamic))) - (%elf-dynamic-info (find (matching-entry DT_SONAME) entries) + (%elf-dynamic-info (and=> (find (matching-entry DT_SONAME) + entries) + dynamic-entry-value) (filter-map (lambda (entry) (and (= (dynamic-entry-type entry) DT_NEEDED) diff --git a/tests/gremlin.scm b/tests/gremlin.scm index b0bb7a8e49..50ad0d70f5 100644 --- a/tests/gremlin.scm +++ b/tests/gremlin.scm @@ -96,4 +96,22 @@ (close-pipe pipe) str))))))) +(unless c-compiler + (test-skip 1)) +(test-equal "elf-dynamic-info-soname" + "libfoo.so.2" + (call-with-temporary-directory + (lambda (directory) + (with-directory-excursion directory + (call-with-output-file "t.c" + (lambda (port) + (display "// empty file" port))) + (invoke c-compiler "t.c" + "-shared" "-Wl,-soname,libfoo.so.2") + (let* ((dyninfo (elf-dynamic-info + (parse-elf (call-with-input-file "a.out" + get-bytevector-all)))) + (soname (elf-dynamic-info-soname dyninfo))) + soname))))) + (test-end "gremlin") -- 2.31.0 --6c2NcOVqGQ03X4Wi-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 22 04:20:27 2021 Received: (at 47921-done) by debbugs.gnu.org; 22 Apr 2021 08:20:28 +0000 Received: from localhost ([127.0.0.1]:60719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZUZX-0000MM-OB for submit@debbugs.gnu.org; Thu, 22 Apr 2021 04:20:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZUZV-0000M8-Jk for 47921-done@debbugs.gnu.org; Thu, 22 Apr 2021 04:20:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45349) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZUZO-0001hx-VR; Thu, 22 Apr 2021 04:20:20 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57346 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lZUZO-0002gg-9y; Thu, 22 Apr 2021 04:20:18 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Dion Mendel Subject: Re: bug#47921: [PATCH] build: Fix elf-dynamic-info-soname. References: <20210420194429.GB29387@dm9.info> <76bb70d22fed27efd4a15308abdd9e95fb1aa929.camel@telenet.be> <20210421154612.GA956@dm9.info> <92c4f265369735c71c6f358cfee29fb7cc6a38d2.camel@telenet.be> <20210422031350.GB2930@dm9.info> Date: Thu, 22 Apr 2021 10:20:16 +0200 In-Reply-To: <20210422031350.GB2930@dm9.info> (Dion Mendel's message of "Thu, 22 Apr 2021 11:13:50 +0800") Message-ID: <87wnsu20jj.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 47921-done Cc: 47921-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Dion, Dion Mendel skribis: >>>From bfc69ea726e0f5c1955e629e92af377ffb90c2c5 Mon Sep 17 00:00:00 2001 > From: Dion Mendel > Date: Thu, 22 Apr 2021 10:32:35 +0800 > Subject: [PATCH] * guix/build/gremlin.scm (elf-dynamic-info): Correctly s= et > the value of soname in . > > --- > guix/build/gremlin.scm | 4 +++- > tests/gremlin.scm | 18 ++++++++++++++++++ > 2 files changed, 21 insertions(+), 1 deletion(-) Awesome. I tweaked the commit message and applied it. Thank you, and thanks Maxime for the review! Ludo=E2=80=99. From unknown Sat Aug 16 16:09:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 20 May 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator