From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id cCqfIBrjGWfHIQEAqHPOHw:P1 (envelope-from ) for ; Thu, 24 Oct 2024 06:03:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id cCqfIBrjGWfHIQEAqHPOHw (envelope-from ) for ; Thu, 24 Oct 2024 08:03:06 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ZBUup75S; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Ax+6D28I; 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"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729749786; h=from:from:sender:sender: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:dkim-signature; bh=T8Php7IbihTdwUodm5/7/YzWWqIdZU0U3BaTAFGqT+0=; b=ci1iJPtnlFQziLxHoJEKNVLKwcjvIQNA8rPp89e+2dwATL3kJzzcd6FtSuP8hvpfErJx8g KaSMsLQNGHdOV6qcApH6LhJfFXleUGSwEikT98SInWH2DQwYTQZ2zrc8d4uJhzsfp2LiZP odofzycZ8XCsx08Ku/ocyBJ5urJtb52lmtcb/nFDkmAucHW4qdRr7TAcX+njhKRK75WVBH eafi0VLvJh4Tkkp1gyzRjqdPrAdMeyerF02cZI4TpNP4cINQjTUuQHjc/ZRta+b/iItqJ2 ieLMwV0VPRyoyYmF4gUQU12bvYbtZHQ4RIGESlCdxtQLfTvKrLPF7QJn0YNQ5A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ZBUup75S; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Ax+6D28I; 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"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729749786; a=rsa-sha256; cv=none; b=pV7bMSb3ePq5KWJU1+cj9JJBOB2qHi0Jj8ZLjMROiyjiDKm7x0ok4EC0/9iGmAj2fHoDUR Kr2Bvq11VI5RTP/wB72G1b8mh53I6RY9rYiJ2hffov1bMkRZhmBuiojEp2bJ7clNZIiG3V Vr2g68yaCAlpxG0QNyKxOMhKlZD236FuWBzswgeMzaYkCtgayorMAAc08JA0m9xKXemgVp oQ0V47ANq/9Kic5SAzkL8jzJQGonjbT0ZeHheUIUrV+SC13pRDso4HMcEp7te5MQxUiDuU Ux2mfxg+lJr7T3M5YB15bPbXUbcdUlWXEF4EoKa4zdRQM4vEQgV1OsWVzcd8sA== 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 0EBC3856F0 for ; Thu, 24 Oct 2024 08:03:06 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3qvb-0001cZ-HY; Thu, 24 Oct 2024 02:02:36 -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 1t3qvZ-0001c5-4O for bug-guix@gnu.org; Thu, 24 Oct 2024 02:02:33 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3qvY-0007e8-R9 for bug-guix@gnu.org; Thu, 24 Oct 2024 02:02:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=T8Php7IbihTdwUodm5/7/YzWWqIdZU0U3BaTAFGqT+0=; b=ZBUup75SkUEP1FjqrP73yJW8MRxNjndYPC2b81oXf6Oe3MiEZzAkqnp9ONjtYeEiusqPamHwLMRTsF0eBaIB6rIuANo7XJVFaOwU4JvCWhILO/wq5b6qK/oELTPkydfrI2kaJHCH9ofR2/5eanVBng3GU6sE+T1hlkYvp90FCvYyJV5lgcs148vvoM/fBsbuGRsM5U0Tin+XtiqRNJ7iedQK87yI39r38cftkgTqCvIfXoBbYWktWbcByUkAvY8W8XQytyFIDmN+JVGXNpAIv3iQaftcyCibd3MUhFhy/LYoh35rz3Jn00hduSyPZRmhy6PX1J+GEBlnmR0uztePaA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t3qw2-000827-MH for bug-guix@gnu.org; Thu, 24 Oct 2024 02:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#73979: validate-runpath phases fails when binaries linked to package's own libraries Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 24 Oct 2024 06:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73979 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 73979@debbugs.gnu.org X-Debbugs-Original-To: bug-guix Received: via spool by submit@debbugs.gnu.org id=B.172974972430800 (code B ref -1); Thu, 24 Oct 2024 06:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Oct 2024 06:02:04 +0000 Received: from localhost ([127.0.0.1]:33330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3qv5-00080h-Dg for submit@debbugs.gnu.org; Thu, 24 Oct 2024 02:02:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:52742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3qv1-00080E-Fz for submit@debbugs.gnu.org; Thu, 24 Oct 2024 02:02:02 -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 1t3quV-0001Yi-Du for bug-guix@gnu.org; Thu, 24 Oct 2024 02:01:27 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3quP-0007cA-9k for bug-guix@gnu.org; Thu, 24 Oct 2024 02:01:25 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-718e9c8bd83so1127898b3a.1 for ; Wed, 23 Oct 2024 23:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729749679; x=1730354479; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=T8Php7IbihTdwUodm5/7/YzWWqIdZU0U3BaTAFGqT+0=; b=Ax+6D28IFkAEPLVLkmz/POSvrLlx5bfOhLFUyMWyeMIb1s1OiY6NjKzpkNVeFaSzbM +6N3gVP4AHJfx6bkkDz+2ytr9mz3eVhL2sOe+ZL4DeGhkyZCueOiQn9NR1q0+DRr6rxW xDb3iy1IVHgN8bnRNCif38DqB3p2ZzXpGheE9J7lBbjj5Z44a6tJEEOjVFjtZa8uAlAU VpUhWtqzJ5i1sUxxgvOaFBbxC+941knvhl65V3J3aqA33ATelIT9MR6EsgWDDcPw/NTI tXX2oAXUhX2gT6pTUJZIXLn0X60J4bGppXTaxKLwTJyjuW6w0dOX65fLy3ReHp+xKLag 7Vcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729749679; x=1730354479; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=T8Php7IbihTdwUodm5/7/YzWWqIdZU0U3BaTAFGqT+0=; b=dHa9w0s10xWfMtcM7uguTypKC6hOkoPoG0mKR5oyubsLz/5kHTQBPp9v6N6tgvJ+ZY AMczAh/XF8qxOItMPEh2faCM4QNvd7l/w7wEZTLDLUAMJ5gu97NLFtA0LUYE1jWiKRQC nhI7eb141PCODw5+zwMeF45q1mIQ0ly5Hv35INx6UbF+F12Ylx9E+DuKuB4F+XuqWzzg Gfhh5zTmRBJTd04ArIBsxGVgTraw8vLP1g4t/ZAw/pE1EdZ4IIjlbd+CJA2a9k8+UYEc jtv4LksFemBSM1A/WF23HwoH0hKF/TOWv0+BORR0WF6p7YGSbrd6tzRy4owIkovY/bQ5 ox9g== X-Gm-Message-State: AOJu0Yz1soKXHkA7tHhaCAMcA1c3wGmphJbB1zu7T5yECh0TvhuuvX2l w9mmxUDOikArsIvsEI/UndrJSF1NFrong1PhvyrufHIteb0bXpxTu740GQ== X-Google-Smtp-Source: AGHT+IG9eLTbx+tFZr5HQ5/ASgpnX3mJ4fxmRT+LVFrzUd3qiCi8/xAH3YmZCRsjzIFUwtRqEPH8/w== X-Received: by 2002:a05:6a00:2d26:b0:71e:40cd:b607 with SMTP id d2e1a72fcca58-72045436c5fmr1860484b3a.11.1729749678492; Wed, 23 Oct 2024 23:01:18 -0700 (PDT) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7eaeabb9009sm7941628a12.59.2024.10.23.23.01.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 23:01:17 -0700 (PDT) From: Maxim Cournoyer Date: Thu, 24 Oct 2024 15:01:11 +0900 Message-ID: <87y12excns.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=maxim.cournoyer@gmail.com; helo=mail-pf1-x42f.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 3.79 X-Spam-Score: 3.79 X-Migadu-Queue-Id: 0EBC3856F0 X-TUID: iXfooB6X7NLI Hi, There's a common pattern in packages where the validate-runpath phases fail, which is when a binary is linked to libraries provided by the same package. In this case, our ld-wrapper script appears to not bake the required runpath, which then fails the validate-runpath phase. When this happens, the common workaround is adding link directives such as (string-append "-Wl,-rpath=3D" #$output "/lib/subdir") to LDFLAGS (see for example the 'dmraid' package definition). Here's a recent example, attempting to build TORCS: --8<---------------cut here---------------start------------->8--- starting phase `validate-runpath' validating RUNPATH of 32 binaries in "/gnu/store/q25qb3r6kzhn9w7mac9i9gn4gg= 45c7v1-torcs-1.3.7/lib"... /gnu/store/q25qb3r6kzhn9w7mac9i9gn4gg45c7v1-torcs-1.3.7/lib/torcs/accc-bin:= error: depends on 'libtgf.so', which cannot be found in RUNPATH ("/gnu/sto= re/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib" "/gnu/store/zzpbp6rr43s= mwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib" "/gnu/store/9lp5m2znnqizy6qmp8zjm= 9gbb9ymvdf5-openal-1.23.1/lib" "/gnu/store/jy396n8qkdlh4cwzjk4avwrppdm2mmiw= -freealut-1.1.0/lib" "/gnu/store/vfijqdrwz8yv3kk3k2609q94n3icpf8f-libvorbis= -1.3.7/lib" "/gnu/store/3nqlh3kjqybdz3mbzmvsm0piv66ny738-freeglut-3.4.0/lib= " "/gnu/store/bi3haj8fvqf6hzd869rl8hk0nf8w3ga0-glu-9.0.2/lib" "/gnu/store/2= p06ia11gyldx3icmha2hf3dq1qwkz0k-mesa-24.0.4/lib" "/gnu/store/qj9jhgqn2b9g7y= xdhyw6ki1vz241apkd-libpng-1.6.39/lib" "/gnu/store/1prv14v6jfnzzg7szm57690b7= fr6sx33-zlib-1.3/lib" "/gnu/store/mf7d6fvd8nvzic48w9f52fx66gyarjg8-libxrand= r-1.5.2/lib" "/gnu/store/c5w905pbjn95pwq2c4saz3n1yznin3lz-libxrender-0.9.10= /lib" "/gnu/store/51fnk9g8zki9nrwsjrzfr0xjifp3h1hd-libxxf86vm-1.1.4/lib" "/= gnu/store/ky3706gprafiahyn1yqdq087chxjacq3-libxmu-1.1.3/lib" "/gnu/store/70= l83y7s875fgvavlw4w5hfgq4av94jl-libxi-1.7.10/lib" "/gnu/store/sf1wl7rqra4yd3= 62x8jg8zx60d4vbfbc-libxt-1.2.1/lib" "/gnu/store/4fm7z0h1vzznvli671gy1w4md0j= bb4f0-libsm-1.2.3/lib" "/gnu/store/p8h3d3ayrrhwlnp0k88zmmzvbncvvba2-libice-= 1.1.1/lib" "/gnu/store/bqk5b108p6wxd5iwmn080zjcfav48wmr-libxext-1.3.4/lib" = "/gnu/store/4775wjc2972kiwfsq710fv5pfzyc5laq-libx11-1.8.7/lib" "/gnu/store/= zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linu= x-gnu/11.4.0/../../..") /gnu/store/q25qb3r6kzhn9w7mac9i9gn4gg45c7v1-torcs-1.3.7/lib/torcs/accc-bin:= error: depends on 'libtxml.so', which cannot be found in RUNPATH ("/gnu/st= ore/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib" "/gnu/store/zzpbp6rr43= smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib" "/gnu/store/9lp5m2znnqizy6qmp8zj= m9gbb9ymvdf5-openal-1.23.1/lib" "/gnu/store/jy396n8qkdlh4cwzjk4avwrppdm2mmi= w-freealut-1.1.0/lib" "/gnu/store/vfijqdrwz8yv3kk3k2609q94n3icpf8f-libvorbi= s-1.3.7/lib" "/gnu/store/3nqlh3kjqybdz3mbzmvsm0piv66ny738-freeglut-3.4.0/li= b" "/gnu/store/bi3haj8fvqf6hzd869rl8hk0nf8w3ga0-glu-9.0.2/lib" "/gnu/store/= 2p06ia11gyldx3icmha2hf3dq1qwkz0k-mesa-24.0.4/lib" "/gnu/store/qj9jhgqn2b9g7= yxdhyw6ki1vz241apkd-libpng-1.6.39/lib" "/gnu/store/1prv14v6jfnzzg7szm57690b= 7fr6sx33-zlib-1.3/lib" "/gnu/store/mf7d6fvd8nvzic48w9f52fx66gyarjg8-libxran= dr-1.5.2/lib" "/gnu/store/c5w905pbjn95pwq2c4saz3n1yznin3lz-libxrender-0.9.1= 0/lib" "/gnu/store/51fnk9g8zki9nrwsjrzfr0xjifp3h1hd-libxxf86vm-1.1.4/lib" "= /gnu/store/ky3706gprafiahyn1yqdq087chxjacq3-libxmu-1.1.3/lib" "/gnu/store/7= 0l83y7s875fgvavlw4w5hfgq4av94jl-libxi-1.7.10/lib" "/gnu/store/sf1wl7rqra4yd= 362x8jg8zx60d4vbfbc-libxt-1.2.1/lib" "/gnu/store/4fm7z0h1vzznvli671gy1w4md0= jbb4f0-libsm-1.2.3/lib" "/gnu/store/p8h3d3ayrrhwlnp0k88zmmzvbncvvba2-libice= -1.1.1/lib" "/gnu/store/bqk5b108p6wxd5iwmn080zjcfav48wmr-libxext-1.3.4/lib"= "/gnu/store/4775wjc2972kiwfsq710fv5pfzyc5laq-libx11-1.8.7/lib" "/gnu/store= /zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-lin= ux-gnu/11.4.0/../../..") [...] /gnu/store/q25qb3r6kzhn9w7mac9i9gn4gg45c7v1-torcs-1.3.7/lib/torcs/trackgen-= bin: error: depends on 'libtxml.so', which cannot be found in RUNPATH ("/gn= u/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib" "/gnu/store/zzpbp6= rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib" "/gnu/store/9lp5m2znnqizy6qm= p8zjm9gbb9ymvdf5-openal-1.23.1/lib" "/gnu/store/jy396n8qkdlh4cwzjk4avwrppdm= 2mmiw-freealut-1.1.0/lib" "/gnu/store/vfijqdrwz8yv3kk3k2609q94n3icpf8f-libv= orbis-1.3.7/lib" "/gnu/store/3nqlh3kjqybdz3mbzmvsm0piv66ny738-freeglut-3.4.= 0/lib" "/gnu/store/bi3haj8fvqf6hzd869rl8hk0nf8w3ga0-glu-9.0.2/lib" "/gnu/st= ore/2p06ia11gyldx3icmha2hf3dq1qwkz0k-mesa-24.0.4/lib" "/gnu/store/qj9jhgqn2= b9g7yxdhyw6ki1vz241apkd-libpng-1.6.39/lib" "/gnu/store/1prv14v6jfnzzg7szm57= 690b7fr6sx33-zlib-1.3/lib" "/gnu/store/mf7d6fvd8nvzic48w9f52fx66gyarjg8-lib= xrandr-1.5.2/lib" "/gnu/store/c5w905pbjn95pwq2c4saz3n1yznin3lz-libxrender-0= .9.10/lib" "/gnu/store/51fnk9g8zki9nrwsjrzfr0xjifp3h1hd-libxxf86vm-1.1.4/li= b" "/gnu/store/ky3706gprafiahyn1yqdq087chxjacq3-libxmu-1.1.3/lib" "/gnu/sto= re/70l83y7s875fgvavlw4w5hfgq4av94jl-libxi-1.7.10/lib" "/gnu/store/sf1wl7rqr= a4yd362x8jg8zx60d4vbfbc-libxt-1.2.1/lib" "/gnu/store/4fm7z0h1vzznvli671gy1w= 4md0jbb4f0-libsm-1.2.3/lib" "/gnu/store/p8h3d3ayrrhwlnp0k88zmmzvbncvvba2-li= bice-1.1.1/lib" "/gnu/store/bqk5b108p6wxd5iwmn080zjcfav48wmr-libxext-1.3.4/= lib" "/gnu/store/4775wjc2972kiwfsq710fv5pfzyc5laq-libx11-1.8.7/lib" "/gnu/s= tore/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknown= -linux-gnu/11.4.0/../../..") validating RUNPATH of 0 binaries in "/gnu/store/q25qb3r6kzhn9w7mac9i9gn4gg4= 5c7v1-torcs-1.3.7/bin"... error: in phase 'validate-runpath': uncaught exception: misc-error #f "RUNPATH validation failed" () #f --8<---------------cut here---------------end--------------->8--- Here's what the link command for the problematic accc-bin binary looks like, when the GUIX_LD_WRAPPER_DEBUG environment variable is set during its build: --8<---------------cut here---------------start------------->8--- g++ mainaccc.o ../../linux/linuxspec.o ac3dload.o ac3dgroup.o -L/tmp/guix-b= uild-torcs-1.3.7.drv-0/torcs-1.3.7/export/lib -lopenal -lalut -lvorbisfile= -L/usr/lib -ltgf -lplibssg -lplibsg -lplibul -ltxml -lplibjs -lplibssgaux= -lplibssg -lplibsm -lplibsl -lplibsg -lplibul -lglut -lGLU -lGL -lpng -lz = -ldl -lXrandr -lXrender -lXxf86vm -lXmu -lXi -lXt -lSM -lICE -lXext -lX11 -= lm -o accc-bin ld-wrapper: library search path: ("/tmp/guix-build-torcs-1.3.7.drv-0/torcs-= 1.3.7/export/lib" "/usr/lib" "/gnu/store/jy396n8qkdlh4cwzjk4avwrppdm2mmiw-f= reealut-1.1.0/lib" "/gnu/store/3nqlh3kjqybdz3mbzmvsm0piv66ny738-freeglut-3.= 4.0/lib" "/gnu/store/p8h3d3ayrrhwlnp0k88zmmzvbncvvba2-libice-1.1.1/lib" "/g= nu/store/qj9jhgqn2b9g7yxdhyw6ki1vz241apkd-libpng-1.6.39/lib" "/gnu/store/4f= m7z0h1vzznvli671gy1w4md0jbb4f0-libsm-1.2.3/lib" "/gnu/store/vfijqdrwz8yv3kk= 3k2609q94n3icpf8f-libvorbis-1.3.7/lib" "/gnu/store/70l83y7s875fgvavlw4w5hfg= q4av94jl-libxi-1.7.10/lib" "/gnu/store/ky3706gprafiahyn1yqdq087chxjacq3-lib= xmu-1.1.3/lib" "/gnu/store/mf7d6fvd8nvzic48w9f52fx66gyarjg8-libxrandr-1.5.2= /lib" "/gnu/store/c5w905pbjn95pwq2c4saz3n1yznin3lz-libxrender-0.9.10/lib" "= /gnu/store/sf1wl7rqra4yd362x8jg8zx60d4vbfbc-libxt-1.2.1/lib" "/gnu/store/2p= 06ia11gyldx3icmha2hf3dq1qwkz0k-mesa-24.0.4/lib" "/gnu/store/9lp5m2znnqizy6q= mp8zjm9gbb9ymvdf5-openal-1.23.1/lib" "/gnu/store/qpnsrgksm6x4r5gna1ys5ndyw6= i2702y-plib-1.8.5/lib" "/gnu/store/1prv14v6jfnzzg7szm57690b7fr6sx33-zlib-1.= 3/lib" "/gnu/store/56aq6sdx35f7rsxq8jq9ypafk0dhd3p3-bzip2-1.0.8/lib" "/gnu/= store/544ga5n6nq8y2961ihigra6n6a0r99nn-file-5.45/lib" "/gnu/store/vrl2r0ps2= 4k1a6yap2chjylv5rhbndvr-gawk-5.3.0/lib" "/gnu/store/fbaw0sb21gv02qq7gs9wg5y= 5wlpdgzih-xz-5.4.5/lib" "/gnu/store/ylgkrq9j1gyfig2y66srmgsbyh9w20d9-binuti= ls-2.41/lib" "/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib" "= /gnu/store/vqdiyyqbrv4akp68pfya4j6m3pdbnhca-glibc-2.39-static/lib" "/gnu/st= ore/bi3haj8fvqf6hzd869rl8hk0nf8w3ga0-glu-9.0.2/lib" "/gnu/store/3ifn85jhvw3= 389fpqpv7dybrgg0l7n1w-libogg-1.3.5/lib" "/gnu/store/q2pikqgf8h5iwxsqs8gqvnn= 2i55fxz43-libxfixes-6.0.0/lib" "/gnu/store/bqk5b108p6wxd5iwmn080zjcfav48wmr= -libxext-1.3.4/lib" "/gnu/store/4775wjc2972kiwfsq710fv5pfzyc5laq-libx11-1.8= .7/lib" "/gnu/store/51fnk9g8zki9nrwsjrzfr0xjifp3h1hd-libxxf86vm-1.1.4/lib" = "/gnu/store/pwgqamvs69ihaz8637i6l15j12zi1282-libxshmfence-1.3/lib" "/gnu/st= ore/y9xx5ks01hxfn4aqbbn7cix1rbs9040b-libxdamage-1.1.5/lib" "/gnu/store/87yw= 5bz6mx2ddj97zhgcn2k6lyzi6prr-libvdpau-1.5/lib" "/gnu/store/17p7fhm5p0yh07ds= inqnj6q436g6h9yq-libdrm-2.4.120/lib" "/gnu/store/w0mwibxna4hbh8n8cdx5kinsaz= bm7w5j-util-macros-1.19.3/lib" "/gnu/store/y5a0l9a3z214yar8q7mznqqd4pnw0vvp= -libxcb-1.15/lib" "/gnu/store/an3mrydqv3x9kzkv45jcay0jh301v06q-libpciaccess= -0.16/lib" "/gnu/store/v712yc2mwkc10m1nzgjz3linnvl5i1dh-libxdmcp-1.1.3/lib"= "/gnu/store/wxwv020jwxq9gr070vwy3fh8n028gwqg-libxau-1.0.10/lib" "/gnu/stor= e/v6idf8ad18h01dryqin9r40k1jbhh1lb-libpthread-stubs-0.4/lib" "/gnu/store/zz= pbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-= gnu/11.4.0" "/gnu/store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib= /gcc/x86_64-unknown-linux-gnu/11.4.0/../../.." "/gnu/store/zvlp3n8iwa1svxmw= v4q22pv1pb1c9pjq-glibc-2.39/lib" "/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9p= jq-glibc-2.39/lib") ld-wrapper: libraries linked: ("/gnu/store/9lp5m2znnqizy6qmp8zjm9gbb9ymvdf5= -openal-1.23.1/lib/libopenal.so" "/gnu/store/jy396n8qkdlh4cwzjk4avwrppdm2mm= iw-freealut-1.1.0/lib/libalut.so" "/gnu/store/vfijqdrwz8yv3kk3k2609q94n3icp= f8f-libvorbis-1.3.7/lib/libvorbisfile.so" "/tmp/guix-build-torcs-1.3.7.drv-= 0/torcs-1.3.7/export/lib/libtgf.so" "/tmp/guix-build-torcs-1.3.7.drv-0/torc= s-1.3.7/export/lib/libtxml.so" "/gnu/store/3nqlh3kjqybdz3mbzmvsm0piv66ny738= -freeglut-3.4.0/lib/libglut.so" "/gnu/store/bi3haj8fvqf6hzd869rl8hk0nf8w3ga= 0-glu-9.0.2/lib/libGLU.so" "/gnu/store/2p06ia11gyldx3icmha2hf3dq1qwkz0k-mes= a-24.0.4/lib/libGL.so" "/gnu/store/qj9jhgqn2b9g7yxdhyw6ki1vz241apkd-libpng-= 1.6.39/lib/libpng.so" "/gnu/store/1prv14v6jfnzzg7szm57690b7fr6sx33-zlib-1.3= /lib/libz.so" "/gnu/store/mf7d6fvd8nvzic48w9f52fx66gyarjg8-libxrandr-1.5.2/= lib/libXrandr.so" "/gnu/store/c5w905pbjn95pwq2c4saz3n1yznin3lz-libxrender-0= .9.10/lib/libXrender.so" "/gnu/store/51fnk9g8zki9nrwsjrzfr0xjifp3h1hd-libxx= f86vm-1.1.4/lib/libXxf86vm.so" "/gnu/store/ky3706gprafiahyn1yqdq087chxjacq3= -libxmu-1.1.3/lib/libXmu.so" "/gnu/store/70l83y7s875fgvavlw4w5hfgq4av94jl-l= ibxi-1.7.10/lib/libXi.so" "/gnu/store/sf1wl7rqra4yd362x8jg8zx60d4vbfbc-libx= t-1.2.1/lib/libXt.so" "/gnu/store/4fm7z0h1vzznvli671gy1w4md0jbb4f0-libsm-1.= 2.3/lib/libSM.so" "/gnu/store/p8h3d3ayrrhwlnp0k88zmmzvbncvvba2-libice-1.1.1= /lib/libICE.so" "/gnu/store/bqk5b108p6wxd5iwmn080zjcfav48wmr-libxext-1.3.4/= lib/libXext.so" "/gnu/store/4775wjc2972kiwfsq710fv5pfzyc5laq-libx11-1.8.7/l= ib/libX11.so" "/gnu/store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/l= ib/gcc/x86_64-unknown-linux-gnu/11.4.0/../../../libstdc++.so" "/gnu/store/z= vlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/libm.so" "/gnu/store/zzpbp6r= r43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/1= 1.4.0/../../../libgcc_s.so" "/gnu/store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gc= c-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0/../../../libgcc_s.so" = "/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/libc.so" "/gnu/= store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknow= n-linux-gnu/11.4.0/../../../libgcc_s.so") ld-wrapper: invoking `/gnu/store/ylgkrq9j1gyfig2y66srmgsbyh9w20d9-binutils-= 2.41/bin/ld' with ("-plugin" "/gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-g= cc-11.4.0/libexec/gcc/x86_64-unknown-linux-gnu/11.4.0/liblto_plugin.so" "-p= lugin-opt=3D/gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/libexec/= gcc/x86_64-unknown-linux-gnu/11.4.0/lto-wrapper" "-plugin-opt=3D-fresolutio= n=3D/tmp/guix-build-torcs-1.3.7.drv-0/ccPooqSE.res" "-plugin-opt=3D-pass-th= rough=3D-lgcc_s" "-plugin-opt=3D-pass-through=3D-lgcc" "-plugin-opt=3D-pass= -through=3D-lgcc_s" "-plugin-opt=3D-pass-through=3D-lc" "-plugin-opt=3D-pas= s-through=3D-lgcc_s" "-plugin-opt=3D-pass-through=3D-lgcc" "--eh-frame-hdr"= "-m" "elf_x86_64" "-dynamic-linker" "/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb= 1c9pjq-glibc-2.39/lib/ld-linux-x86-64.so.2" "-o" "accc-bin" "/gnu/store/zvl= p3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/crt1.o" "/gnu/store/zvlp3n8iwa= 1svxmwv4q22pv1pb1c9pjq-glibc-2.39/lib/crti.o" "/gnu/store/zzpbp6rr43smwxzvz= d4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0/crtb= egin.o" "-L/tmp/guix-build-torcs-1.3.7.drv-0/torcs-1.3.7/export/lib" "-L/us= r/lib" "-L/gnu/store/jy396n8qkdlh4cwzjk4avwrppdm2mmiw-freealut-1.1.0/lib" "= -L/gnu/store/3nqlh3kjqybdz3mbzmvsm0piv66ny738-freeglut-3.4.0/lib" "-L/gnu/s= tore/p8h3d3ayrrhwlnp0k88zmmzvbncvvba2-libice-1.1.1/lib" "-L/gnu/store/qj9jh= gqn2b9g7yxdhyw6ki1vz241apkd-libpng-1.6.39/lib" "-L/gnu/store/4fm7z0h1vzznvl= i671gy1w4md0jbb4f0-libsm-1.2.3/lib" "-L/gnu/store/vfijqdrwz8yv3kk3k2609q94n= 3icpf8f-libvorbis-1.3.7/lib" "-L/gnu/store/70l83y7s875fgvavlw4w5hfgq4av94jl= -libxi-1.7.10/lib" "-L/gnu/store/ky3706gprafiahyn1yqdq087chxjacq3-libxmu-1.= 1.3/lib" "-L/gnu/store/mf7d6fvd8nvzic48w9f52fx66gyarjg8-libxrandr-1.5.2/lib= " "-L/gnu/store/c5w905pbjn95pwq2c4saz3n1yznin3lz-libxrender-0.9.10/lib" "-L= /gnu/store/sf1wl7rqra4yd362x8jg8zx60d4vbfbc-libxt-1.2.1/lib" "-L/gnu/store/= 2p06ia11gyldx3icmha2hf3dq1qwkz0k-mesa-24.0.4/lib" "-L/gnu/store/9lp5m2znnqi= zy6qmp8zjm9gbb9ymvdf5-openal-1.23.1/lib" "-L/gnu/store/qpnsrgksm6x4r5gna1ys= 5ndyw6i2702y-plib-1.8.5/lib" "-L/gnu/store/1prv14v6jfnzzg7szm57690b7fr6sx33= -zlib-1.3/lib" "-L/gnu/store/56aq6sdx35f7rsxq8jq9ypafk0dhd3p3-bzip2-1.0.8/l= ib" "-L/gnu/store/544ga5n6nq8y2961ihigra6n6a0r99nn-file-5.45/lib" "-L/gnu/s= tore/vrl2r0ps24k1a6yap2chjylv5rhbndvr-gawk-5.3.0/lib" "-L/gnu/store/fbaw0sb= 21gv02qq7gs9wg5y5wlpdgzih-xz-5.4.5/lib" "-L/gnu/store/ylgkrq9j1gyfig2y66srm= gsbyh9w20d9-binutils-2.41/lib" "-L/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9p= jq-glibc-2.39/lib" "-L/gnu/store/vqdiyyqbrv4akp68pfya4j6m3pdbnhca-glibc-2.3= 9-static/lib" "-L/gnu/store/bi3haj8fvqf6hzd869rl8hk0nf8w3ga0-glu-9.0.2/lib"= "-L/gnu/store/3ifn85jhvw3389fpqpv7dybrgg0l7n1w-libogg-1.3.5/lib" "-L/gnu/s= tore/q2pikqgf8h5iwxsqs8gqvnn2i55fxz43-libxfixes-6.0.0/lib" "-L/gnu/store/bq= k5b108p6wxd5iwmn080zjcfav48wmr-libxext-1.3.4/lib" "-L/gnu/store/4775wjc2972= kiwfsq710fv5pfzyc5laq-libx11-1.8.7/lib" "-L/gnu/store/51fnk9g8zki9nrwsjrzfr= 0xjifp3h1hd-libxxf86vm-1.1.4/lib" "-L/gnu/store/pwgqamvs69ihaz8637i6l15j12z= i1282-libxshmfence-1.3/lib" "-L/gnu/store/y9xx5ks01hxfn4aqbbn7cix1rbs9040b-= libxdamage-1.1.5/lib" "-L/gnu/store/87yw5bz6mx2ddj97zhgcn2k6lyzi6prr-libvdp= au-1.5/lib" "-L/gnu/store/17p7fhm5p0yh07dsinqnj6q436g6h9yq-libdrm-2.4.120/l= ib" "-L/gnu/store/w0mwibxna4hbh8n8cdx5kinsazbm7w5j-util-macros-1.19.3/lib" = "-L/gnu/store/y5a0l9a3z214yar8q7mznqqd4pnw0vvp-libxcb-1.15/lib" "-L/gnu/sto= re/an3mrydqv3x9kzkv45jcay0jh301v06q-libpciaccess-0.16/lib" "-L/gnu/store/v7= 12yc2mwkc10m1nzgjz3linnvl5i1dh-libxdmcp-1.1.3/lib" "-L/gnu/store/wxwv020jwx= q9gr070vwy3fh8n028gwqg-libxau-1.0.10/lib" "-L/gnu/store/v6idf8ad18h01dryqin= 9r40k1jbhh1lb-libpthread-stubs-0.4/lib" "-L/gnu/store/zzpbp6rr43smwxzvzd4qd= 317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0" "-L/gnu= /store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unkno= wn-linux-gnu/11.4.0/../../.." "-L/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pj= q-glibc-2.39/lib" "mainaccc.o" "../../linux/linuxspec.o" "ac3dload.o" "ac3d= group.o" "-lopenal" "-lalut" "-lvorbisfile" "-ltgf" "-lplibssg" "-lplibsg" = "-lplibul" "-ltxml" "-lplibjs" "-lplibssgaux" "-lplibssg" "-lplibsm" "-lpli= bsl" "-lplibsg" "-lplibul" "-lglut" "-lGLU" "-lGL" "-lpng" "-lz" "-ldl" "-l= Xrandr" "-lXrender" "-lXxf86vm" "-lXmu" "-lXi" "-lXt" "-lSM" "-lICE" "-lXex= t" "-lX11" "-lstdc++" "-lm" "-lgcc_s" "-lgcc" "-L/gnu/store/zvlp3n8iwa1svxm= wv4q22pv1pb1c9pjq-glibc-2.39/lib" "-rpath=3D/gnu/store/zvlp3n8iwa1svxmwv4q2= 2pv1pb1c9pjq-glibc-2.39/lib" "-rpath=3D/gnu/store/zzpbp6rr43smwxzvzd4qd317z= 5j7qblj-gcc-11.4.0-lib/lib" "-lgcc_s" "-lc" "-lgcc_s" "-lgcc" "/gnu/store/z= zpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux= -gnu/11.4.0/crtend.o" "/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.= 39/lib/crtn.o" "-rpath" "/gnu/store/9lp5m2znnqizy6qmp8zjm9gbb9ymvdf5-openal= -1.23.1/lib" "-rpath" "/gnu/store/jy396n8qkdlh4cwzjk4avwrppdm2mmiw-freealut= -1.1.0/lib" "-rpath" "/gnu/store/vfijqdrwz8yv3kk3k2609q94n3icpf8f-libvorbis= -1.3.7/lib" "-rpath" "/gnu/store/3nqlh3kjqybdz3mbzmvsm0piv66ny738-freeglut-= 3.4.0/lib" "-rpath" "/gnu/store/bi3haj8fvqf6hzd869rl8hk0nf8w3ga0-glu-9.0.2/= lib" "-rpath" "/gnu/store/2p06ia11gyldx3icmha2hf3dq1qwkz0k-mesa-24.0.4/lib"= "-rpath" "/gnu/store/qj9jhgqn2b9g7yxdhyw6ki1vz241apkd-libpng-1.6.39/lib" "= -rpath" "/gnu/store/1prv14v6jfnzzg7szm57690b7fr6sx33-zlib-1.3/lib" "-rpath"= "/gnu/store/mf7d6fvd8nvzic48w9f52fx66gyarjg8-libxrandr-1.5.2/lib" "-rpath"= "/gnu/store/c5w905pbjn95pwq2c4saz3n1yznin3lz-libxrender-0.9.10/lib" "-rpat= h" "/gnu/store/51fnk9g8zki9nrwsjrzfr0xjifp3h1hd-libxxf86vm-1.1.4/lib" "-rpa= th" "/gnu/store/ky3706gprafiahyn1yqdq087chxjacq3-libxmu-1.1.3/lib" "-rpath"= "/gnu/store/70l83y7s875fgvavlw4w5hfgq4av94jl-libxi-1.7.10/lib" "-rpath" "/= gnu/store/sf1wl7rqra4yd362x8jg8zx60d4vbfbc-libxt-1.2.1/lib" "-rpath" "/gnu/= store/4fm7z0h1vzznvli671gy1w4md0jbb4f0-libsm-1.2.3/lib" "-rpath" "/gnu/stor= e/p8h3d3ayrrhwlnp0k88zmmzvbncvvba2-libice-1.1.1/lib" "-rpath" "/gnu/store/b= qk5b108p6wxd5iwmn080zjcfav48wmr-libxext-1.3.4/lib" "-rpath" "/gnu/store/477= 5wjc2972kiwfsq710fv5pfzyc5laq-libx11-1.8.7/lib" "-rpath" "/gnu/store/zzpbp6= rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/= 11.4.0/../../.." "-rpath" "/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glib= c-2.39/lib" "-rpath" "/gnu/store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.= 0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0/../../.." "-rpath" "/gnu/stor= e/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-li= nux-gnu/11.4.0/../../.." "-rpath" "/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9= pjq-glibc-2.39/lib" "-rpath" "/gnu/store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-g= cc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0/../../..") --8<---------------cut here---------------end--------------->8--- So we see that ld-wrapper saw the accc-bin binary being linked against the package's own /tmp/guix-build-torcs-1.3.7.drv-0/torcs-1.3.7/export/lib/libtgf.so, but this is later dismissed for "not being in the store", by this code in gnu/packages/ld-wrapper.in: --8<---------------cut here---------------start------------->8--- (define (rpath-arguments library-files) ;; Return the `-rpath' argument list for each of LIBRARY-FILES, a list of ;; absolute file names. (fold-right (lambda (file args) ;; Add '-rpath' if and only if FILE is in the store; we don= 't ;; want to add '-rpath' for files under %BUILD-DIRECTORY or ;; %TEMPORARY-DIRECTORY because that could leak to installed ;; files. (cond ((and (not %disable-rpath?) (store-file-name? file)) (cons* "-rpath" (dirname file) args)) ((or %allow-impurities? (pure-file-name? file)) args) (else (begin (format (current-error-port) "ld-wrapper: error: attempt to use \ library outside of ~a: ~s~%" %store-directory file) (exit 1))))) '() library-files)) --8<---------------cut here---------------end--------------->8--- (pure-file-name? x) returns #t (it considers build directory files as "pure"), but the args is not augmented with -rpath in this case, so the link directives are simply skipped. One idea could be to allow creating rpaths to %BUILD-DIRECTORY prefixed libraries, and have these entries refined in a phase that would run after the package is installed, before the validate-runpath phase runs. It could be called e.g. 'sanitize-runpath' and proceed along those lines: Scan for RUNPATH entries being prefixed by %BUILD-DIRECTORY; attempt to have them rewritten to libraries (.so) found under the package's own libdir library prefix (at any depth), including a potential "lib" output. In case it couldn't, it would error. Does that sound feasible? --=20 Thanks, Maxim