[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding Dependencies at Run Time
From: |
Julien Lepiller |
Subject: |
Re: Finding Dependencies at Run Time |
Date: |
Wed, 13 Jul 2022 20:39:34 +0200 |
User-agent: |
K-9 Mail for Android |
Maybe the general case is C programs rather than wrappers.
During the build, search-paths and native-search-paths are used to set up
environment variables. If you use --keep-failed and interrupt a build you'l
find them in /tmp/guix-build-…/environment-variables.
For C programs, LIBRARY_PATH is embedded as RPATH in the resulting binary or
library.
For others, the required search paths can be embedded in a wrapper, which
defines environment variables before calling the actual program.
For propagation, dependencies are found in the environment. It's less "pure"
than the other ways, so we try to avoid resorting to that. Unfortunately some
programming languages don't really leave us a choice (like python…).
Le 13 juillet 2022 19:47:45 GMT+02:00, Peter Polidoro <peter@polidoro.io> a
écrit :
>
>> The mecanism depends a bit on the build system but for C programs, it's
>> embeded at build-time in its RPATH. For applications, there are
>> wrappers
>> (https://guix.gnu.org/manual/devel/en/html_node/Build-Utilities.html#Wrappers).
>
>So in general, packages use environment variables to find the absolute paths
>of their dependencies in the store?
>
>In a package definition, are those dependency paths always set using
>wrap-program? Are search-paths, native-search-paths, and setenv also used to
>set those environment variables or are those used for something else?
>
>> Otherwise, we have to propagate run-time dependencies.
>
>So how else can packages propagate run-time dependencies besides environment
>variables?
- Finding Dependencies at Run Time, Peter Polidoro, 2022/07/13
- Re: Finding Dependencies at Run Time, Julien Lepiller, 2022/07/13
- Re: Finding Dependencies at Run Time, Ricardo Wurmus, 2022/07/14
- Re: Finding Dependencies at Run Time, Philip McGrath, 2022/07/14
- Re: Finding Dependencies at Run Time, Ricardo Wurmus, 2022/07/14
- Re: Finding Dependencies at Run Time, zimoun, 2022/07/14