unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ekaitz Zarraga <ekaitz@elenq.tech>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	"Apoorv via Development of GNU Guix and the GNU System
	distribution." <guix-devel@gnu.org>
Cc: Apoorv <apoorvs@tuta.io>
Subject: Re: Suggestion for a guix shell feature.
Date: Fri, 29 Dec 2023 14:50:50 +0100	[thread overview]
Message-ID: <c6a353c6-d694-ddfa-f536-b705414f1520@elenq.tech> (raw)
In-Reply-To: <87le9dvevw.fsf@gmail.com>

On 2023-12-29 04:58, Maxim Cournoyer wrote:
> Hi,
> 
> Apoorv via "Development of GNU Guix and the GNU System distribution."
> <guix-devel@gnu.org> writes:
> 
>> I want to make a suggestion for a feature for guix shell.
>>
>> I was recently writing guix.scm files for my projects and was having
>> problem with the libraries I added, not being found inside the
>> shell. After struggling for hours I finally learned that that the
>> LD_LIBRARY_PATH  is not being updated automatically inside the  guix
>> shell environment so the libraries can be found easily.
>>
>> So my feature suggestion is that maybe we can have a flag or a option
>> for guix shell, something like --add-ld-path or --update-ld-path for
>> example, to add all libraries specified in the guix.scm or even as
>> sub-command guix shell --add-ld-path mesa as an example, to
>> automatically update the LD_LIBRARY_PATH environment variable to
>> contain the correct paths to these libraries so they can be found
>> easily inside the shell.
> 
> Guix doesn't/shouldn't make use of LD_LIBRARY_PATH, except in rare cases
> to wrap binaries.  It's better to patch the dlopen calls to use the
> absolute shared library file name.
> 
> Perhaps you are missing the package configuring LIBRARY_PATH and other
> useful environment variables for finding libraries?  That'd be
> gcc-toolchain, if I recall correctly.
> 

Hi,

I have a similar issue. I have a project that links GLFW statically, but 
I still need to use its dependencies, like x11 and so on. If I make a 
shell like:

	guix shell -D glfw

I don't have access to those libraries, but they are in my GUIX_PROFILE.
The only way to access them is setting LD_LIBRARY_PATH. It doesn't 
matter if I have `gcc-toolchain` installed or not. Why is this?
The search path is hardcoded in the statically built GLFW?
How can we make this usecase simpler (mostly for development)?

Thanks,
Ekaitz


  reply	other threads:[~2023-12-29 13:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 16:10 Suggestion for a guix shell feature Apoorv via Development of GNU Guix and the GNU System distribution.
2023-12-29  3:58 ` Maxim Cournoyer
2023-12-29 13:50   ` Ekaitz Zarraga [this message]
2023-12-29 15:39   ` Tobias Geerinckx-Rice
2023-12-29 17:21     ` Maxim Cournoyer
     [not found] <NmrVHaU--3-9@tuta.io>
2023-12-30  3:10 ` Maxim Cournoyer
2023-12-31 12:10   ` Apoorv via Development of GNU Guix and the GNU System distribution.
2023-12-31 16:55     ` Maxim Cournoyer
2024-01-01  3:01       ` Apoorv via Development of GNU Guix and the GNU System distribution.
2024-01-02 16:33         ` Maxim Cournoyer
2024-01-03  9:14           ` Apoorv via Development of GNU Guix and the GNU System distribution.
2024-01-03 17:57             ` Maxim Cournoyer
2024-01-05 13:38               ` Apoorv via Development of GNU Guix and the GNU System distribution.

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=c6a353c6-d694-ddfa-f536-b705414f1520@elenq.tech \
    --to=ekaitz@elenq.tech \
    --cc=apoorvs@tuta.io \
    --cc=guix-devel@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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).