bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#74532: with-extensions does not add native extensions to the load pa


From: Ludovic Courtès
Subject: bug#74532: with-extensions does not add native extensions to the load path
Date: Tue, 17 Dec 2024 14:55:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

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’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]