From owner-freebsd-questions Fri Jul 27 23:18:44 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-141-144.mmcable.com [24.27.141.144]) by hub.freebsd.org (Postfix) with SMTP id BD1A537B406 for ; Fri, 27 Jul 2001 23:18:41 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 96237 invoked by uid 100); 28 Jul 2001 06:18:41 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15202.22849.179543.341861@guru.mired.org> Date: Sat, 28 Jul 2001 01:18:41 -0500 To: Drew Linsalata Cc: questions@freebsd.org Subject: Re: Shared libraries out of whack. In-Reply-To: <77458574@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Drew Linsalata types: > I've got a 3.5.1-RELEASE system on which my shared libs seem to have gotten > out of whack, causing all kinds of inetd and mysql core dumps. I think the > problem is that one of my admins tried mixing and matching files from other > boxen running 4.0 and later. No good. No kidding. You can run 3.X apps on 4.X with the compat libraries, but not the other way around. > Anyway, what's the best way to get this all back in line without wiping the > OS and restoring everything from scratch? The offenders seem to be > libc.so.4 and libutil.so.3. Those are 4.x libraries. You might get applications that need those to run properly, but I wouldn't care to try it on a production system. > Any ideas from the experts? I have to admit that after 5 years of FreeBSD > fun, I have never encountered this sort of thing before and I'm a bit > stumped! You need to chase down the things that use those two libraries - and anything that uses libutil.so.3 should also use libc.so.4 - and replace them with 3.X versions of the application. Here's a little shell script that may help with that - I'm not sure how well it'll work on 3.X: #!/bin/sh library=$1 shift for file in "$@" do uses=`ldd $file | sed -n "s;$library ;;p"` if [ "X$uses" != "X" ] then echo $file $uses fi done If you save it as libcheck, typical usage is "libcheck libc.so.4 /usr/local/bin/* 2> /dev/null" You throw away standard error because it's full of complaints about things that aren't dynamic executables. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message