From owner-freebsd-questions@FreeBSD.ORG Fri Mar 19 22:06:34 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 949A1106566C for ; Fri, 19 Mar 2010 22:06:34 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id 5A6E08FC19 for ; Fri, 19 Mar 2010 22:06:34 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id o2JM6Weo092982 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Mar 2010 17:06:32 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.3) with ESMTP id o2JM6Wo7017517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Mar 2010 17:06:32 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.3/Submit) id o2JM6VR8017514; Fri, 19 Mar 2010 17:06:32 -0500 (CDT) (envelope-from dan) Date: Fri, 19 Mar 2010 17:06:31 -0500 From: Dan Nelson To: "O. Hartmann" Message-ID: <20100319220631.GC12330@dan.emsphone.com> References: <4BA38CD4.3020300@zedat.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BA38CD4.3020300@zedat.fu-berlin.de> X-OS: FreeBSD 8.0-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.95.3 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Fri, 19 Mar 2010 17:06:32 -0500 (CDT) X-Scanned-By: MIMEDefang 2.45 Cc: freebsd-questions@freebsd.org Subject: Re: How to set LD_PATH elegant? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 22:06:34 -0000 In the last episode (Mar 19), O. Hartmann said: > I'm a little bit new to setting library paths, so sorry for the noise. > > I install some packages and libraries apart the FreeBSD package/ports > system and need to setup the search path for shared libraries the proper > way. > > At this very moment I 'hardcode' this additional search path by setting > > ldconfig_paths= > > in /etc/rc.conf, > > but since this is a 'system related' location I'm looking for a proper and > clean method setting this search path via environment variable and/or some > /usr/local/etc/rc.conf.add stuff or similar. Create a file in /usr/local/libdata/ldconfig/ containing the directories you want added to the ld search path. Call it something descriptive so you know what it's for. /etc/rc.d/ldconfig will process those files and run ldconfig on them on bootup. If you've installed zsh, mysql, or firefox from ports, you may already have a couple files in there. -- Dan Nelson dnelson@allantgroup.com