# ... against 4.7.25, run-time linked against 4.8.30 [SOLVED]

## hanj

Hello All

This is semi-urgent. All of a sudden today, I noticed that my postfix install was not working. I took a look in /var/log/mail.log and see tons of these:

```
Jan 31 21:32:38 comp postfix/master[8874]: daemon started -- version 2.7.2, configuration /etc/postfix

Jan 31 21:32:38 comp postfix/qmgr[8881]: fatal: incorrect version of Berkeley DB: compiled against 4.7.25, run-time linked against 4.8.30

Jan 31 21:32:39 comp postfix/cleanup[8882]: fatal: incorrect version of Berkeley DB: compiled against 4.7.25, run-time linked against 4.8.30

Jan 31 21:32:39 comp postfix/master[8874]: warning: process //usr/lib64/postfix/qmgr pid 8881 exit status 1

Jan 31 21:32:39 comp postfix/master[8874]: warning: //usr/lib64/postfix/qmgr: bad command startup -- throttling

Jan 31 21:32:40 comp postfix/master[8874]: warning: process //usr/lib64/postfix/cleanup pid 8882 exit status 1

Jan 31 21:32:40 comp postfix/master[8874]: warning: //usr/lib64/postfix/cleanup: bad command startup -- throttling
```

This appeared after upgrading postfix to 2.7.2 (from 2.7.1). Rolling back to 2.7.1 does not help. I re-emerged postfix several times, the the error is the same? I do have db-4.7.25 and db-4.8.30. I tried to uninstall 4.7.25 and rebuild postfix (with only db-4.8.30 on the system), but no dice. I'm unsure how to force postfix to build against 4.8.30?? I'm not seeing any reference for db in the ebuild, etc.

I am running postfix in chroot, which I also tried to start with the binaries non-chrooted but the problem persists. I verified that the chroot has the correct libs (libdb.so is 4.8.so). Even when I do ldd on the binaries having problems.. looks to be using proper 4.8.solib??

```
ldd /usr/lib64/postfix/qmgr

        libdb-4.8.so => /usr/lib/libdb-4.8.so (0x00007f242d92c000)
```

I'm feeling like this is something super stupid.. and I'm just missing it.

Here is my emerge --info output:

```
Portage 2.1.9.25 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.11.2-r3, 2.6.35.4-rscloud x86_64)

=================================================================

System uname: Linux-2.6.35.4-rscloud-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2374_HE-with-gentoo-1.12.14

Timestamp of tree: Mon, 31 Jan 2011 10:30:01 +0000

app-shells/bash:     4.1_p9

dev-lang/python:     2.6.6-r1, 3.1.2-r4

dev-util/cmake:      2.8.1-r2

sys-apps/baselayout: 1.12.14-r1

sys-apps/sandbox:    2.4

sys-devel/autoconf:  2.65-r1

sys-devel/automake:  1.10.2, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.3.4, 4.4.4-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.10

sys-devel/make:      3.81-r2

virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j4"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="amd64 apache2 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gpm iconv innodb maildir mmx modules mudflap multilib mysql ncurses nptl nptlonly openmp openssh pam pcre perl php pppd pwdb python readline sasl session snortsam sse sse2 ssl sysfs tcpd unicode vhosts xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias cgi" APACHE2_MPMS="prefork" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
```

Here are my USE flags

```
[ebuild   R   ] sys-libs/db-4.8.30  USE="-doc -examples -java -nocxx -tcl -test" 0 kB

[ebuild   R   ] mail-mta/postfix-2.7.2  USE="mysql pam sasl ssl vda -cdb -dovecot-sasl -hardened -ipv6 -ldap -mbox -nis -postgres (-selinux)" 0 kB
```

Here are the dbs on the system

```
eix sys-libs/db

[I] sys-libs/db

     Available versions:

        (1)     1.85-r3

        (3)     3.2.9_p2

        (4.2)   ~4.2.52_p5 4.2.52_p5-r1

        (4.3)   ~4.3.29_p1 4.3.29_p1-r1

        (4.4)   ~4.4.20_p4 ~4.4.20_p4-r1

        (4.5)   4.5.20_p2 4.5.20_p2-r1

        (4.6)   4.6.21_p4

        (4.7)   ~4.7.25_p3 4.7.25_p4

        (4.8)   ~4.8.24 ~4.8.26 4.8.30

        (5.0)   [M]~5.0.21-r1 [M]~5.0.26 [M]~5.0.32

        (5.1)   [M]~5.1.19-r2

        {doc elibc_FreeBSD examples java nocxx tcl test}

     Installed versions:  4.7.25_p4(4.7)(22:39:29 01/31/11)(-doc -elibc_FreeBSD -examples -java -nocxx -tcl -test) 4.8.30(4.8)(21:25:07 01/31/11)(-doc -elibc_FreeBSD -examples -java -nocxx -tcl -test)

     Homepage:            http://www.oracle.com/technology/software/products/berkeley-db/index.html

     Description:         Oracle Berkeley DB
```

As of right now.. I'm re-emerging glibc to see if that might help

Thanks in advance!

hanji

----------

## E001754

This is stupid answer, but worth trying if not already done :

would 'prelink -amR' solve your issue ?

or try 'prelink -au' to remove all prelinks on your system and see if it works better ?

did you ran revdep-rebuild ?

Hope it helps

----------

## hanj

Sheesh.. I finally got it. Looks like my symlink in /usr/include/db.h was broken and had the file for 4.7. I deleted the file and created a symlink to /usr/include/db4.8/db.h and recompiled postfix.. and I was golden.

h

----------

