From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 2ODNI6lkXGe9AgEAe85BDQ:P1 (envelope-from ) for ; Fri, 13 Dec 2024 16:45:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2ODNI6lkXGe9AgEAe85BDQ (envelope-from ) for ; Fri, 13 Dec 2024 17:45:29 +0100 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=DJUu8L1Y; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=C7dVpe2O; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=GoBRCEC1; 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=wolfsden.cz (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734108329; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=A4V4gH8myMr85wj4VcHpP/dDQUNwhIGd20QubuIjA40=; b=r/hYPvJ1+j4dgpG5aEuhLf1xQY1PlIgqSUoAaCjHvkix8TtHFYGcvH/VZhhJhojNZ10C0D 3Ry9xad5Gc4lrZT+DOyjVYiGxzHGe0UkKZP5hLCgdtuSsBnC3gI2a65uoPUy4ewUV1Ojsw 3fCybEYTfKzw+jmmZziW9PQJi9l/n/V9NldW9iuBYZp9Am7wkEYgwZcZtWGY3pAqxUUIaR N0UDWUaUQVfNhJW4AxuimSc/QYL+w8vt/AfNru8ggOeHIVcjh2Z0gfgnpd/6G2U3Lhim7W iK0CtSt2TBAd1eKdApAaTS6+M1BueyyICbac0onK5nkg+gSwrcJQUytPhqYoKg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=DJUu8L1Y; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=C7dVpe2O; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=GoBRCEC1; 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=wolfsden.cz (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734108329; a=rsa-sha256; cv=none; b=IfRB30mAklWOxIirgT1AaHac4d+TMNg9NSEBTJ2XFKT3iulUEUov+PIJ/rb6ZCcE0p5qaE qLwEGj71FvsWoecCfVFFKSsqh0pR35zvzY+E6s6Ce1LYVHEUs1FM0xc2tVYv3lpcg1vJB5 /12VLiYMOpHRaEY707DOyY7cx3dlA9V63p69qn/OVdW0nNtNS/JFnVldo5C+GOmKnD1fvh BzP+Gmn3xXboDQGAWZyD0QGvIFQFXT2akaURXzaJb1EmW51S+fOMMif9xU+H6DLMo5X2hr OY2ruDYCEicfwDqtjDyPgEVwx532LQpf9o1kswQEqR3ONkIPgNbw+SxAKN+PaA== 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 317048BFED for ; Fri, 13 Dec 2024 17:45:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM8mp-0007GN-9J; Fri, 13 Dec 2024 11:45:07 -0500 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 1tM8ml-0007Fx-OX for bug-guix@gnu.org; Fri, 13 Dec 2024 11:45:04 -0500 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 1tM8ml-0007Rn-Ey for bug-guix@gnu.org; Fri, 13 Dec 2024 11:45:03 -0500 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:References:In-Reply-To:From:To:Subject; bh=A4V4gH8myMr85wj4VcHpP/dDQUNwhIGd20QubuIjA40=; b=DJUu8L1YrsGWiIn7ZgkQbmwFyCsKPXP57gF0FbJU6rxNK7IBSjtHuk7tjcaAY2oQn7r5n9GJFUGjbaalhDz+o/y9XW3F5pajz32DOQQbm4IIMmTsBumiJYiRTcmjkSB1WnnAoJ4hVr7sks7uSGMnfQH6K3bhk/RVyFj48edP+IWxjAUdaLqwhWel3gS+NzqQ03vsUc04KYMF77HTk5tnC/55VcHaDV4grseX7nhTNIrQ/18HOoP54zNdoFf4Mi3mxUwk++lA7xwBgX7L7tZqJ42C4wZ8E4bV/4+IirK7P3Te2SR5UGkdbBtpLP7LH/YDqqbXxm7itqzjwHjAbh7FEg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tM8mk-00083o-3H for bug-guix@gnu.org; Fri, 13 Dec 2024 11:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#74532: with-extensions does not add native extensions to the load path Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 13 Dec 2024 16:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74532 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Z572 Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 74532@debbugs.gnu.org Received: via spool by 74532-submit@debbugs.gnu.org id=B74532.173410825530895 (code B ref 74532); Fri, 13 Dec 2024 16:45:02 +0000 Received: (at 74532) by debbugs.gnu.org; 13 Dec 2024 16:44:15 +0000 Received: from localhost ([127.0.0.1]:43938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tM8lz-00082E-DE for submit@debbugs.gnu.org; Fri, 13 Dec 2024 11:44:15 -0500 Received: from wolfsden.cz ([37.205.8.62]:58122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tM8lw-000824-4F for 74532@debbugs.gnu.org; Fri, 13 Dec 2024 11:44:13 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 8A5D835EF6A; Fri, 13 Dec 2024 16:44:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1734108250; bh=OBErH/hLvhSGeyN7JynmjULdZxJq96RU+4JD4leloJU=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=C7dVpe2OiO6VjQMvYjkUM+qWkA/+Pw6wXUHvXaqflCHl8ZA6IdcdaAe12qQ6X/czD WLzSXhSZgXCXBhdNvBujUMSQGdqyJQSjKmzXmqavUJvP4Oo5utEFVkNKmPS/QUtyVA uL1+sMEVY27z4ecxnHKJqzFVgbtyVTHsmj3wJo9NoWN2ZDfKY6B7jdWhGuJxA9hILT HBDR7suqJYrwxbhTlnN+Ut4Uz8m3LR05w10PZSoazujRJlcttn6vURadziXt+1Kl/X X/0oA6bBP4XUPFV+DCXp8uCRz3eqnk7do4t9R7LRZ0iTQwKo5oME/FBR9gqqW2iz9v 9hYtTrTIXcM+TWbB0kH/Kv0lg7isGMWixFvlwJjzI1e0e/i69YkZ6qrIwLjHghj5Nc auwfZgViVgQb/DR+d6UzyvpWKDa0c9G27nXTvVd3e8fyQYh1VyMOu6WYIhn2eph91P voh6vpdNG+heEFfrsW5A7+FuQHi+hp2nncBl4Fwg5VTUe0X2WoApTgatkdi7ipNGtq M9UN7KIgTOs6H3NA+9ZEcoQufma/ziAPW4uuszOkGm50ebdyxVGeLfYPflcCqZ+aFH 4aCOpbCPrihFCtEGIFJ06nI0eXpFPdXEzxa7IudBIuBpdw/5/V1/VtGcl7b1w0b44a U3MBzWqDfAQjuqAjcx2Lq/s0= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id B31F236058F; Fri, 13 Dec 2024 16:44:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1734108249; bh=OBErH/hLvhSGeyN7JynmjULdZxJq96RU+4JD4leloJU=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=GoBRCEC1Kxr1hNRjVabqBzoLTH0/V3mar94Xw27kxax98+J/ox1JKGvCrE+RC3xmV zicA4VajMuhd4j+thGK33MeBkmbEIvpoIzR1XGJedutyV5a1/fbElFoOcqwFf66EU9 MshMbhHsl0dm4tKaA0lzHFFli2cAQ6KnU8Xs0tgPXcPaVGpGE6TUDBTO/DQnWyU5wg FwUCWXKvppym+raGLQuZvmuNuh+L1F+KlLil4y80GFgpyFth04V6nUAQIiaPsyE87w VeGcu8kpvI8ZNdiso+oI3CqozbkQFwRc3KIOkKNkONwYRqX1l0vJGUdYI6luyzLMKx xpcofWDDCdYXu0RPFjqNl/zPWhdVDxY31bh2AJuZ9FJ4vJURQnNVe3TcRErCOA0qz5 D6m1BMX7JNhHLJt0idVNOJHk6dMJxoLNiJ+I77bxG3cQXTW/HEcPPl2BzhCVLiqCC8 gTYzMQDU4sJ5N4IdIvFBiGp1O+x+6sNlzNM3C7tPTJYzxBoXodCH9h/jfyF75uci0v 80Rygh39W5hp4t7FWzQRkpfB4crsfj93niGbgdJONjrEFc8ARuOf7G/sNMwSEImrVk IeeoEeFKTIBVmthR9AW1YEQmrKLvtHLGdMYB7p5l19pLW7ZDntoL2ILAi+oOkkCwX7 UlLP6IBXJ6OFzQiIGCnVoxoE= From: Tomas Volf <~@wolfsden.cz> In-Reply-To: <87y10x4g2w.fsf@iscas.ac.cn> (zhengjunjie@iscas.ac.cn's message of "Tue, 03 Dec 2024 11:10:15 +0800") References: <871pyzdwzi.fsf@wolfsden.cz> <877c8n94kl.fsf@gnu.org> <87plm93b7p.fsf@wolfsden.cz> <87y10x4g2w.fsf@iscas.ac.cn> Date: Fri, 13 Dec 2024 17:44:09 +0100 Message-ID: <87o71flehy.fsf@wolfsden.cz> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: 0.11 X-Spam-Score: 0.11 X-Migadu-Queue-Id: 317048BFED X-TUID: zcOZFmTu3IFC --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello, Z572 writes: >> How it that usually done? I cannot do that *before* build, because then >> tests would not run (the library is not yet installed into the absolute >> path), and I cannot do it after, because I would need to rebuild the .go >> files after patching the source code. > > you can use substitute* to adjust source. > e.g. > > (or (false-if-exception (load-extension "/path/to/lib-some-object-file.so= ")) > (load-extension "lib-some-object-file.so")) > Thank you for the suggestion. I am not sure I like the false-if-exception part, but temporary adjustment of the (@ (system foreign-library) guile-extensions-path) should do the trick as well. One thing I am curious about, I can see you have put the load from absolute path as the first alternative. But if it fails, it still falls back to lookup based on the guile-extensions-path. I wonder whether putting it at the end of the list would not be better, that way you could still replace the library in the spirit of LD_PRELOAD by setting the appropriate environment variable. And if reproducibility is the priority, then even the `or' might not make sense. Any thoughts on that? Thanks, Tomas =2D-=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmdcZFkOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/wakTlg/9FoMOQ/oOx1tN0mrl3wwcTbbZh5MRX9XF5+v0 En5BCvWWuysmkC9nxS2YhS9GlEXV4qEc5pkfL8QbvcvcL2PYsxB/uIY5q+dJXVDl 5f+Be6e71ptlEz6Hk9/IWpPgj9/t+EixFfA4Q/XIsoxsy4b9KGrIlDJDQiX2R+h+ YM90uymr9gXj9lDZsn8J4gFEaQaVxLr6V7mCIRGVL2oobEVOPGnKwswAVarfhx6a AdPGU3VCRezbn3D6NtFi2hrUXSfwpPNQ86VltBu6yS+2rBaYwI6f/fExJV+IZoDu rekFf80wU9BEMwNJCNJPy5FvkAbqTNRRQ8ox9LnuDhlPTvFvYp9wjV7YVUqT1+1p go/YUUyGu9Pko2WbW0oe0WbhEqWkFhMW39GteJ0P7C22KT9m/IY7E2kEp0+0rJ6B bi1rZ862bvVQ0VQ8bIuVksCd5ZV5CsAnND4Y0gCv3QW/Uw2P7OjpG5g+puHOmwCH tkuxB4kV+Qrpr+mY1sL6EQZqDWsdHzN0B1VKTI3MdGYnvUCoHibJcoYIhVe0aiWi nIX+cyACJ8qNgluB9VM+9TqCLvnDuyJ0Lall+VZrfrybXoXAAlt+Snylm4iBPvb9 KrE7vzLEIGEMz3hvX3m/nG+qNI6vcdOL7MrE+JnWpwjMCwmMrxzeTsbshcbl3DmU L4q8mgc= =Jjva -----END PGP SIGNATURE----- --=-=-=--