From debbugs-submit-bounces@debbugs.gnu.org Thu May 15 15:53:11 2025 Received: (at submit) by debbugs.gnu.org; 15 May 2025 19:53:11 +0000 Received: from localhost ([127.0.0.1]:56531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uFedj-0000QZ-8u for submit@debbugs.gnu.org; Thu, 15 May 2025 15:53:11 -0400 Received: from lists.gnu.org ([2001:470:142::17]:59858) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uFedg-0000QA-So for submit@debbugs.gnu.org; Thu, 15 May 2025 15:53:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFeda-0007Rt-Iz for bug-guix@gnu.org; Thu, 15 May 2025 15:53:02 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFedY-0001Z4-FY for bug-guix@gnu.org; Thu, 15 May 2025 15:53:02 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A8087240103 for ; Thu, 15 May 2025 21:52:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1747338776; bh=cg4QwoypgJZEhVuRoD+kxs/ZPP8cMYgQRNyL6aWoGuc=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type: Content-Transfer-Encoding:From; b=NDwRXMXVVzcO7U0oNZvTxWLicFumAY/NZANiZhPMVbak/VrIkRxyT2Mnqd5fQCCYL 0bAHWzQVffn8w7ezEBkTIf1k6G1wCv2RMgYY2VDRNwGBQXGg/jJQJ2B1V/f8LM7vGV V2hQkDwi+841EFeTk3rcQ5MlEvPdzG+Sf2GNU3GwDBmWUXPAhF+reHTTkm3aEgaA7/ K97e3dXSyRbAOnlwW5wtWK3apBcQGOGA+i7DPHCAiuYH7SSZQlFo8P1oEwKRufvhFA wzhejuODsZI8RAxTo+mT8uE826NXKDGTbwo18D+ZYiEyXWdzA7K662rZ5oYzj/5SeI j+3EjtEq0D3CQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Zz18m1xF1z9rxF for ; Thu, 15 May 2025 21:52:56 +0200 (CEST) Message-ID: <0f0bf997-b52a-425b-af15-11b975ab5f28@posteo.net> Date: Thu, 15 May 2025 19:52:36 +0000 MIME-Version: 1.0 Content-Language: en-US To: bug-guix@gnu.org From: Dariqq Subject: meson-build-system's 'shrink-runpath phase fails for guile go files Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=dariqq@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit 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: -0.0 (/) Hello, I have been experimenting with using meson to manage some guile projects instead of autotools. When I try to build it with guix it fails during 'shrink-runpath phase on .go files: error: in phase 'shrink-runpath': uncaught exception: wrong-type-arg "struct-vtable" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "struct" #f) (#f) phase `shrink-runpath' failed after 0.0 seconds Backtrace: 10 (primitive-load "/gnu/store/9547znabbsf3iy7z9frhkxq7cgf…") In guix/build/gnu-build-system.scm: 966:2 9 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #) In ice-9/boot-9.scm: 1752:10 8 (with-exception-handler _ _ #:unwind? _ # _) In srfi/srfi-1.scm: 634:9 7 (for-each # …) In ice-9/boot-9.scm: 1752:10 6 (with-exception-handler _ _ #:unwind? _ # _) In guix/build/gnu-build-system.scm: 987:23 5 (_) In guix/build/meson-build-system.scm: 123:2 4 (shrink-runpath #:elf-directories _ #:outputs _) In srfi/srfi-1.scm: 634:9 3 (for-each # (("out" . #))) 634:9 2 (for-each # _) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f build process 8 exited with status 256 A test repository is at https://codeberg.org/Dariqq/guile-meson-example. From debbugs-submit-bounces@debbugs.gnu.org Thu May 15 17:03:43 2025 Received: (at 78445) by debbugs.gnu.org; 15 May 2025 21:03:43 +0000 Received: from localhost ([127.0.0.1]:56889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uFfjz-0005Xo-Ah for submit@debbugs.gnu.org; Thu, 15 May 2025 17:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36626) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uFfjw-0005Wy-Ay for 78445@debbugs.gnu.org; Thu, 15 May 2025 17:03:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFfjo-0000Hq-Ub; Thu, 15 May 2025 17:03:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=8fOEqihmFhH5ha94jbSKZiAE+02/SAQ7TvBk2X+7Flo=; b=kaJBIKnSoEZEhJEcDCMt vnoT/83aIXx445bOOUQ/u1kk84Rp0+h5ndpe8EyZI2HzeJO5O4NlTKFiDVH97YuA9I4xYKQ6cEbs+ dLLHEcqDF3m1r+kjmqKVEGJSYICrEkvMoDIRZ+JaYf3+WhCSKhI++MULlVumC1QBhPKfTQ10lylij /tMQfqzDbELVzvL23qtyrt4xkjJz9N6kzVZ9yw14z9TC7U6jsMN/SI7FGDPOJCsWl5B4b4kchIDhL 6Tuohf+nKbXJWTVCwldNbrdgsRd9yXMesIQdNo2DkFoelOSF+K38BaSrMxpWFPI8xTZLKWHflOv+Q aySeFMJa1uZp0w==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Dariqq Subject: Re: bug#78445: meson-build-system's 'shrink-runpath phase fails for guile go files In-Reply-To: <0f0bf997-b52a-425b-af15-11b975ab5f28@posteo.net> (dariqq@posteo.net's message of "Thu, 15 May 2025 19:52:36 +0000") References: <0f0bf997-b52a-425b-af15-11b975ab5f28@posteo.net> User-Agent: mu4e 1.12.9; emacs 29.4 X-URL: https://people.bordeaux.inria.fr/lcourtes/ X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-Revolutionary-Date: Sextidi 26 =?utf-8?Q?Flor=C3=A9al?= an 233 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Fusain Date: Thu, 15 May 2025 22:59:24 +0200 Message-ID: <87jz6hvbdf.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78445 Cc: 78445@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 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Dariqq writes: > I have been experimenting with using meson to manage some guile > projects instead of autotools. > > When I try to build it with guix it fails during 'shrink-runpath phase > on .go files: > > error: in phase 'shrink-runpath': uncaught exception: > wrong-type-arg "struct-vtable" "Wrong type argument in position ~A > (expecting ~A): ~S" (1 "struct" #f) (#f) [...] > 634:9 2 (for-each # _) This is because =E2=80=98strip-runpath=E2=80=99 expects FILE to contain a D= T_RUNPATH section. Failing that, the =E2=80=98runpath=E2=80=99 variable at gremlin.s= cm:417 is #f and the (dynamic-entry-type runpath) calls right below fails with a wrong-type-arg error. A solution would be to fix =E2=80=98strip-runpath=E2=80=99 (patch below), t= hough that involves a world rebuild. Another solution is to arrange so that =E2=80=98meson-build-system=E2=80=99= does not touch .go files for this package, for instance by skipping the =E2=80=98shrink-runpath=E2=80=99 phase. HTH, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm index 2a74d51dd9..ceb1c7bcf5 100644 --- a/guix/build/gremlin.scm +++ b/guix/build/gremlin.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2015, 2018, 2020 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2015, 2018, 2020, 2025 Ludovic Court=C3=A8s ;;; ;;; This file is part of GNU Guix. ;;; @@ -417,10 +417,11 @@ (define (strip-runpath file) (runpath (find (lambda (entry) (=3D DT_RUNPATH (dynamic-entry-type entry))) entries)) - (old (search-path->list - (dynamic-entry-value runpath))) - (new (minimal-runpath needed old))) - (unless (equal? old new) + (old (and runpath + (search-path->list + (dynamic-entry-value runpath)))) + (new (and old (minimal-runpath needed old)))) + (unless (and old new (equal? old new)) (format (current-error-port) "~a: stripping RUNPATH to ~s (removed ~s)~%" file new --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 16 03:53:53 2025 Received: (at 78445) by debbugs.gnu.org; 16 May 2025 07:53:53 +0000 Received: from localhost ([127.0.0.1]:33742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uFptA-0004Rm-MK for submit@debbugs.gnu.org; Fri, 16 May 2025 03:53:52 -0400 Received: from mout01.posteo.de ([185.67.36.65]:52087) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uFpt4-0004RG-P3 for 78445@debbugs.gnu.org; Fri, 16 May 2025 03:53:47 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 708A224002A for <78445@debbugs.gnu.org>; Fri, 16 May 2025 09:53:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1747382020; bh=fOi+WWtrgE9yZsQqPI6tS0/7YssfBjb1CLeOta1Lkas=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:Content-Type: Content-Transfer-Encoding:From; b=bwSOZPonUqDus9AEtrAiWREhsRabGGJ+nIMAPvtbtaWDJQnvHaPE1Nvbfyqaa37d/ ZeNeG7B4+L2UBN9mqjafRPXokFgLgGiFIT78ddHdwnvShPRFnf6iT+wDJTLYmU3HOF V8umr0rLI2ddN+Y2hr2aU1Nt9dM5+ri++g/4lCfRzIl4myu7vaYHQe6CdN4XCYJTyv tYjB5OsmFPDOgM5JB/oNZc038SSBQfkN5ZDap+fhUSkndHK1N7OpS8/Ah8VQCnMKu9 RaOTd7dE9rYe0VeQqswL3Uby64c3jIEt8RdSKgNXr9yWCG0l0qekoCPOQbyCmVzj4M cmLddtaFFgPeA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4ZzK8M50vwz6tsf; Fri, 16 May 2025 09:53:39 +0200 (CEST) Message-ID: Date: Fri, 16 May 2025 07:53:20 +0000 MIME-Version: 1.0 Subject: Re: bug#78445: meson-build-system's 'shrink-runpath phase fails for guile go files To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= References: <0f0bf997-b52a-425b-af15-11b975ab5f28@posteo.net> <87jz6hvbdf.fsf@gnu.org> Content-Language: en-US From: Dariqq In-Reply-To: <87jz6hvbdf.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78445 Cc: 78445@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 (---) Hello, On 15.05.25 22:59, Ludovic Courtès wrote: > Hi, > > > > This is because ‘strip-runpath’ expects FILE to contain a DT_RUNPATH > section. Failing that, the ‘runpath’ variable at gremlin.scm:417 is #f > and the (dynamic-entry-type runpath) calls right below fails with a > wrong-type-arg error. > > A solution would be to fix ‘strip-runpath’ (patch below), though that > involves a world rebuild. > At first I thought it be 'only' a rebuild of the meson world, but I see now that (guix build gremlin) is also imported in gnu-build-system :(. > Another solution is to arrange so that ‘meson-build-system’ does not > touch .go files for this package, for instance by skipping the > ‘shrink-runpath’ phase. > Yeah, that's what I have been doing but I think 'strip-runpath' could handle this case more gracefully. Also when there is both a guile c extension and go files I'd need to do custom things to apply shrink-runpath only for the .so files. This is of course doable but feels like a workaround until a proper fix is available. > HTH, > Ludo’. > > From debbugs-submit-bounces@debbugs.gnu.org Fri May 16 09:40:15 2025 Received: (at 78445) by debbugs.gnu.org; 16 May 2025 13:40:16 +0000 Received: from localhost ([127.0.0.1]:37580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uFvIJ-0000D6-Ju for submit@debbugs.gnu.org; Fri, 16 May 2025 09:40:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41614) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uFvID-00009q-T8 for 78445@debbugs.gnu.org; Fri, 16 May 2025 09:40:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFvI8-0006yX-4A; Fri, 16 May 2025 09:40:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=r/Mq0+OjRS+AQZIoHhl09Za9RA1vH1IaUaXFwly58Vc=; b=f9re6jjG3YdPZxhnIty5 8MCMfcg+w61STrbaBa5Tw4CT3E7Q8NAhSRsn2hc5bQ2oJXtzR3R/b8JbilrpMgvpddJ3E03ZMd6iI 5X5YD9MVIkPciW52mObz09cXhaU3zIKtWIxh4mCQhLypEWNYmaTlA+p98j70MASdZpGH1O3BMq4m3 ElviXqamZc2N9yoDxXa4FJwuuMj6xkD8CC4CUidgjVHsQEyz26BpAYIYAZzprSHYOIet2ZzR739L7 LOJY+V3fgkWasMwRvcjH9zTuUTP+sY/sFOi1+/SoACZEwtr2ocqBqJj6wYrfYixvbZ87OTN3CLLON 5OhNcUOdCtq4Dw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Dariqq Subject: Re: bug#78445: meson-build-system's 'shrink-runpath phase fails for guile go files In-Reply-To: (dariqq@posteo.net's message of "Fri, 16 May 2025 07:53:20 +0000") References: <0f0bf997-b52a-425b-af15-11b975ab5f28@posteo.net> <87jz6hvbdf.fsf@gnu.org> User-Agent: mu4e 1.12.9; emacs 29.4 X-URL: https://people.bordeaux.inria.fr/lcourtes/ X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-Revolutionary-Date: Septidi 27 =?utf-8?Q?Flor=C3=A9al?= an 233 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de la Civette Date: Fri, 16 May 2025 15:35:44 +0200 Message-ID: <87r00osmof.fsf@gnu.org> 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: 78445 Cc: 78445@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 Dariqq, Dariqq writes: >> Another solution is to arrange so that =E2=80=98meson-build-system=E2=80= =99 does not >> touch .go files for this package, for instance by skipping the >> =E2=80=98shrink-runpath=E2=80=99 phase. >>=20 > > Yeah, that's what I have been doing but I think 'strip-runpath' could > handle this case more gracefully. Also when there is both a guile c > extension and go files I'd need to do custom things to apply > shrink-runpath only for the .so files. This is of course doable but > feels like a workaround until a proper fix is available. Yes, it=E2=80=99s definitely a workaround, probably unavoidable until we la= nd the gremlin.scm fix. Ludo=E2=80=99.