ldconfig problem with rcNG

Alex Zepeda zipzippy at sonic.net
Wed May 7 19:22:10 PDT 2003


Whoops.  I'm getting messages like this:

ELF ldconfig path: /usr/lib /usr/lib/compat /usr/X11R6/lib /usr/local/lib 
/usr/local/qt/lib /usr/local/kde/lib
ldconfig: illegal option -- e
usage: ldconfig [-aout | -elf] [-Rimrsv] [-f hints_file] [dir | file ...]

during bootup.

A little further inspection, and it appears that ldconfig wants 
-{elf,aout} first or it won't work with other flags.  Like so:

blarf:~#ldconfig -elf -i /usr/lib /usr/lib/compat /usr/X11R6/lib /usr/local/lib
 /usr/local/qt/lib /usr/local/kde/lib
blarf:~#ldconfig -i -elf /usr/lib /usr/lib/compat /usr/X11R6/lib 
/usr/local/lib /usr/local/qt/lib /usr/local/kde/lib
ldconfig: illegal option -- e
usage: ldconfig [-aout | -elf] [-Rimrsv] [-f hints_file] [dir | file ...]

The attached patch fixed it for me.

- alex
-------------- next part --------------
--- /etc/rc.d/ldconfig	Wed May  7 19:18:55 2003
+++ /usr/src/etc/rc.d/ldconfig	Wed Apr 30 23:20:13 2003
@@ -23,3 +23,3 @@
 		ldconfig=${ldconfig_command}
-		checkyesno ldconfig_insecure && ld_insecure_flag="-i"
+		checkyesno ldconfig_insecure && ldconfig="${ldconfig} -i"
 		if [ -x "${ldconfig_command}" ]; then
@@ -32,3 +32,3 @@
 			echo 'ELF ldconfig path:' ${_LDC}
-			${ldconfig} -elf ${ld_insecure_flag} ${_LDC}
+			${ldconfig} -elf ${_LDC}
 
@@ -46,3 +46,3 @@
 				echo 'a.out ldconfig path:' ${_LDC}
-				${ldconfig} -aout ${ld_insecure_flag} ${_LDC}
+				${ldconfig} -aout ${_LDC}
 				;;


More information about the freebsd-current mailing list