From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eIvgNDmHml9yVgAA0tVLHw (envelope-from ) for ; Thu, 29 Oct 2020 09:11:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gK/WMDmHml/sdwAA1q6Kng (envelope-from ) for ; Thu, 29 Oct 2020 09:11:21 +0000 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 6A3A99402C2 for ; Thu, 29 Oct 2020 09:11:20 +0000 (UTC) Received: from localhost ([::1]:41394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kY3xn-0000Xz-B4 for larch@yhetil.org; Thu, 29 Oct 2020 05:11:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kY3xY-0000U4-Bv; Thu, 29 Oct 2020 05:11:05 -0400 Received: from server0.selfhosted.xyz ([217.64.149.7]:37226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kY3xP-0006IV-3y; Thu, 29 Oct 2020 05:11:03 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=selfhosted.xyz; s=dkim; t=1603962645; bh=MUK5/BkW/TdwaQwAnJ4MTQYyyHJIMio3VdoVg1ZZ8EE=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=ESzt3vLCcAqqCxTJpPhASkOqJNxHbUXI2Cxqe9hZMvUzifJRuuhIVyfkBkoRT/DVv 4knDdibUAkPR2w+cPLp+aY8sP+8D5wpCaHwa93r1QC668KdoRuFUWynKLMh6Yhj6MT SbT/hb/42+RvFxiyynxLqkNGk43EWHYMehgtrYhPcn1FnEO58bc+hkEJDwpACusJue vSJXUjwlsiWTwqustDg6EXa/15FyMbZiXxdmicWmQ1jU++S/Rmc0V0BwBYb8/wqmyd CpgxfpB56Jx3w9b0w0UVBW445wpOV1GI/3UMTVYG7GwExoHl2duB9pIu55qb6iK2Sh +U5p/eTTuvY3w== X-Fuglu-Suspect: 01709ff640a04db28a740d87c91f77d6 X-Fuglu-Spamstatus: NO Received: from [127.0.0.1] (localhost [127.0.0.1]) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 29 Oct 2020 09:10:37 +0000 From: david larsson To: =?UTF-8?Q?S=C3=A9bastien_Lerique?= Subject: Re: Profile's LD_LIBRARY_PATH by default In-Reply-To: <877dra1mvr.fsf@eauchat.org> References: <877dra1mvr.fsf@eauchat.org> Message-ID: X-Sender: david.larsson@selfhosted.xyz Received-SPF: pass client-ip=217.64.149.7; envelope-from=david.larsson@selfhosted.xyz; helo=server0.selfhosted.xyz X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/29 05:10:46 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FROM_SUSPICIOUS_NTLD=0.5, PDS_OTHER_BAD_TLD=1.999, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org, Help-Guix Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=selfhosted.xyz header.s=dkim header.b=ESzt3vLC; dmarc=pass (policy=none) header.from=selfhosted.xyz; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: HU6M5SGU4R8z On 2020-10-28 13:49, Sébastien Lerique wrote: > Dear all, > > This question could stem from a simpler example, but I think in this > case it doesn't change much. So I'll go with my use case: > > While running a racket program which uses OpenCV, I realised that my > LD_LIBRARY_PATH does not contain my user's profile libs. I have > `libopencv*.so` in `~/.guix-profile/lib/`, but running a racket > program which needs that fails: > > ``` > $ racket capture.rkt > ffi-lib: couldn't open "libopencv_core.so" (libopencv_core.so: cannot > open shared object file: No such file or directory) > ``` > > While running > > ``` > env LD_LIBRARY_PATH=/home/sl/.guix-profile/lib/ racket capture.rkt > ``` > > works. > > (Also, this is the output of `env > LD_DEBUG=libs racket capture.rkt`.) > > Is this normal behaviour, i.e. that the path to dynamic libs installed > in my user profile should be manually configured in my shell startup > scripts? Should this not be included in `~/.guix-profile/etc/profile`? > > Thanks all, and best wishes! > Sébastien Hi! I wondered the same, and got answer in the IRC #guix that setting LD_LIBRARY_PATH is highly discouraged (unless you have a specific and good reason to do so in a specific case - never globally). I a good explanation about it here: https://web.archive.org/web/20060719201954/http://www.visi.com/~barr/ldpath.html A good example of how it can go wrong: "In its startup script[a program called WidgetMan], it sets LD_LIBRARY_PATH to point to its copy of Motif so it uses that one when it runs. As it happens, WidgetMan is designed to launch other programs too. Unfortunately, when WidgetMan launches other apps, they inherit the LD_LIBRARY_PATH setting and some Motif based apps now break when run from WidgetMan because WidgetMan's Motif is incompatible with (but the same library version as) the system Motif library. Bummer!"