Date: Sat, 30 Jan 1999 18:38:50 -0800 (PST) From: "Kevin G. Eliuk" <kevin_eliuk@sunshine.net> To: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl> Cc: FreeBSD Questions <questions@FreeBSD.ORG> Subject: Re: ldconfig and it's wonders Message-ID: <Pine.BSF.4.05.9901301819400.347-100000@vanessa.eliuk.org> In-Reply-To: <XFMail.990130191904.asmodai@wxs.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <green@unixhelp.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9901301819400.347-100000>