From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id loddCOnOjmUZWwAAkFu2QA (envelope-from ) for ; Fri, 29 Dec 2023 14:51:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id WKG0AenOjmWvFQEA62LTzQ (envelope-from ) for ; Fri, 29 Dec 2023 14:51:37 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elenq.tech header.s=soverin1 header.b=qLQuE4Y+; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1703857896; 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=nH7zVQA1Uyq07HiqJqZfSU0rG5i7j/2xki/hNqIIpzw=; b=JRuNJXa7BkSFuQLEbmhOE/Gl5HhpXK5wDs8nIuJq0oZuj5hxKPcFUZvD6PFDhkNWZOoyzJ QGUcaaT0hbY1VY5aCBRG6yVAvyaltzcahYRJQzZutYe9r1d7YmI92R5Oqk1UIYcTb7FQMz jRVDcRaOT4peiqU+aIRktWBObzgSgpmJwFIWK2cd4Oc2g+5+QVj1oJwlpoon/tRYSdN/8z 7kBPIwAEHhpIhDRdGyeNdmaWduNsJ8zk64Bb7jxLNQspQiJv3K65jbNMwiVKsS5qulJcV3 Z/MLkCHodwoRQtnP9Wp1/MyBZRpQiNHqcQqpgND49aa4vgR7vvaG8g1hk95F9g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703857896; a=rsa-sha256; cv=none; b=qa+J4uYvlo8R7F6/sNn8LXY6g0ZhKBf7zNI0ttHfDOQXZyRB1L4vpSr0e1L4D7kT0DgZef SUUP0UNB7Cw+8fK/bm4AWnkjAaq0gMr/v06YVTJqAHM70lcpBLNyF1eiNyZ4bj6qnWbsyi r+lfHHdzxRIH609VHnTj4Z+3AkQPOJhF2eylxK4zIFa3dMC6+vy83ogE9/uDODBYTEqJqj M6fPGjQlsIWY8TYloiHahnhC93yMA2wGI0lENmtvsnbLFAbTA+tIZMPdHxmiErHixcNaL8 KyoCN5l76g5pxKua8v5OoHfYtlRO7sVaKpzF8cKZm12XTz+Jt/C6U1Q0hEzmSg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=elenq.tech header.s=soverin1 header.b=qLQuE4Y+; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none 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 C3B2C5494A for ; Fri, 29 Dec 2023 14:51:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJDGO-0002I3-2l; Fri, 29 Dec 2023 08:51:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJDGM-0002Ht-R5 for guix-devel@gnu.org; Fri, 29 Dec 2023 08:50:58 -0500 Received: from dane.soverin.net ([185.233.34.150]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJDGK-00008T-6X for guix-devel@gnu.org; Fri, 29 Dec 2023 08:50:58 -0500 Received: from smtp.soverin.net (c04smtp-lb01.int.sover.in [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dane.soverin.net (Postfix) with ESMTPS id 4T1mx76GMnz3W; Fri, 29 Dec 2023 13:50:51 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.100]) by soverin.net (Postfix) with ESMTPSA id 4T1mx70k1yzHW; Fri, 29 Dec 2023 13:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=soverin1; t=1703857851; h=from:from: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; bh=nH7zVQA1Uyq07HiqJqZfSU0rG5i7j/2xki/hNqIIpzw=; b=qLQuE4Y+PiodJF1vrqoQBpQLbDw+id4zClkiCIBBVga+NDA1QPD9YdVnJIQNBXV3zP9l3i AwZI8GThl+/QMKBhAoKyFMacifQJy0yyz0mVQULeYL04m1XKcJZJIluYEfHhP0C8RR/NaR /RklxvVRi0OP/HPCQJqxa6ZgP2LE8QyZTVBDJ0Oxzxf/jvMcPJxRPi4rvK3syiMLpmmhvV vklDI9NgCieaYsWeY8jpQDkdQuCSYJEASiNMJA4cmBesVaA7rPmzji1X1zcgk6+N/aCmed nOepMI1rSgyHKp53JhKTFmScY/u3MUkCOsqQe7UX2BEJYaEB/vz9gOuV+NSUwA== Message-ID: Date: Fri, 29 Dec 2023 14:50:50 +0100 MIME-Version: 1.0 Subject: Re: Suggestion for a guix shell feature. To: Maxim Cournoyer , "Apoorv via Development of GNU Guix and the GNU System distribution." Cc: Apoorv References: <87le9dvevw.fsf@gmail.com> Content-Language: en-US, es-ES, eu From: Ekaitz Zarraga In-Reply-To: <87le9dvevw.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.233.34.150; envelope-from=ekaitz@elenq.tech; helo=dane.soverin.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.04 X-Spam-Score: -7.04 X-Migadu-Queue-Id: C3B2C5494A X-Migadu-Scanner: mx11.migadu.com X-TUID: HniYkcmc+A3M On 2023-12-29 04:58, Maxim Cournoyer wrote: > Hi, > > Apoorv via "Development of GNU Guix and the GNU System distribution." > 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