Received: (at 74532) by debbugs.gnu.org; 17 Dec 2024 13:55:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 17 08:55:41 2024 Received: from localhost ([127.0.0.1]:58154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tNY33-0000tr-Dy for submit <at> debbugs.gnu.org; Tue, 17 Dec 2024 08:55:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tNY2y-0000tU-5r for 74532 <at> debbugs.gnu.org; Tue, 17 Dec 2024 08:55:39 -0500 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 <ludo@HIDDEN>) id 1tNY2r-0007fp-EX; Tue, 17 Dec 2024 08:55:29 -0500 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=L1SjFebVNuJpKjx3Qhwb8OKAHVrTyEAfNWXHexsHWb4=; b=FmC3AiVdSmBEcG/juDNG XPLUQ+3dgey1rynK3JspMzqz+OHbQsqFrqrNaP1cIDSBesfI3sXwXl/C77xXe4HrGryesBLZYDUtq 0HKAJUCI1t5pQvGW33+ycj2s3Do49y9/CwoZSceXuwYU9vzbpu2sA0f4dPHlkGONP/xwjCMSZlHqV WfuSC97JcHHWTnIWfAEixB6dFcS7lrHDAhpWBXdx/dtmqIL4oO8esOkcwwkovmeLguJK3dzC4ogF7 FDud8cyOgDLvxBRREnKNOBKcxX0zTFQfjitB8tq8xu56XNKUl/FM5ZYlQsvHyguPfas69QPKFh5cA WDEgOXb0nn/k9g==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Tomas Volf <~@wolfsden.cz> Subject: Re: bug#74532: with-extensions does not add native extensions to the load path In-Reply-To: <87o71flehy.fsf@HIDDEN> (Tomas Volf's message of "Fri, 13 Dec 2024 17:44:09 +0100") References: <871pyzdwzi.fsf@HIDDEN> <877c8n94kl.fsf@HIDDEN> <87plm93b7p.fsf@HIDDEN> <87y10x4g2w.fsf@HIDDEN> <87o71flehy.fsf@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Septidi 27 Frimaire an 233 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour du =?utf-8?Q?Li=C3=A8ge?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 17 Dec 2024 14:55:06 +0100 Message-ID: <87bjxapg79.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) 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: 74532 Cc: Z572 <zhengjunjie@HIDDEN>, 74532 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Tomas Volf <~@wolfsden.cz> skribis: > Z572 <zhengjunjie@HIDDEN> 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.s= o")) >> (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. I think you can just do: (load-extension "/path/to/lib-some-object-file.so") but you need to (1) do that in a post-install phase, and (2) re-run =E2=80=98make=E2=80=99 before =E2=80=98make install=E2=80=99 if necessary. See =E2=80=98guile-gdbm-ffi=E2=80=99 as one example. Ludo=E2=80=99.
bug-guix@HIDDEN
:bug#74532
; Package guix
.
Full text available.Received: (at 74532) by debbugs.gnu.org; 13 Dec 2024 16:44:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 13 11:44:15 2024 Received: from localhost ([127.0.0.1]:43938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tM8lz-00082E-DE for submit <at> 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 <at> 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= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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> To: Z572 <zhengjunjie@HIDDEN> Subject: Re: bug#74532: with-extensions does not add native extensions to the load path In-Reply-To: <87y10x4g2w.fsf@HIDDEN> (zhengjunjie@HIDDEN's message of "Tue, 03 Dec 2024 11:10:15 +0800") References: <871pyzdwzi.fsf@HIDDEN> <877c8n94kl.fsf@HIDDEN> <87plm93b7p.fsf@HIDDEN> <87y10x4g2w.fsf@HIDDEN> Date: Fri, 13 Dec 2024 17:44:09 +0100 Message-ID: <87o71flehy.fsf@HIDDEN> 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74532 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 74532 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello, Z572 <zhengjunjie@HIDDEN> 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----- --=-=-=--
bug-guix@HIDDEN
:bug#74532
; Package guix
.
Full text available.Received: (at 74532) by debbugs.gnu.org; 3 Dec 2024 03:10:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 02 22:10:34 2024 Received: from localhost ([127.0.0.1]:57448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tIJJ4-0000yZ-AP for submit <at> debbugs.gnu.org; Mon, 02 Dec 2024 22:10:34 -0500 Received: from smtp81.cstnet.cn ([159.226.251.81]:35182 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <zhengjunjie@HIDDEN>) id 1tIJJ1-0000yK-Lo for 74532 <at> debbugs.gnu.org; Mon, 02 Dec 2024 22:10:32 -0500 Received: from m (unknown [107.174.64.25]) by APP-03 (Coremail) with SMTP id rQCowAAnyO2adk5nyqpXBw--.29072S2; Tue, 03 Dec 2024 11:10:22 +0800 (CST) From: Z572 <zhengjunjie@HIDDEN> To: Tomas Volf <~@wolfsden.cz> Subject: Re: bug#74532: with-extensions does not add native extensions to the load path In-Reply-To: <87plm93b7p.fsf@HIDDEN> (Tomas Volf's message of "Tue, 03 Dec 2024 00:40:42 +0100") References: <871pyzdwzi.fsf@HIDDEN> <877c8n94kl.fsf@HIDDEN> <87plm93b7p.fsf@HIDDEN> User-Agent: mu4e 1.12.7; emacs 30.0.92 Date: Tue, 03 Dec 2024 11:10:15 +0800 Message-ID: <87y10x4g2w.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-CM-TRANSID: rQCowAAnyO2adk5nyqpXBw--.29072S2 X-Coremail-Antispam: 1UD129KBjvJXoWxCw43CF47GFWxZrWxKry7Awb_yoW5tr17pF WfK3WUKFWDJw1rCw1q9w17tr1akr18tF43GrnYgw4jka9xZryS9rWxtr4F9a4xCw4rWrW7 ua1v934DXasrZ3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvCb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwV C2z280aVCY1x0267AKxVW8Jr0_Cr1UM2vj62AExVA0xI801c8C04v26x02cVCv0xWle2I2 62IYc4CY6c8Ij28IcVAaY2xG8wASzI0EjI02j7AqF2xKxwAqx4xG64xvF2IEw4CE5I8CrV C2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE 7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbV WUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF 67kF1VAFwI0_Jrv_JF1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42 IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF 0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2Kf nxnUUI43ZEXa7IUeqFAtUUUUU== X-Originating-IP: [107.174.64.25] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74532 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 74532 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tomas Volf <~@wolfsden.cz> writes: > Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > >> Hi, >> >> Tomas Volf <~@wolfsden.cz> skribis: >> >>> The documentation for `with-extensions' says: >>> >>>> In the same vein, sometimes you want to import not just pure-Scheme >>>> modules, but also =E2=80=9Cextensions=E2=80=9D such as Guile bindings = to C libraries >>>> or other =E2=80=9Cfull-blown=E2=80=9D packages. >> >> It=E2=80=99s not just bindings but also pure Scheme libraries like Guile= -JSON. > > True, and for those it works well. However the text documentation > explicitly mentions "bindings to C libraries" as one of the use > cases. :) > >> >>> However it does not actually add those C libraries into >>> (guile-extensions-path), which means that trying to actually use a >>> library imported this way will lead to an error. >> >> [...] >> >>> 190:25 1 (load-foreign-library _ #:extensions _ #:search-ltdl-libra= ry-path? _ # _ # _ # =E2=80=A6) >>> In unknown file: >>> 0 (dlopen "libguile-yamlpp.so" 1) >>> >>> ERROR: In procedure dlopen: >>> In procedure dlopen: file "libguile-yamlpp.so", message "libguile-yamlp= p.so: cannot open shared object file: No such file or directory" >> >> Usually, packages like these (guile-gnutls, guile-git, guile-ssh, etc.) >> have their .so absolute file name hard-coded, which sidesteps this >> problem entirely. I recommend doing that for guile-yamlpp as well. > > 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")) > > Assuming I have a guile library that creates a new .so library during > the build, and the .so library must be loadable by the other modules in > the library during the build (and for the tests), how should I approach > that? > > I am pretty sure I cannot just patch the source code, since the library > would not be installed into the absolute path yet during the build. > > Honestly, setting GUILE_EXTENSIONS_PATH via pre-inst-env seemed like > fairly elegant solution. > >> >> That said, it would probably make sense to arrange for =E2=80=98with-ext= ensions=E2=80=99 >> to set GUILE_EXTENSIONS_PATH. > > That would be great. My current work-around is > > (with-extensions (list guile-wolfsden) > (program-file > "audio-cycle-sinks" > #~(begin > ;; Bug 74532: Native extensions are not added to the load path. > (eval-when (expand load eval) > (let ((ext-path (@ (system foreign-library) guile-extensions-p= ath))) > ;; Just a temporary hack, we can live with duplicates in the= path. > (ext-path (cons #$(file-append guile-wolfsden > "/lib/guile/3.0/extensions") > (ext-path))))) > ...))) > > which is anything but elegant. > >> >> Ludo=E2=80=99. >> >> PS: Your MUA sets =E2=80=9CMail-Followup-To: bug-guix@HIDDEN=E2=80=9D, = which is kinda >> annoying because that=E2=80=99s the wrong address when replying to a= bug. >> :-) > > Thanks for letting me know, I was not aware of that. After reading > (message)Mailing Lists bit more carefully, adjusting the Posting Styles > and sending a bug fix to the Emacs' bug tracker, I believe it should not > happen anymore. Sorry for the annoyance. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmdOdpcACgkQO1qpk+Gi 3/AJGw/8C1lFfLawGVgkxxSC9wDqqvLnhmkTuNgE088XfbvBWbL1T22yUT++X7rI mqy8gDUf5m9Sjb3IWH31ghAcc6UN4yZNURWX/gktWQ++1X7tgic8HU+KHI4kp2YZ bMSplp70yD91aAfqI/8kzqVaaaLIx2aq1x3HaD+Sq1nnZE4K7gbcXnAxSx9L8c8X R0Xcn76R52IlhbZSjHtNcpGYKgldnS+DG70oQB2+yZBFo6WbIQGI2ZKoYfYp/Fin LtUgU1b/MNSx3LNZU/p2e3HdvPzVFkk/0wh/0S3fBLRbVu/6eBysqKUAwAEe1KOi t6irzc6AC+rkyd60Ua/uk2ejEAEiS8kV9tlNXvnmtQx6YBM0Y77TuzQTzz0qfui6 2FZROhmuPkAC2odSR5aoLjmXjALqKm6JzERzN57EDI5saLH7qpqg3HeECm7KnOQ4 sqpuzuFyQ8U2SJxLzdBIsJ6H5OvVWh4HexwDY18LRzvBpyjSPwLV4m/cqxbvTshI Lz25LrF8CjtvTIsqI20OvF18oCBgbIWvRyJFmpQ5RQFW7Af55kBtyukGmXGzygpJ xLDY1ZwricaVwmD1Srrq0F2W17fAgB9osFTgUR0ukV7WeMqAVWhn1jl4YW+7VvCq GAoGErgqJ8Ljt35naE/gFl7fmCU7+1OvyqlZecZlWLU59P7YOC4= =EYhI -----END PGP SIGNATURE----- --=-=-=--
bug-guix@HIDDEN
:bug#74532
; Package guix
.
Full text available.Received: (at 74532) by debbugs.gnu.org; 2 Dec 2024 23:40:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 02 18:40:49 2024 Received: from localhost ([127.0.0.1]:56985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tIG24-0007Da-Oi for submit <at> debbugs.gnu.org; Mon, 02 Dec 2024 18:40:49 -0500 Received: from wolfsden.cz ([37.205.8.62]:50242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tIG21-0007DQ-Ls for 74532 <at> debbugs.gnu.org; Mon, 02 Dec 2024 18:40:47 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 0CF1632753D; Mon, 2 Dec 2024 23:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1733182844; bh=vAgQGs0zKMTk5fPKporeFhRGmKtU9k7MU2laz+0j6V4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=MLjIez7OHcvTcmJUOlxu+ue2OYJr9l7i86q0HY3uFPdTg8SH4NVmES+G0kAur+RvL MSVjtcfClYPJGqfvv0CqVlGvpTpGNXkfmJBNF40b8CBZc3By9PvYZsIvACdqW3zS6A ekVLYuGsdf5VptPCPBSu3/fueAm2VInlV+5gMjMrnGQWvclvy3Ykwg7aT63Mqmnm23 gqszKCaRMFHvMiW6zbUbyj2dfMQ5BX2WyDLsDzu91iSe1Bw19DR14lq4kfmV+UA1T4 w2R6xvxBppfg6h0c3AInhmWDCwiiQSxWI8lZSPsQ0OBVAeTO2xbijQZvRi9BdA7zea qpg/iz71tK884alTiGMk8nnc2frOiNsmAf3OyeshU2AhaixkCFakfs7FKpWkZoGBia w7xISeM6bgFCNSnXcXHCv5Vuq95H6ixLuLe1VbEoq7Of0XJF/iGM5ywjHrrdQlQA5Q V6fQt8kdEf1IHzv5YIvBz17XgZMQ4SwZkhmx2+j5u2ZT9IiTYn28Cje2BAk/Sv4Vym 4gd2PDl2hWwj6ppDF5XROaEd6bMdwp1JmuQ/F386Qgsx0VE++d+UzG9KXiCPOMCQyj Urane+0njFjZ3hoaiCGAUhDnZ618WZCDAwZnoXvdadLG/whHs3I4Ok4IjqBu+5tFmq dwTOVNeR2Wc5rByfm+oBr1vw= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 197ED338391; Mon, 2 Dec 2024 23:40:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1733182843; bh=vAgQGs0zKMTk5fPKporeFhRGmKtU9k7MU2laz+0j6V4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=PQcS5kW9JkWZl4o//PR8nx9U8Ph9BOKvt+hDi9K3sAqZZ/VD0U/3G8QBStPv47wIg DmOJxZ0Rs0Mq8OuWMCBeMOev3Z7Z3wniD9pc3VfkJr+QTo7izjyrJeFu94nSWoM4oh 3DBGALeZtiq94UzkPsxh77zoZKCjv52XczaufXXVMSLiheRBfXUEIdwPhHi6g5t9XY RxWxMMJoHSiMA0nUpe6RnWqriOEJKMoYYIIhcrVyTofU7suRxglLYtaP3iccb2qksz ocVRwsTBwAGYUXP5MX2ETuOx9Nvxh6hkHojePJU8IwGD5ye45pJBTz3Pn6SRZ4udha VN4johD/xAytxqhRc6pgFVMK0zlkpG8BVUjaIYYiHqvSyYRkK+HWwAE2SB5iHawXMA RUQuGgEL3hvba9az/6s3hGt0TK0CtRasUjd44VZ8esjqrXioztZxlfarh/sxVZ7asw usBUyb4gP4fLfZbKLWqzauWe7qSGx/QfRtsGmlweFyx6cKL0fzOy9GsDWQhFScCYZ7 6yt1bTBLlD75EFEy9h4cHbrUnn/BlkVFo0dKNo6vqdV9+NQjWTz/9U+Btm7glJ7zZO x8Artrh+ABABYnzM84Vbx8z70115vX0GCQJ251q0u1Ij9c1i6te+mhVmzUko43yJra z7FFuGNS6hd/b+DW/gyWGCOQ= From: Tomas Volf <~@wolfsden.cz> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#74532: with-extensions does not add native extensions to the load path In-Reply-To: <877c8n94kl.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 28 Nov 2024 08:54:02 +0100") References: <871pyzdwzi.fsf@HIDDEN> <877c8n94kl.fsf@HIDDEN> Date: Tue, 03 Dec 2024 00:40:42 +0100 Message-ID: <87plm93b7p.fsf@HIDDEN> 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74532 Cc: 74532 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > Hi, > > Tomas Volf <~@wolfsden.cz> skribis: > >> The documentation for `with-extensions' says: >> >>> In the same vein, sometimes you want to import not just pure-Scheme >>> modules, but also =E2=80=9Cextensions=E2=80=9D such as Guile bindings t= o C libraries >>> or other =E2=80=9Cfull-blown=E2=80=9D packages. > > It=E2=80=99s not just bindings but also pure Scheme libraries like Guile-= JSON. True, and for those it works well. However the text documentation explicitly mentions "bindings to C libraries" as one of the use cases. :) > >> However it does not actually add those C libraries into >> (guile-extensions-path), which means that trying to actually use a >> library imported this way will lead to an error. > > [...] > >> 190:25 1 (load-foreign-library _ #:extensions _ #:search-ltdl-librar= y-path? _ # _ # _ # =E2=80=A6) >> In unknown file: >> 0 (dlopen "libguile-yamlpp.so" 1) >> >> ERROR: In procedure dlopen: >> In procedure dlopen: file "libguile-yamlpp.so", message "libguile-yamlpp= .so: cannot open shared object file: No such file or directory" > > Usually, packages like these (guile-gnutls, guile-git, guile-ssh, etc.) > have their .so absolute file name hard-coded, which sidesteps this > problem entirely. I recommend doing that for guile-yamlpp as well. 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. Assuming I have a guile library that creates a new .so library during the build, and the .so library must be loadable by the other modules in the library during the build (and for the tests), how should I approach that? I am pretty sure I cannot just patch the source code, since the library would not be installed into the absolute path yet during the build. Honestly, setting GUILE_EXTENSIONS_PATH via pre-inst-env seemed like fairly elegant solution. > > That said, it would probably make sense to arrange for =E2=80=98with-exte= nsions=E2=80=99 > to set GUILE_EXTENSIONS_PATH. That would be great. My current work-around is (with-extensions (list guile-wolfsden) (program-file "audio-cycle-sinks" #~(begin ;; Bug 74532: Native extensions are not added to the load path. (eval-when (expand load eval) (let ((ext-path (@ (system foreign-library) guile-extensions-pat= h))) ;; Just a temporary hack, we can live with duplicates in the p= ath. (ext-path (cons #$(file-append guile-wolfsden "/lib/guile/3.0/extensions") (ext-path))))) ...))) which is anything but elegant. > > Ludo=E2=80=99. > > PS: Your MUA sets =E2=80=9CMail-Followup-To: bug-guix@HIDDEN=E2=80=9D, w= hich is kinda > annoying because that=E2=80=99s the wrong address when replying to a = bug. > :-) Thanks for letting me know, I was not aware of that. After reading (message)Mailing Lists bit more carefully, adjusting the Posting Styles and sending a bug fix to the Emacs' bug tracker, I believe it should not happen anymore. Sorry for the annoyance. =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/wakFAmdORXoOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/walAqhAAjpE/KuhL/q5vv67k0zndvpQD3ExmofQYZTuq NOTaYd6Y/1YfqChTbslTBU4W1J3NdJ7P1N/q0X8DhLg6mxYkakri2WJSGTP4H0nF lo+RbDyas7aaIu9DrnlM4LzqWARbXFrbP5wMUhXBif9JsfO/AtRXZECUlQrYCYLo t5nO354y0dhb4M0kRXnxbq6ray2HRWzar0SLDkRJIu9ChsJePta1z1IZbW1GpHhS U9em2Tx84QTnM7S51wLPKGczgAiNc3vQZhxPX6R9ZuO4989Fl4zLuaaGKo34QY11 I5kuCuAO4sOoel562Rj2KXIJ0Bb/n9hXKHuhXrch+5hPobi7Yn4Eb96QW216KccW JaZwy5fbqpG96jZm27PWuBDRUq+wz2rbb5PTkiSKj4ev+nbPelIEf7ULsilLk0vZ 6h0mEu/XHYpbbIEZls1vAUqP1pxjeF1VFDHWa/TL/HG/QGlakNWnHIPYbIAdXK3m Gfymj8MfajZoiSNYans/ZQAb4QmxkoTfZEl6+AKzcgyrLjx6MqZQinCiWJyO/eQD M5Nxj5jkJIvIe41tH541fb6In9t5+8rXF5DeWVgg9Tpd0Y1ep9Fiakx5sVBtI/F3 KCxtXsS52DuAGGfDTo0A8UAcyvqpZt3Ii0MAejM4Hbie764XKuJoRat9a+OtHFjC OHP0wj4= =RJ63 -----END PGP SIGNATURE----- --=-=-=--
bug-guix@HIDDEN
:bug#74532
; Package guix
.
Full text available.Received: (at 74532) by debbugs.gnu.org; 28 Nov 2024 07:54:20 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 28 02:54:20 2024 Received: from localhost ([127.0.0.1]:36414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tGZLw-0001XB-CP for submit <at> debbugs.gnu.org; Thu, 28 Nov 2024 02:54:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tGZLu-0001Ww-3v for 74532 <at> debbugs.gnu.org; Thu, 28 Nov 2024 02:54:18 -0500 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 <ludo@HIDDEN>) id 1tGZLh-0002Q4-3a for 74532 <at> debbugs.gnu.org; Thu, 28 Nov 2024 02:54:10 -0500 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=4jBGaUthjax/yPVJZJE4SsZiKqmOTzkduDAdxF288eE=; b=MNeQvmNudlL+469dQl3y dOjp2rqK7nQjy263B2cfd5U8yU5LxvbtSv7xm+C4lg3hPpy63PuIpqfyZcPY0GQGgx2A/CI373qzi 9Tr40mbiM15Pl05hplHpZOoIXDnr1DSZy9kUZJIL7YyU+wevh+8RHd1SMVKeZUp9kWP9KGFNCeBgi 3yyTmoHThfxfRPa+qCDB6q+OV5QMbxwJcZs6vFrgEi531U3TgmKHSJi2K66nJv/w4ZfSsAYN2AU60 fJYO08PnosGffkUQeUGA/AgaG08Vk6WHCzNCH4lsvpMt2j7WDLVaLbxePcDXVRhk1zxH9Nt+hCYbV tHHRXegIfKnFWA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: 74532 <at> debbugs.gnu.org Subject: Re: bug#74532: with-extensions does not add native extensions to the load path In-Reply-To: <871pyzdwzi.fsf@HIDDEN> (Tomas Volf's message of "Mon, 25 Nov 2024 18:49:53 +0100") References: <871pyzdwzi.fsf@HIDDEN> Date: Thu, 28 Nov 2024 08:54:02 +0100 Message-ID: <877c8n94kl.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) 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: 74532 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Tomas Volf <~@wolfsden.cz> skribis: > The documentation for `with-extensions' says: > >> In the same vein, sometimes you want to import not just pure-Scheme >> modules, but also =E2=80=9Cextensions=E2=80=9D such as Guile bindings to= C libraries >> or other =E2=80=9Cfull-blown=E2=80=9D packages. It=E2=80=99s not just bindings but also pure Scheme libraries like Guile-JS= ON. > However it does not actually add those C libraries into > (guile-extensions-path), which means that trying to actually use a > library imported this way will lead to an error. [...] > 190:25 1 (load-foreign-library _ #:extensions _ #:search-ltdl-library= -path? _ # _ # _ # =E2=80=A6) > In unknown file: > 0 (dlopen "libguile-yamlpp.so" 1) > > ERROR: In procedure dlopen: > In procedure dlopen: file "libguile-yamlpp.so", message "libguile-yamlpp.= so: cannot open shared object file: No such file or directory" Usually, packages like these (guile-gnutls, guile-git, guile-ssh, etc.) have their .so absolute file name hard-coded, which sidesteps this problem entirely. I recommend doing that for guile-yamlpp as well. That said, it would probably make sense to arrange for =E2=80=98with-extens= ions=E2=80=99 to set GUILE_EXTENSIONS_PATH. Ludo=E2=80=99. PS: Your MUA sets =E2=80=9CMail-Followup-To: bug-guix@HIDDEN=E2=80=9D, whi= ch is kinda annoying because that=E2=80=99s the wrong address when replying to a bu= g. :-)
bug-guix@HIDDEN
:bug#74532
; Package guix
.
Full text available.Received: (at submit) by debbugs.gnu.org; 25 Nov 2024 17:50:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 25 12:50:14 2024 Received: from localhost ([127.0.0.1]:40296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tFdDy-0003ka-4V for submit <at> debbugs.gnu.org; Mon, 25 Nov 2024 12:50:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:52510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tFdDv-0003kD-6p for submit <at> debbugs.gnu.org; Mon, 25 Nov 2024 12:50:11 -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 <~@wolfsden.cz>) id 1tFdDu-0000CZ-KB for bug-guix@HIDDEN; Mon, 25 Nov 2024 12:50:10 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1tFdDi-0001PJ-Iw for bug-guix@HIDDEN; Mon, 25 Nov 2024 12:50:09 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 79B853467DF; Mon, 25 Nov 2024 17:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1732556995; bh=ByJBpuLnKTKq4mNVCnrr/OgMj+7hXTrDO2ncdbFHk04=; h=From:To:Subject:Date; b=B9JrJSaZ3YTWNH2eYFNUdA9kz+hDZFuIPcaS2zxvZpMY7XqigU9/c0TQgZTSBRvqf 871Gx/RUmACRKyrw4Z4qMp6khDRwXPahSytsk/Cyni63qOLt/KwpPwGyi6ZquCRWpr ph9gfzslRCJJ2N9gUGILyzAkQUfo0xjLq+9nvcj4lClgOxvSdMCXCiLIzQDZEn19zW S+esnHPdaeEaO3SlRwcZQ40j1hgmJXyJkHGvksLDf7yNFY3pD0TQjyGSrHSJCnGo0z Y+TnOndgwbb01NBfB4Giy2bYMqwfYbEEfa4KNrMtj335a+5sSWOWU8q6VKgxRI3cf2 DfaicKVAhcgt7ZvEdjblyMG/LVNviSZUpSCs5LVgso+O9E5XC0O6kyEF+i4GH8WsTz +x3Zz9co+WM5VhLDEL0274mmE7BlhMqOaWpHSiV3k9mI7KxV++94tv9hdOfNzwjYrs 3ZvvL+1KQgci5Iz6MVmEycPbrisE+RcXj4R3U/qwc+ixIJAW7ua+IKwHVEJNHqcuDc vI8DJORHmLcxq+2On87NweFrIIDFMxAiVSlMVC8GvG2G1+rNWIQl39uU0FPuTklB2R AmGiBnhSxOzgPYONsjGeomsVvuvRRQikS1iFxhGIzhxIKHKKyLTBMx/acGLurH+y4a SHY6igpKjZXuqV4KZOlOCOA0= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id A2A09346440 for <bug-guix@HIDDEN>; Mon, 25 Nov 2024 17:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1732556994; bh=ByJBpuLnKTKq4mNVCnrr/OgMj+7hXTrDO2ncdbFHk04=; h=From:To:Subject:Date; b=sesBPau+tCfun3daC1nL+AiQS5eCEKh5Bd/bXVXPriOgYqQ7mL9sjT/JtCIijxVKI zPJatuHm0NbYN5JUCKfx93puAMnlrGbmpAf4mccwk/hZW2XPy/Gz3UIMa8WhqGyeVB Pv7mZ74xWnw14046LRuj59AuQGhscVf61eEQfGsA9yqBp2llYLXOUeYjZTtr3qalav ffskplkHOwiaHb02+02munM+D7yqnct6+Y2jf6KF6aRHqm4WAIUOLFKe/JbpHXoiIv w6BlZ+HIiN3Jdtd6ASnPe8dayOdUYGogDinisszA64JD8c+1g63wWRse8A0ag1Jpa4 b++ip5q5REFv31/5qq8z4G90Ek/Nr+936wTORCyt1LkQ0LS3fAyBcLDbj6sdNSpuOd FtEG+Eh1fYksCgLrkBgjrWdbrV25FZ5WVkOc95pfFwudMtRyGl6nCwgsFF47zZ4fUN V7nmZPyb57xtNR8bbQIbjL5F8ETlKbm0PSzFX4nzsrqus6HPEajYMCUXgKo28cvJJA 8NYdk1PZVdVzwHddFLybKYoLeG83h+y98OJjP4GrA82fscK82+ujzlYIDZ7auNwpvn NzTz6ShMb6HRrpLcn9a3ymQ3BXgCUjQNykjHa8CrE5UoYNyFmmWIhAG/o1YAX0ITMh mdbNIECLji82jI8L0MLizHE4= From: Tomas Volf <~@wolfsden.cz> To: bug-guix@HIDDEN Subject: with-extensions does not add native extensions to the load path Mail-Followup-To: bug-guix@HIDDEN Date: Mon, 25 Nov 2024 18:49:53 +0100 Message-ID: <871pyzdwzi.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz 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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The documentation for `with-extensions' says: > In the same vein, sometimes you want to import not just pure-Scheme > modules, but also =E2=80=9Cextensions=E2=80=9D such as Guile bindings to = C libraries > or other =E2=80=9Cfull-blown=E2=80=9D packages. However it does not actually add those C libraries into (guile-extensions-path), which means that trying to actually use a library imported this way will lead to an error. I guess `load-path-expression' in (guix gexp) needs to also append to the `guile-extensions-path' based on the search-paths of the imported packages? Reproduction is simple. Make sure you *do not* have guile-yamlpp installed in your profile. Then build the `test' into a store item. =2D-8<---------------cut here---------------start------------->8--- (use-modules (gnu packages guile-xyz)) (define test (with-extensions (list guile-yamlpp) (program-file "test" #~(use-modules (yamlpp))))) =2D-8<---------------cut here---------------end--------------->8--- And try to run it: =2D-8<---------------cut here---------------start------------->8--- $ /gnu/store/nq0sahcnph5sxms4irq4inv2hq2hfbzr-test Backtrace: 19 (primitive-load "/gnu/store/nq0sahcnph5sxms4irq4inv2hq2hfbzr-t= est") In ice-9/eval.scm: 721:20 18 (primitive-eval _) In ice-9/psyntax.scm: 1229:36 17 (expand-top-sequence _ _ _ #f _ _ _) 1221:19 16 (parse _ (("placeholder" placeholder)) ((top) #(ribcage () () = ())) _ e (eval) #) 259:10 15 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) (hygi= ene guile-user)) In ice-9/boot-9.scm: 3935:20 14 (process-use-modules _) 222:17 13 (map1 (((yamlpp)))) 3936:31 12 (_ ((yamlpp))) 3327:17 11 (resolve-interface (yamlpp) #:select _ #:hide _ #:prefix _ #:r= enamer _ # _) In ice-9/threads.scm: 390:8 10 (_ _) In ice-9/boot-9.scm: 3253:13 9 (_) In ice-9/threads.scm: 390:8 8 (_ _) In ice-9/boot-9.scm: 3544:20 7 (_) 2836:4 6 (save-module-excursion _) 3564:26 5 (_) In unknown file: 4 (primitive-load-path "yamlpp" #<procedure 7f405e4fd560 at ice-= 9/boot-9.scm:35=E2=80=A6>) In yamlpp.scm: 65:1 3 (_) In unknown file: 2 (load-extension "libguile-yamlpp" "init") In system/foreign-library.scm: 190:25 1 (load-foreign-library _ #:extensions _ #:search-ltdl-library-p= ath? _ # _ # _ # =E2=80=A6) In unknown file: 0 (dlopen "libguile-yamlpp.so" 1) ERROR: In procedure dlopen: In procedure dlopen: file "libguile-yamlpp.so", message "libguile-yamlpp.so= : cannot open shared object file: No such file or directory" =2D-8<---------------cut here---------------end--------------->8--- Have a nice day, 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/wakFAmdEuMEOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/wanAZQ//X6YPkDpbrYK/OljWuxU70D6EC9+jQTkv1I4V 3mofSAWGP/D2PTFr5A+2lyLDKmzu68HqP+KNiRSjXBFwxr5hot50ZDNKPZdNc4My elkVUgUmYYVzO33Zyu+nZYsXjZO4B7JzylMOsJ0QbxCSI3aOF9NPeP6h7TN+ReJi B22XDz+gXOMJNFYBsUMSAK/ZvSyejenr8yTLQ1/EO+IVHV+dC8qeHSlMGPX2rm90 fCA0YHPlK5pEql4osigorvevsihONEyfKENCIZ0p2gg2MWsHAEHNteqy2KGFrwjB WC9rQgtbekwvHJcEf1FSL7W/CQRCUc6Zrn1of4D0WQ1hoOS2HTyre9Peny8j453G AYFDZw6Iq4KZG7Som4R0ME7sQNGoMpV1Il5JJcPEr2TFF2xpm4tGLPWBYKrBSa1M FLU2vBzbI9GC0L3f3pKEojPI47eY3OjMp5nRYALr32S5xXOn/TrJQMMyXIUX0M7G aip8e9l5UK0r76AgDaaou7Vqpx622JIVn8PvOZ5RfOsiJ0tXWGW6ZG2VV6Iv2/KY hl+Ozars2cZXk/JAVgbA2HZ/9oi3CloFFfO6pKLkXfVo5Jl/Me2dcI2rPOeKAtnw vC5UqsEjErXfjpI1CKtqaww5JoZM52dslbk8RzczbyUJN5HhNkuOG2sSXKI47kYb A45WS50= =LC0N -----END PGP SIGNATURE----- --=-=-=--
Tomas Volf <~@wolfsden.cz>
:bug-guix@HIDDEN
.
Full text available.bug-guix@HIDDEN
:bug#74532
; Package guix
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.