From owner-freebsd-questions@FreeBSD.ORG Fri Jul 7 12:03:32 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CFB516A4DA for ; Fri, 7 Jul 2006 12:03:32 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91C9C43D45 for ; Fri, 7 Jul 2006 12:03:31 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.7/8.13.7/Debian-1) with ESMTP id k67C3GWP017439 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 7 Jul 2006 15:03:17 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.7/8.13.7) with ESMTP id k67C3AGk003038; Fri, 7 Jul 2006 15:03:10 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.7/8.13.7/Submit) id k67C3AHd003037; Fri, 7 Jul 2006 15:03:10 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 7 Jul 2006 15:03:10 +0300 From: Giorgos Keramidas To: nospam@mgedv.net Message-ID: <20060707120310.GC88706@gothmog.pc> References: <00aa01c6a1b7$a98af0a0$01010101@avalon.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00aa01c6a1b7$a98af0a0$01010101@avalon.lan> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.628, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.77, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: shared library loader configuration 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, 07 Jul 2006 12:03:32 -0000 On 2006-07-07 13:22, "no@spam@mgedv.net" wrote: > > hi, > > can someone give me please a SIMPLE and CLEAR answer, what i exactly > have to do to achieve the following: > > i have (for example) installed a new compiled version of libz.a/.so in > /usr/local. > > i want program (during runtime AND during compilation) to compile and > run against the NEW and non-system libs. In short, just don't. The system programs have been tested, developed and debugged with the *SYSTEM* version of the libraries. Blindly replacing these libraries with others is something you should do only with extreme care. > what has to be set/changed, to have this setting as soon as the OS > starts? LD_LIBRARY_PATH is probably what you mean here. > i tried running ldconfig, i was playing around with some ld-so.conf > files, everything failed. the compilation does not even find the new > libraries, and if i use "ldd" to check what path the lib would use > it's always /lib or /usr/lib instead of /usr/local/lib. All the compilers that I have to use for every day work and for my own stuff have options that can hardcode a 'runtime library path' in the ELF binary. What did you try to compile? What do you mean by writing ``the compilation does not even find the new libraries''? > please don't tell me things about RTFM or weblinks This is also a good way of learning new stuff though :) > i just need ~3 simple lines of what the hell to do that i get a > persisting setting for compilations and runtimes How do you know it is ``3 simple lines''?