From owner-freebsd-questions Sat Jan 30 18:39:41 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA25008 for freebsd-questions-outgoing; Sat, 30 Jan 1999 18:39:41 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from vanessa.eliuk.org (pme175.sunshine.net [209.17.178.175]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA25003 for ; Sat, 30 Jan 1999 18:39:38 -0800 (PST) (envelope-from kevin_eliuk@sunshine.net) Received: from localhost (cagey@localhost) by vanessa.eliuk.org (8.9.2/8.9.2) with ESMTP id SAA00709; Sat, 30 Jan 1999 18:39:20 -0800 (PST) (envelope-from cagey@vanessa.eliuk.org) Date: Sat, 30 Jan 1999 18:38:50 -0800 (PST) From: "Kevin G. Eliuk" Reply-To: "Kevin G. Eliuk" To: Jeroen Ruigrok/Asmodai cc: FreeBSD Questions Subject: Re: ldconfig and it's wonders In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 30 Jan 1999, Jeroen Ruigrok/Asmodai wrote: > Hi, > > I currently have .so files (libraries as far as my current 'nix > understanding goes) in */lib directories, which after modifying > /etc/rc.conf's ldconfig_paths and it's a.out counterpart do not appear in > ldconfig -r. What gives? > > I also created two files in /etc, namely ld.so.conf and ld-elf.so.conf with > these contents: > I would suggest that make sure that your /etc files are up to date because they take care of ldconfig and aout and elf libraries at the same time. ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib" # shared library search paths ldconfig_paths_aout="/usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout" # a.out shared library search paths I used the following suggestions I read from the lists. Note that this was based on the questioner building and installing the compatability libraries so they would have been already installed in /usr/lib/compat. So if you have not you might want to replace: /bin/sh cd /usr/lib for i in *; do if file $i | grep FreeBSD/i386 >/dev/null; then rm $i; fi done with: /bin/sh cd /usr/lib for i in *; do if file $i | grepFreeBSD/i386>/dev/null;then mv $i aout\ fi done Check it out first. --- From: Brian Feldman Okay, try this: /bin/sh cd /usr/lib for i in *; do if file $i | grep FreeBSD/i386 >/dev/null; then rm $i; fi done After doing that, look in /etc/rc.conf and check if you have an ldconfig_paths_aout. If you don't, set it to something on the order of "/usr/X11R6/lib/aout /usr/local/lib/aout /usr/lib/aout /usr/lib/compat/aout /usr/lib/compat". Then try typing ldconfig -aout /usr/X11R6/lib/aout /usr/local/lib/aout \ /usr/lib/aout /usr/lib/compat/aout /usr /lib/compat You may want to also clean out /usr/local/lib, /usr/X11R6/lib, etc. to make Certain no a.out is there. I'd do something like cd /usr/local/lib; mkdir aout for i in *; do if file $i | grep FreeBSD/i386 >/dev/null; then mv $i aout; fi \ done --- I use ldconfig -m [-aout] /path/to/libraries I clipped the relevant bits from the man page. LDCONFIG(8) FreeBSD System Manager's Manual LDCONFIG(8) The following options recognized by ldconfig: -aout Generate the hints for a.out format shared libraries. -elf Generate the hints for ELF format shared libraries. (See ENVIRONMENT) ... -m Instead of replacing the contents of the hints file with those found in the directories specified, ``merge'' in new entries. Directories recorded in the hints file by previous runs of ldcon- fig are also rescanned for new shared libraries. -r List the current contents of the hints file on the standard out- put. The hints file is not modified. The list of directories stored in the hints file is included. -s Do not scan the built-in system directory (``/usr/lib'') for shared libraries. -v Switch on verbose mode. ... ENVIRONMENT OBJFORMAT Overrides (see below) to determine whether -aout or -elf is the default. If set, its value should be either `aout' or `elf'. ... SEE ALSO ld(1), link(5) Regards, Kevin G. Eliuk Discover Rock Solid, Discover FreeBSD | http://www.FreeBSD.Org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message