unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Suhail Singh <suhailsingh247@gmail.com>
To: Guix-devel mailing list <guix-devel@gnu.org>
Cc: Suhail Singh <suhailsingh247@gmail.com>
Subject: Clarification regd. native-search-paths and search-paths
Date: Sat, 05 Oct 2024 14:19:16 -0400	[thread overview]
Message-ID: <87zfnipg4b.fsf@gmail.com> (raw)

Hello Guix,

Per the manual:

#+caption: [[info:guix#Search Paths][guix#Search Paths]]
#+begin_quote
  What this ‘native-search-paths’ field says is that, when the ‘python’
  package is used, the ‘GUIX_PYTHONPATH’ environment variable must be
  defined to include all the ‘lib/python/3.9/site-packages’
  sub-directories encountered in its environment.  (The ‘native-’ bit
  means that, if we are in a cross-compilation environment, only native
  inputs may be added to the search path; *note ‘search-paths’: package
  Reference.)
#+end_quote

Does "used" above refer to runtime usage?

If so, in that example, why is native-search-paths used instead of
search-paths?  I would think that in order to have appropriate runtime
behaviour while supporting cross-compilation, we would want to use
search-paths instead.  And yet, it seems, the recommendation seems to be
to favour native-search-paths in general:

#+caption: [[info:guix#package Reference][guix#package Reference]]
#+begin_quote
  As for inputs, the distinction between ‘native-search-paths’
  and ‘search-paths’ only matters when cross-compiling.  In a
  cross-compilation context, ‘native-search-paths’ applies
  exclusively to native inputs whereas ‘search-paths’ applies
  only to host inputs.

  Packages such as cross-compilers care about target inputs—for
  instance, our (modified) GCC cross-compiler has
  ‘CROSS_C_INCLUDE_PATH’ in ‘search-paths’, which allows it to
  pick ‘.h’ files for the target system and _not_ those of
  native inputs.  For the majority of packages though, only
  ‘native-search-paths’ makes sense.
#+end_quote

How does one determine which of native-search-paths or search-paths is
appropriate in a given context?

-- 
Suhail


             reply	other threads:[~2024-10-05 18:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-05 18:19 Suhail Singh [this message]
2024-10-06 17:49 ` Clarification regd. native-search-paths and search-paths Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-10-06 22:00   ` Suhail Singh
2024-10-07  1:08     ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-10-07  2:58       ` Suhail Singh

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=87zfnipg4b.fsf@gmail.com \
    --to=suhailsingh247@gmail.com \
    --cc=guix-devel@gnu.org \
    /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).