From owner-freebsd-questions@FreeBSD.ORG Wed Oct 10 22:08:14 2007 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CF5316A418 for ; Wed, 10 Oct 2007 22:08:14 +0000 (UTC) (envelope-from noackjr@alumni.rice.edu) Received: from smtp106.biz.mail.re2.yahoo.com (smtp106.biz.mail.re2.yahoo.com [206.190.52.175]) by mx1.freebsd.org (Postfix) with SMTP id A21BE13C481 for ; Wed, 10 Oct 2007 22:08:13 +0000 (UTC) (envelope-from noackjr@alumni.rice.edu) Received: (qmail 81868 invoked from network); 10 Oct 2007 21:41:32 -0000 Received: from unknown (HELO optimator.noacks.org) (noackjr@supercrime.org@24.30.93.225 with login) by smtp106.biz.mail.re2.yahoo.com with SMTP; 10 Oct 2007 21:41:32 -0000 X-YMail-OSG: q_r32gkVM1nj.pz1hMyojCgiAhjlXfkuqdmYg4jCRJLAvcrXmDdujzGkCBrArwOSgGI6eDReyKEN6XzSsqKXKGknNnqi5IHTiSXzHjFiOj_6bEPO14c- Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id AAB656249 for ; Wed, 10 Oct 2007 17:41:31 -0400 (EDT) X-Virus-Scanned: amavisd-new at noacks.org Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EHmJE9uFb4kE for ; Wed, 10 Oct 2007 17:41:29 -0400 (EDT) Received: from www.noacks.org (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 980A36113 for ; Wed, 10 Oct 2007 17:41:29 -0400 (EDT) Received: from 70.130.237.37 (SquirrelMail authenticated user noackjr) by www.noacks.org with HTTP; Wed, 10 Oct 2007 17:41:29 -0400 (EDT) Message-ID: <64910.70.130.237.37.1192052489.squirrel@www.noacks.org> Date: Wed, 10 Oct 2007 17:41:29 -0400 (EDT) From: "Jonathan Noack" To: questions@freebsd.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: Subject: shooting oneself in the foot with "ldconfig -v" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2007 22:08:14 -0000 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