I am upgrading some machines today and those with db42 installed failed
after portupgrade from portupgrade-2.1.3,1 to portupgrade-2.1.3.2,2.
Every command from portupgrade package ends with:
/libexec/ld-elf.so.1:
/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd6/bdb.so: Undefined symbol
"db_version_4002"
I have this problem on FreeBSD 4.11, 5.4 and 6.0. On these boxes I have
more then 1 version of BDB:
pkg_info -R db4\*
Information for db4-4.0.14_1,1:
Information for db42-4.2.52_4:
Required by:
postfix-2.2.10_1,1
ruby18-bdb-0.5.9
portupgrade-2.1.3.2,2
Information for db43-4.3.29:
Required by:
php5-dba-5.1.4
php5-extensions-1.0
On other machines with 6.1 and only db41-4.1.25_3 installed portupgrade
works fine.
On machine with 6.0 and db4-4.0.14_1,1 db43-4.3.29 installed works fine
too. (portupgrade depends on db43-4.3.29)
Only on those machines with BDB 4.2 portupgrade stop working.
This is the end of `portupgrade portupgrade` command:
===> Registering installation for portupgrade-2.1.3.2,2
===> Building package for portupgrade-2.1.3.2,2
Creating package /usr/ports/packages/All/portupgrade-2.1.3.2,2.tbz
Registering depends: ruby18-bdb-0.5.9 ldconfig_compat-1.0_8 perl-5.8.8
ruby-1.8.4_8,1 db42-4.2.52_4.
Registering conflicts: portupgrade-devel-*.
Creating bzip'd tar ball in
'/usr/ports/packages/All/portupgrade-2.1.3.2,2.tbz'
===> Cleaning for ruby-1.8.4_8,1
===> Cleaning for ruby18-bdb-0.5.9
===> Cleaning for ldconfig_compat-1.0_8
===> Cleaning for perl-5.8.8
===> Cleaning for db42-4.2.52_4
===> Cleaning for libtool-1.5.22_2
===> Cleaning for portupgrade-2.1.3.2,2
---> Cleaning out obsolete shared libraries
/libexec/ld-elf.so.1:
/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd5/bdb.so: Undefined symbol
"db_version_4002"
---> Upgrade tasks: 1
---> Summary: 1 done, 0 ignored, 0 skipped and 0 failed
/libexec/ld-elf.so.1:
/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd5/bdb.so: Undefined symbol
"db_version_4002"
/usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:450:in `__system': Command
failed [exit code 1]: /usr/local/sbin/pkgdb -aFQ (CommandFailedError)
from /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:473:in `__sudo'
from /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:479:in
`xsystem!'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:961:in `autofix!'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:957:in `autofix'
from /usr/local/sbin/portupgrade:475:in `main'
from /usr/local/sbin/portupgrade:718:in `main'
from /usr/local/lib/ruby/1.8/optparse.rb:815:in `initialize'
from /usr/local/sbin/portupgrade:209:in `main'
from /usr/local/sbin/portupgrade:1978
On FreeBSD 4.11 with db4, db41, db42 and db43 installed:
Creating gzip'd tar ball in
'/usr/ports/packages/All/portupgrade-2.1.3.2,2.tgz'
===> Cleaning for ruby-1.8.4_8,1
===> Cleaning for ruby18-bdb-0.5.9
===> Cleaning for ldconfig_compat-1.0_8
===> Cleaning for openssl-0.9.8b_1
===> Cleaning for db41-4.1.25_3
===> Cleaning for rc_subr-1.31_1
===> Cleaning for portupgrade-2.1.3.2,2
---> Cleaning out obsolete shared libraries
/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd4/bdb.so:
(NotImplementedError)
BDB needs compatible versions of libdb & db.h
you have db.h version 4.1.25 and libdb version 4.3.29
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:152:in
`set_db_driver'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:81:in `setup'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:76:in `initialize'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:5:in `new'
from /usr/local/lib/ruby/1.8/singleton.rb:95:in `instance'
from /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:206:in
`init_pkgtools_global'
from /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:1155
from /usr/local/sbin/portsclean:35
---> Upgrade tasks: 1
---> Summary: 1 done, 0 ignored, 0 skipped and 0 failed
/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd4/bdb.so:
(NotImplementedError)
BDB needs compatible versions of libdb & db.h
you have db.h version 4.1.25 and libdb version 4.3.29
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:152:in
`set_db_driver'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:81:in `setup'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:76:in `initialize'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:5:in `new'
from /usr/local/lib/ruby/1.8/singleton.rb:95:in `instance'
from /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:206:in
`init_pkgtools_global'
from /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:1155
from /usr/local/sbin/pkgdb:36
/usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:450:in `__system': Command
failed [exit code 1]: /usr/local/sbin/pkgdb -aFQ (CommandFailedError)
from /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:473:in `__sudo'
from /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:479:in
`xsystem!'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:961:in `autofix!'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:957:in `autofix'
from /usr/local/sbin/portupgrade:475:in `main'
from /usr/local/sbin/portupgrade:718:in `main'
from /usr/local/lib/ruby/1.8/optparse.rb:815:in `initialize'
from /usr/local/sbin/portupgrade:209:in `main'
from /usr/local/sbin/portupgrade:1978
Anybody sees this problem?
(and no, this is not the problem with pkgdb.db format as was previously
discussed in this list - I read /usr/ports/UPDATING carefully)
Miroslav Lachman