On 7/10/26 3:38 PM, Kaya Saman wrote:
Hi all,
I'm rebuilding my @ports after upgrading jails. It's a slow and
laborious process as the CPU's are quite slow but I'm noticing that a
few of the ports are struggling and that I need to actually run the
rebuild from the base OS instance rather then the jail.
There is this:
https://docs-archive.freebsd.org/doc/7.4-RELEASE/usr/share/doc/handbook/make-delete-old.html
in which you can run the: `make delete-old-libs DESTDIR=/path/to/jail`
command after getting the correct version of the source code.
I have run it but sadly some of the ports still do not seem to be able
to rebuild/upgrade.
I tried something the other day as the ports build fine on my base
system: diff -y /usr/lib /path/to/jail/usr/lib
and found many libraries within the /path/to/jail/usr/lib which
weren't in the base system.
I am wondering if it's safe to remove these and if these are causing
the ports to not be able to build?
Over from the @ports mailing list we established that removing
/path/to/jail/usr/lib/libreadline* files enabled the krb5 port to be
built, as with those library files around the build kept failing.
Would someone be able to shed some light on this?
Basically the question is: from the diff command above, if there are
library files within the jail that are not in base, does it mean that
these are old and can they be removed?
Many thanks.
Kaya
Just testing one of my jails and cross-comparing with the parent
build/install I can see these binaries in /usr/bin:
# diff --suppress-common-lines /usr/bin /jl/db/usr/bin
Only in /jl/db/usr/bin: addftinfo
Only in /jl/db/usr/bin: afmtodit
Only in /jl/db/usr/bin: as
Only in /jl/db/usr/bin: atf-sh
Only in /jl/db/usr/bin: bdes
Only in /jl/db/usr/bin: bsdgrep
Only in /jl/db/usr/bin: catman
Only in /jl/db/usr/bin: checknr
Only in /jl/db/usr/bin: ci
Only in /jl/db/usr/bin: clang-tblgen
Only in /jl/db/usr/bin: co
Only in /jl/db/usr/bin: colcrt
Only in /jl/db/usr/bin: colldef
Only in /jl/db/usr/bin: cpasswd
Only in /jl/db/usr/bin: csup
Only in /jl/db/usr/bin: elf2aout
Only in /jl/db/usr/bin: elfcopy
Only in /jl/db/usr/bin: eqn
Only in /jl/db/usr/bin: gdb
Only in /jl/db/usr/bin: gdbserver
Only in /jl/db/usr/bin: gdbtui
Only in /jl/db/usr/bin: gperf
Only in /jl/db/usr/bin: grn
Only in /jl/db/usr/bin: grodvi
Only in /jl/db/usr/bin: groff
Only in /jl/db/usr/bin: grog
Only in /jl/db/usr/bin: grolbp
Only in /jl/db/usr/bin: grolj4
Only in /jl/db/usr/bin: grops
Only in /jl/db/usr/bin: grotty
Only in /jl/db/usr/bin: hpftodit
Only in /jl/db/usr/bin: indxbib
Only in /jl/db/usr/bin: info
Only in /jl/db/usr/bin: infokey
Only in /jl/db/usr/bin: install-info
Only in /jl/db/usr/bin: kgdb
Only in /jl/db/usr/bin: ld.bfd
Only in /jl/db/usr/bin: lint
Only in /jl/db/usr/bin: lkbib
Only in /jl/db/usr/bin: lldb-tblgen
Only in /jl/db/usr/bin: llvm-tblgen
Only in /jl/db/usr/bin: lookbib
Only in /jl/db/usr/bin: merge
Only in /jl/db/usr/bin: mklocale
Only in /jl/db/usr/bin: mkulzma
Only in /jl/db/usr/bin: mmroff
Only in /jl/db/usr/bin: neqn
Only in /jl/db/usr/bin: nroff
Only in /jl/db/usr/bin: numactl
Only in /jl/db/usr/bin: otp-sha
Only in /jl/db/usr/bin: pawd
Only in /jl/db/usr/bin: pfbtops
Only in /jl/db/usr/bin: pic
Only in /jl/db/usr/bin: post-grohtml
Only in /jl/db/usr/bin: pre-grohtml
Only in /jl/db/usr/bin: psroff
Only in /jl/db/usr/bin: rcs
Only in /jl/db/usr/bin: rcsclean
Only in /jl/db/usr/bin: rcsdiff
Only in /jl/db/usr/bin: rcsfreeze
Only in /jl/db/usr/bin: rcsmerge
Only in /jl/db/usr/bin: refer
Only in /jl/db/usr/bin: rlog
Only in /jl/db/usr/bin: rlogin
Only in /jl/db/usr/bin: rsh
Only in /jl/db/usr/bin: send-pr
Only in /jl/db/usr/bin: sendbug
Only in /jl/db/usr/bin: sgsmsg
Only in /jl/db/usr/bin: svnlite
Only in /jl/db/usr/bin: svnliteadmin
Only in /jl/db/usr/bin: svnlitebench
Only in /jl/db/usr/bin: svnlitedumpfilter
Only in /jl/db/usr/bin: svnlitefsfs
Only in /jl/db/usr/bin: svnlitelook
Only in /jl/db/usr/bin: svnlitemucc
Only in /jl/db/usr/bin: svnliterdump
Only in /jl/db/usr/bin: svnliteserve
Only in /jl/db/usr/bin: svnlitesync
Only in /jl/db/usr/bin: svnliteversion
Only in /jl/db/usr/bin: tbl
Only in /jl/db/usr/bin: tblgen
Only in /jl/db/usr/bin: texindex
Only in /jl/db/usr/bin: tfmtodit
Only in /jl/db/usr/bin: troff
Only in /jl/db/usr/bin: vgrind
I know one of the binaries already "contaminated" the jail environment
and prevented 'automake' from building. After removing it, everything
was fine.
Does `make delete-old` remove these things as well if used without the
`-libs` option?
or is it better to remove these manually?
This is kinda what I came up with already:
diff --suppress-common-lines /usr/lib /jl/db/usr/lib | awk ' { print $4
} ' | xargs rm -f {}
which took out a massive number of library files that didn't exist in
the upgraded base install from the jail.
Maybe using: diff --suppress-common-lines /usr/bin /jl/db/usr/bin | awk
' { print $4 } ' | xargs rm -f {}
would remove the above list if it's safe?
Thanks.
Kaya