From: "Ludovic Courtès" <ludo@gnu.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: Z572 <zhengjunjie@iscas.ac.cn>, 74532@debbugs.gnu.org
Subject: bug#74532: with-extensions does not add native extensions to the load path
Date: Tue, 17 Dec 2024 14:55:06 +0100 [thread overview]
Message-ID: <87bjxapg79.fsf@gnu.org> (raw)
In-Reply-To: <87o71flehy.fsf@wolfsden.cz> (Tomas Volf's message of "Fri, 13 Dec 2024 17:44:09 +0100")
Hi,
Tomas Volf <~@wolfsden.cz> skribis:
> Z572 <zhengjunjie@iscas.ac.cn> 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.
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
‘make’ before ‘make install’ if necessary.
See ‘guile-gdbm-ffi’ as one example.
Ludo’.
prev parent reply other threads:[~2024-12-17 13:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 17:49 bug#74532: with-extensions does not add native extensions to the load path Tomas Volf
2024-11-28 7:54 ` Ludovic Courtès
2024-12-02 23:40 ` Tomas Volf
2024-12-03 3:10 ` Z572
2024-12-13 16:44 ` Tomas Volf
2024-12-17 13:55 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bjxapg79.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=74532@debbugs.gnu.org \
--cc=zhengjunjie@iscas.ac.cn \
--cc=~@wolfsden.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).