From owner-freebsd-questions Thu Aug 31 08:15:40 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id IAA07492 for questions-outgoing; Thu, 31 Aug 1995 08:15:40 -0700 Received: from distortion.eng.umd.edu (distortion.eng.umd.edu [129.2.98.6]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id HAA07205 for ; Thu, 31 Aug 1995 07:56:07 -0700 Received: from espresso.eng.umd.edu (espresso.eng.umd.edu [129.2.98.13]) by distortion.eng.umd.edu (8.6.10/8.6.4) with ESMTP id KAA12788; Thu, 31 Aug 1995 10:50:16 -0400 Received: (chuckr@localhost) by espresso.eng.umd.edu (8.6.10/8.6.4) id KAA02608; Thu, 31 Aug 1995 10:50:15 -0400 Date: Thu, 31 Aug 1995 10:50:15 -0400 (EDT) From: Chuck Robey To: nbc@cs.strath.ac.uk cc: Questions@freebsd.org Subject: Re: Shared Library Troubles In-Reply-To: <9508311028.AA01250@muir-11.cs.strath.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: questions-owner@freebsd.org Precedence: bulk On Thu, 31 Aug 1995 nbc@cs.strath.ac.uk wrote: > > Hello all, > > at the risk of sounding incredibly lame, I am, as the subject says, having > trouble with shared libraries in FreeBSD 2.0.5. The problem is related to > packages, and appears to manifest itself whenever I attempt to install > a package that is dependant on something that I have yet to install. When > this happens, pkg_add claims to not install the package; yet it still > records an entry in /var/db/pkg/. > > What's this got to do with libraries ? The problem seems to occur when > I install the packages in the proper order again, even after (manually) > deleting the botched dependant package. After everything is installed OK, > I get this error (from a dodgy tcl/tk installation) > > ld.so: wish: libtk.so.3.6: Undefined error: 0 > > This has happened to me on several occasions, and frankly, I'm baffled. > Any ideas ? My apologies if this is an obvious thing or is in a man page > somewhere... It's not all that bad, I think I can explain. In current (2.2) there's been a new flag added to ldconfig, the -m flag. Ldconfig writes a file to /var/run called ld.so.hints, that tells the system info on finding the right shared libraries, and the -m flag (for merge) lets one add the info on a single new library. When you got that error, the system was saying that your version of ldconfig didn't know about the -m flag, but the package was correctly installed. You could have gotten past that ld.so error return by two methods: rebooting, or (as root) running ldconfig again. All of my libs are in /usr/lib, /usr/local/lib, or /usr/X11R6/lib, so before I began running current, I used the line ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib to get past that error. It oughta work for you. Alternatively, to get rid of the error message on installing the port, just go into the Makefile for the port, find the line with "ldconfig" on it, and delete it. You'll still ahve to manually adjust your ldconfig, as I showed above, but you won't get those errors on install anymore. This info is for the ports for 2.0.5R only, because the ones in current work far better. You oughta see what Satoshi's added! > > Neil > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 9120 Edmonston Ct #302 | Greenbelt, MD 20770 | I run Journey2 and n3lxx, both FreeBSD (301) 220-2114 | version 2.2 current -- and great FUN! ----------------------------+-----------------------------------------------