From owner-freebsd-questions@freebsd.org Tue Jan 5 03:52:42 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98655A61B1E for ; Tue, 5 Jan 2016 03:52:42 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail05.adl6.internode.on.net (ipmail05.adl6.internode.on.net [150.101.137.143]) by mx1.freebsd.org (Postfix) with ESMTP id 2B31413D4 for ; Tue, 5 Jan 2016 03:52:41 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ppp14-2-92-61.lns21.adl6.internode.on.net (HELO leader.local) ([14.2.92.61]) by ipmail05.adl6.internode.on.net with ESMTP; 05 Jan 2016 14:17:32 +1030 Subject: Re: Safe to delete old files in /usr/lib? To: Polytropon , Markus Edemalm References: <20160104181211.76907a30.freebsd@edvax.de> <20160104185245.5ca2e4f1.freebsd@edvax.de> <20160104203418.aee8df91.freebsd@edvax.de> Cc: freebsd-questions@freebsd.org From: Shane Ambler Message-ID: <568B3CD2.8030708@ShaneWare.Biz> Date: Tue, 5 Jan 2016 14:17:30 +1030 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160104203418.aee8df91.freebsd@edvax.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 03:52:42 -0000 On 05/01/2016 06:04, Polytropon wrote: > On Mon, 4 Jan 2016 19:18:02 +0100, Markus Edemalm wrote: >>> 4 jan. 2016 kl. 18:52 skrev Polytropon : >>> >>> On Mon, 4 Jan 2016 18:28:14 +0100, Markus Edemalm wrote: >>>>> 4 jan. 2016 kl. 18:12 skrev Polytropon : >>>>> >>>>> On Mon, 4 Jan 2016 18:06:00 +0100, Markus Edemalm wrote: >>>>>> Hello, >>>>>> >>>>>> My system was first installed as 10.0-RELEASE. I have >>>>>> sinceupgraded to 10.1, 10.1-STABLE, 10.2-RELEASE and is now >>>>>> at 10.2-RELEASE-p8. >>>>>> I’ve rebuild from source and followed the steps in the >>>>>> handbook. Everything is fine… but: >>>>>> >>>>>> I see many files in /usr/lib with old dates, apparently >>>>>> they are no longer installed during upgrades. Did you clear out /usr/obj With the right modifications dates, a binary doesn't need to be rebuilt While I think make buildworld should clean it out, some files may get missed. >>>>>> My /etc/make.conf looks like this: >>>>>> >>>>>> NO_PROFILE=true >>>>>> WITHOUT_X11=yes >>>>>> >>>>>> Today, January the 4th, I upgraded to -p8. The newly >>>>>> installedfiles has todays date, i.e ”Jan 4”. >>>>>> If I do: >>>>>> >>>>>> ls -lF /usr/lib | grep -v 'Jan 4' | awk {'print $9'} >>>>>> >>>>>> …I get the following list of (obsolete?) files and folders with older dates. >>>> And, they are all .a files, except for libc++.so and libc.so. >>>> >>>> I added NO_PROFILE=true to /etc/make.conf a while back. Is that relevant? >>> >>> Hmmm... I always thought that would be the default (no profiling libs >>> being built and installed). But according to "man src.conf", the >>> setting's name is WITHOUT_PROFILE, not NO_PROFILE. >> >> Hmm. I forgot about src.conf, I got: >> >> cat /etc/src.conf >> WITHOUT_BLUETOOTH=yes >> WITHOUT_FLOPPY=yes >> WITHOUT_IPFW=yes >> WITHOUT_IPFILTER=yes >> >> That may explain why _some_ libs are not being built and installed. >> But still, more than 100 .a files with old dates. Doesn’t make sense to me at all. > > In this case, a good idea would be to move the old libraries out > of /usr/lib (for example into a newly created /usr/lib.old directory) > and checking if any application in use produces an error. In that > case, the required library could be restored. If no further error > appears - forget about those libraries. :-) .a files should be copied into the final binary, so removing .a files won't break anything that is already built, but the next make could fail with a missing library at link time. I am running 10-stable and run make delete-old after upgrades - ls /usr/lib/*.a | wc -l 292 ls /usr/lib/*.so | wc -l 162 find /usr/lib -type l -name "*.a" | wc -l 22 I do seem to have a few old libs find /usr/lib -not -newermt "2 weeks ago" | wc -l 19 Downloading base.txz for 10.2-RELEASE - ls usr/lib/*.a | wc -l 287 ls usr/lib/*.so | wc -l 162 -- FreeBSD - the place to B...Software Developing Shane Ambler