From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 18 18:05:36 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00AA316A4B3 for ; Thu, 18 Sep 2003 18:05:36 -0700 (PDT) Received: from lakemtao02.cox.net (lakemtao02.cox.net [68.1.17.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC84443FBD for ; Thu, 18 Sep 2003 18:05:34 -0700 (PDT) (envelope-from A.J.Caines@halplant.com) Received: from mail.halplant.com ([68.98.167.210]) by lakemtao02.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20030919010534.FPUB10677.lakemtao02.cox.net@mail.halplant.com> for ; Thu, 18 Sep 2003 21:05:34 -0400 Received: by mail.halplant.com (Postfix, from userid 1001) id 27B381F3; Thu, 18 Sep 2003 21:05:34 -0400 (EDT) Date: Thu, 18 Sep 2003 21:05:34 -0400 From: Andrew J Caines To: FreeBSD Hackers Message-ID: <20030919010534.GE1234@hal9000.halplant.com> Mail-Followup-To: FreeBSD Hackers Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: H.A.L. Plant X-PGP-Fingerprint: C59A 2F74 1139 9432 B457 0B61 DDF2 AA61 67C3 18A1 X-Powered-by: FreeBSD 4.9-PRERELEASE X-URL: http://halplant.com:88/ X-Yahoo-Profile: AJ_Z0 Importance: Normal User-Agent: Mutt/1.5.4i Subject: Relinking binaries to new .so libs when versions change? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Andrew J Caines List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2003 01:05:36 -0000 Again, a port update of a library has bumped a .so version [in this case libatk-1.0.so.200 -> libatk-1.0.so.400]. This leaves a bunch of binaries linked to the old .so which won't start. Other recent examples include libxmms.so and libintl.so. Is there an elegant and quick way to relink a given binary to a different version of a particular .so, eg. "mvld foo foo.so.1 foo.so.2"? I'm aware that rebuilding is the right thing to do since stuff can change in the libs, however experience from symlinking .so.N to .so.N-n shows that this almost never results in problems. For the record, I'm largely clueless about the details of linking, but I also wondered why we have all the .so -> .so.N symlinks if the linking as always to the .so.N. Is the fact that some libs don't follow the major/minor rules[1] a/the problem? I've read ld(1), ldconfig(8) [-r shows the .so.N hints], rtld(1) and other pages, googled a bit and am only slightly wiser, but not enough to answer my own questions. Your clues will be gratefully received. [1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/policies-shlib.html -Andrew- -- _______________________________________________________________________ | -Andrew J. Caines- Unix Systems Engineer A.J.Caines@halplant.com | | "They that can give up essential liberty to obtain a little temporary | | safety deserve neither liberty nor safety" - Benjamin Franklin, 1759 |