Ethereal-users: Re: [ethereal-users] Ethereal on Freebsd! (fwd)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Wed, 1 Sep 1999 22:30:51 -0700
> Well, we finally figured out what was going on..
> Basically, my FreeBSD box didnt have an /etc/ld-elf.so.conf file

Neither does mine at home; however, "/etc/rc" does:

# Make shared lib searching a little faster.  Leave /usr/lib first if you
# add your own entries or you may come to grief.
if [ -x /sbin/ldconfig ]; then
	if [ X"`/usr/bin/objformat`" = X"elf" ]; then
		_LDC=/usr/lib
		for i in $ldconfig_paths; do
			if test -d $i; then
				_LDC="${_LDC} $i"
			fi
		done
		echo 'setting ELF ldconfig path:' ${_LDC}
		ldconfig -elf ${_LDC}
	fi

	# Legacy aout support for i386 only
	if [ X"`sysctl -n hw.machine`" = X"i386" ]; then
		# Default the a.out ldconfig path.
		: ${ldconfig_paths_aout=${ldconfig_paths}}
		_LDC=/usr/lib/aout
		for i in $ldconfig_paths_aout; do
			if test -d $i; then
				_LDC="${_LDC} $i"
			fi
		done
		echo 'setting a.out ldconfig path:' ${_LDC}
		ldconfig -aout ${_LDC}
	fi
fi

"$ldconfig_paths" is set from "/etc/defaults/rc.conf"; mine has:

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

and "ldconfig", when handed a directory rather than a file as an
argument, adds that directory to the list of directories to search
(rather than reading the file in question), so that'll add the
directories in question to the list of directories to search.

As you're also running 3.2, you probably want to check what
"ldconfig_paths" is set to in "/etc/defaults/rc.conf", and make sure it
includes "/usr/X11R6/lib" and "/usr/local/lib" at a minimum, so that the
shared library paths get set correctly after a reboot; if that works,
you can probably get rid of "/etc/ld-elf.so.conf".

(I don't remember what I did to configure the shared library paths when
I set up the FreeBSD partition on this machine, so I don't know how it
got set.)