Re: shooting oneself in the foot with "ldconfig -v"
On Wed, October 10, 2007 18:34, Erik Trulsson wrote: > On Wed, Oct 10, 2007 at 05:41:29PM -0400, Jonathan Noack wrote: >> Hey folks, >> I'm running 6.2-p8 and was trying to clean up my "portsclean -L" output >> today. It was reporting tons of duplicate libraries in /usr/X11R6 and >> /usr/local even though X11R6 is an alias to /usr/local. I tracked the >> problem to portclean's use of `ldconfig -elf -r` which was reporting >> directories and libraries in /usr/X11R6. I read the ldconfig manpage in >> an attempt to understand more and saw this line: >> -v Switch on verbose mode. >> >> I told myself, "Self, the '-v' option may allow you to determine what's >> going on. It can't help knowing more!" Alas, the "-v" option doesn't >> behave as advertised. Instead it clears the shared library cache >> (reference: http://www.parsed.org/tip/231/). An empty shared library >> cache means all dynamically-linked programs fail. This has the >> wonderful >> side-effect of preventing me from logging into the box to fix it (I >> logged >> off before I figured this out). "Reboot and all will be well," you say? >> Yes, on boot /etc/rc.d/ldconfig is run and it builds the shared library >> cache. Unfortunately, the box is 1,000 miles away in my apartment. :( >> >> This brings me to the question: >> Is the "-v" option broken or is the documentation out of date? > > No, the '-v' option behaves as documented and is not broken. > It is, however, intended to be used in conjunction with some other option. > > You see, running ldconfig(8) without any arguments at all will clear the > shared library cache. (Actually it will replace the cache with the files > found in the specified directories, but since none were specified...) > Adding '-v' will not change what ldconfig does, except possibly letting > it be a bit more verbose about what happens. Not according to ldconfig(8); running ldconfig without any arguments implies "-R": -R Rescan the previously configured directories. This opens the previous hints file and fetches the directory list from the header. Any additional pathnames on the command line are also processed. This is the default action when no parameters are given. The previously configured directory list was fully populated, so effectively there should have been no change as the previously configured directories were untouched and I specified no additional pathnames. > ldconfig is behaving as designed and documented, so the bug, such as it > is, > is in the design of ldconfig that lets you screw up the machine by simply > running ldconfig without any option. Are you saying that by specifying "-v" I no longer satisfied the "no parameters are given" clause and ended up in a default place in the logic? I could see how an unconditional shared library cache clear coupled with no additional action (no matching actions to pursue) could get me the results I got. If so that behavior is really confusing. IMHO a verbose switch shouldn't change behavior; it should just spam the console a lot. -Jon ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
shooting oneself in the foot with "ldconfig -v"
Hey folks, I'm running 6.2-p8 and was trying to clean up my "portsclean -L" output today. It was reporting tons of duplicate libraries in /usr/X11R6 and /usr/local even though X11R6 is an alias to /usr/local. I tracked the problem to portclean's use of `ldconfig -elf -r` which was reporting directories and libraries in /usr/X11R6. I read the ldconfig manpage in an attempt to understand more and saw this line: -v Switch on verbose mode. I told myself, "Self, the '-v' option may allow you to determine what's going on. It can't help knowing more!" Alas, the "-v" option doesn't behave as advertised. Instead it clears the shared library cache (reference: http://www.parsed.org/tip/231/). An empty shared library cache means all dynamically-linked programs fail. This has the wonderful side-effect of preventing me from logging into the box to fix it (I logged off before I figured this out). "Reboot and all will be well," you say? Yes, on boot /etc/rc.d/ldconfig is run and it builds the shared library cache. Unfortunately, the box is 1,000 miles away in my apartment. :( This brings me to the question: Is the "-v" option broken or is the documentation out of date? Thanks, -Jon ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
install-info: menu item '...' already exists (was Re: Unable to install 'dirmngr')
>> When attempting to install 'dirmngr', I am greeted with this error >> message: >> >> gmake[2]: Nothing to be done for `install-exec-am'. >> gmake[2]: Nothing to be done for `install-data-am'. >> gmake[2]: Leaving directory >> `/usr/ports/security/dirmngr/work/dirmngr-0.9.3/tests' >> gmake[1]: Leaving directory >> `/usr/ports/security/dirmngr/work/dirmngr-0.9.3/tests' >> gmake[1]: Entering directory >> `/usr/ports/security/dirmngr/work/dirmngr-0.9.3' >> gmake[2]: Entering directory >> `/usr/ports/security/dirmngr/work/dirmngr-0.9.3' >> gmake[2]: Nothing to be done for `install-exec-am'. >> gmake[2]: Nothing to be done for `install-data-am'. >> gmake[2]: Leaving directory >> `/usr/ports/security/dirmngr/work/dirmngr-0.9.3' >> gmake[1]: Leaving directory >> `/usr/ports/security/dirmngr/work/dirmngr-0.9.3' >> install-info --quiet /usr/local/info/dirmngr.info /usr/local/info/dir >> install-info: menu item `dirmngr-client' already exists, for file `gnupg' >> *** Error code 1 >> >> Stop in /usr/ports/security/dirmngr. >> *** Error code 1 >> >> Stop in /usr/ports/security/dirmngr. >> >> Those are the last few lines. I have the entire script; however, there >> really does not seem to be anything of use in it. Perhaps someone has >> an idea what I should try doing. > > I can't reproduce the exat problem, but it looks like the info file > installs for the port aren't quite right. Try contacting the port > maintainer. I ran into this problem as well. I was only able to figure it out when I tracked down install-info: $ which install-info /usr/local/bin/install-info $ pkg_which install-info texinfo-4.8_3 $ locate install-info /usr/bin/install-info ... /usr/local/bin/install-info There are two versions installed! One is part of the base system (/usr/bin/install-info) and the other was installed with the texinfo port (/usr/local/bin/install-info). I changed my $PATH long ago to put /usr/local/bin in front of /usr/bin. Because of this, the wrong install-info was being used. Changing $PATH back to the default or uninstalling texinfo allowed me to install dirmngr (and other ports...). -Jonathan -- Jonathan Noack | [EMAIL PROTECTED] | OpenPGP: 0x991D8195 signature.asc Description: OpenPGP digital signature