From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KLkUN/cyz2JhDAEAbAwnHQ (envelope-from ) for ; Wed, 13 Jul 2022 23:02:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QCsrN/cyz2LykgAA9RJhRA (envelope-from ) for ; Wed, 13 Jul 2022 23:02:47 +0200 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 A1E1C2A793 for ; Wed, 13 Jul 2022 23:02:47 +0200 (CEST) Received: from localhost ([::1]:34266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBjVO-0001kN-Iz for larch@yhetil.org; Wed, 13 Jul 2022 17:02:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBjV5-0001jv-UE for help-guix@gnu.org; Wed, 13 Jul 2022 17:02:27 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:33126) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBjV1-0002Eh-JD for help-guix@gnu.org; Wed, 13 Jul 2022 17:02:27 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id cfb7e4d4; Wed, 13 Jul 2022 21:02:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=+2t+Fg8sOHiS nnx029lf9dOdHPbS/0hE6L61tyiw1V0=; b=LX6Yo10bXMK1Cm2nES/1120ANYaA jcY6nPS8ufINvId2N8R4zFk4wUf5v+T9qg1+mNtWBYTC9I5gSr0g9BnJzPeW+kr6 tZOinH0jLlj18adI4snxzVDTCwrf+4Ye64tTS/wH+2esaDhS8p5zA8GxyuAyWbqg +2klgJWds+o6tT7CSgIWFg0vfAiS9NlPdu9qsGfIcwHwjugZNf2TbxjK7Zn4sY1X XT2kOqy+NjJeFoMpl9a3z/HUkWP2Q3xnyE5YlxaNrEf/JCWMP1koVlwFB1RD+OD6 nmXKhMpbislePV1PlJ5Tj3B5g/BT/UkDwzoEIevgYMn9ijMNRoQoQ6MitA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 10055a8b (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 13 Jul 2022 21:02:17 +0000 (UTC) Date: Wed, 13 Jul 2022 23:02:11 +0200 From: Julien Lepiller To: Peter Polidoro CC: help-guix@gnu.org Subject: Re: Finding Dependencies at Run Time User-Agent: K-9 Mail for Android In-Reply-To: <867d4ghltf.fsf@polidoro.io> References: <8EA69D34-498D-4172-B0E4-C90E59009F68@polidoro.io> <24DD9713-A088-4C6A-8D8B-5DCF60E623AF@lepiller.eu> <86bktshp6m.fsf@polidoro.io> <4D18100C-EA74-494D-8014-12116892E5AE@lepiller.eu> <867d4ghltf.fsf@polidoro.io> Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu 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, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657746167; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=b4Qt31QBAENGKlnqmlU3NqKhXIv7qtoeUV9K2zw+rr8=; b=RrDHXTjof7d1HrwgXRGhKON7RGQLdMLwB8GBtjQYRIGpNHaRBSNMjM8ttwl/a1xlTYiRIh Z8L7m4smGniBC4vhOnzkaUDpPWE8kVNNlglR/+MqHtLwRUxgJ9C0mf2wEHHMiFo4hljq5D n8UPbAvMolrZzxHHq/HBzOZCqol1eV0Eb9tgk/74MKjRMhyZxp7Wn5Q6u2pw2fwZX6xU6C 29Ihn/KgRkhDjNf4WecQib3kMjp3cR+k2IV+YiRvDJAmXYkqKtDs8/bF2fsFZ2v6wxozDA DjiM/w69FZOLOVM4pqdchiAnWrmN+NheB0xjKNpJp1Dfi6u4zlykRy4V47CEBw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657746167; a=rsa-sha256; cv=none; b=VwqH1zRKqAsLT4VXpgeyBMp2pZQGVmD/GDbLdpDhM5OaetayYn1a1EiDsT0Lkbz8a+C2W7 76y+Re97PUPboSMZiLRf3uadDNgWBs1wlBC66br3QTAWRaWvJEejYEk7FSoE/D67DOG9FZ iAiPKrS1bDjRMfDPWJVUlKN+N6eLBH9PN48ys3yy7z55J7J3HoB0SIFcbwXNdVfKT0o/wP wIMmpO6Jplrz7VJSw24jFjA6FNEMHiaND0anxYwqpkmA5LkkrBzOSCxbi4HCaNSz2OPdzQ M/WpgYjGopteu7Bzki35Ah3ANIWuv+om8ixYSnAC+PZjwnPMJ4m846EGCItPwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=lepiller.eu header.s=dkim header.b=LX6Yo10b; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.76 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=lepiller.eu header.s=dkim header.b=LX6Yo10b; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A1E1C2A793 X-Spam-Score: 5.76 X-Migadu-Scanner: scn0.migadu.com X-TUID: dDTLEhj0tqbG My explanation must not have been clear=2E You can read more on search-path= s at https://guix=2Egnu=2Eorg/manual/devel/en/html_node/Search-Paths=2Ehtml= #Search-Paths Basically, it's a declaration on packages that specify which path-like env= ironment variables they honor=2E When building an environment/profile, guix will look at all the variable d= eclarations of packages of that environment and create the corresponding va= riables=2E So when building a package, guix creates an environment with all the depen= dencies (inputs) of the package, and the corresponding environment variable= s=2E Similarly, when you install say python (that brings in its search-path def= inition) and python-numpy (that provides a python library), guix will know = to set GUIX_PYTHONPATH properly for using numpy with python=2E Since numpy = propagates its dependencies, they are also part of the environment and that= 's how numpy can find them=2E Remember the difference between inputs and propagated inputs: they're the = same, but when you create a profile, inputs are not part of the profile (so= they need a direct store reference, such as RPATH or a wrapper), whereas p= ropagated inputs are part of the profile, so an environment variable allows= to find them=2E Le 13 juillet 2022 20:51:18 GMT+02:00, Peter Polidoro a =C3=A9crit=C2=A0: >Your explanations are very helpful, thank you, and your links made me rea= lize that devel version of the manual has lots of information that I could = not find in the stable version of the manual=2E > >> During the build, search-paths and native-search-paths are used to set = up environment variables=2E If you use --keep-failed and interrupt a >> build you'l find them in /tmp/guix-build-=E2=80=A6/environment-variable= s=2E > >So search-paths and native-search-paths are set before the build and unse= t after the build so they are unavailable during run-time? Or are native-se= arch-paths only available at build-time and search-paths available at both = build-time and run-time? > >Are the search-paths and native-search-paths absolute path values found b= y automatically searching the directories in all of the inputs or native in= puts, looking for files or directories that match a pattern? So they are a = way to map relative paths into absolute paths to the dependency packages? > >> For others, the required search paths can be embedded in a wrapper, whi= ch defines environment variables before calling the actual program=2E > >So if a package needs run-time environment variables, then a package shou= ld use wrap-program to attach them to a command? These are not found automa= tically by searching the inputs, they must be manually defined using explic= it input paths? > >> For propagation, dependencies are found in the environment=2E It's less= "pure" than the other ways, so we try to avoid resorting to that=2E >> Unfortunately some programming languages don't really leave us a choice= (like python=E2=80=A6)=2E > >So python packages are not using an environment variable, such as PYTHONP= ATH, to find dependencies? How are they placed together into an environment= so they can find each other?