Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 160340 - mail-mta/postfix-2.2.10 fails to build with mysql-5.0.26-r1
Summary: mail-mta/postfix-2.2.10 fails to build with mysql-5.0.26-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: HPPA Linux
: High major (vote)
Assignee: Tuan Van (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-05 16:57 UTC by Luca Lesinigo
Modified: 2007-01-06 13:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Lesinigo 2007-01-05 16:57:33 UTC
I am happily using postfix:
[ebuild   R   ] mail-mta/postfix-2.2.10  USE="ipv6 mailwrapper pam ssl -cdb -hardened -ldap -mbox -mysql -nis -postgres -sasl (-selinux) -vda" 0 kB

but if I try to rebuild it with USE=mysql I get:
hppa2.0-unknown-linux-gnu-gcc -DHAS_PCRE -DHAS_MYSQL -I/usr/include/mysql -DUSE_TLS -DDEF_DAEMON_DIR=\"/usr/lib/postfix\" -DDEF_MANPAGE_DIR=\"/usr/share/man\" -DDEF_README_DIR=\"/usr/share/doc/postfix-2.2.10/readme\" -DDEF_HTML_DIR=\"/usr/share/doc/postfix-2.2.10/html\" -g -O2 -pipe -march=2.0 -I. -I../../include -DLINUX2 -o master master.o master_conf.o master_ent.o master_sig.o master_avail.o master_spawn.o master_service.o master_status.o master_listen.o master_vars.o master_wakeup.o master_flow.o ../../lib/libglobal.a ../../lib/libutil.a -Wl,-z,now -L/usr/lib -lpcre -lcrypt -lpthread -lpam -lmysqlclient -lm -lz -lssl -lcrypto -ldb -lnsl -lresolv
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.1/../../../../hppa2.0-unknown-linux-gnu/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: *** [master] Error 1
make: *** [update] Error 1

!!! ERROR: mail-mta/postfix-2.2.10 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  postfix-2.2.10.ebuild, line 231:   Called die


Trying postfix-2.2.11.ebuild gives the same error.

I'm using:
[ebuild   R   ] dev-db/mysql-5.0.26-r1  USE="berkdb perl ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal (-selinux) -static" 0 kB 

Other apps linked to it work fine, php (USE=mysql mysqli) for example:
# ldd /usr/bin/php | grep sql
libmysqlclient.so.15 => /usr/lib/mysql/libmysqlclient.so.15 (0x413c7000)
...that's what make me think that the problem lies in postfix build process.


emerge --info follows.

Portage 2.1.1-r2 (default-linux/hppa/2006.1, gcc-4.1.1, glibc-2.3.6-r5, 2.6.17.10-pa6 parisc)
=================================================================
System uname: 2.6.17.10-pa6 parisc PA8600 (PCX-W+)
Gentoo Base System version 1.12.6
Last Sync: Thu, 04 Jan 2007 17:20:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="hppa"
AUTOCLEAN="yes"
CBUILD="hppa2.0-unknown-linux-gnu"
CFLAGS="-O2 -pipe -march=2.0"
CHOST="hppa2.0-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="it en_GB"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
USE="hppa alsa alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol apache2 bash-completion berkdb bitmap-fonts bzip2 cli cracklib crypt dlloader elibc_glibc fbcon firefox foomaticdb fortran gd gdbm gnutls gpm iconv idea imap imlib input_devices_evdev input_devices_keyboard input_devices_mouse iproute2 ipv6 isdnlog javascript jpeg kernel_linux libwww linguas_en_GB linguas_it mailwrapper mime mmap mp3 mpm-prefork ncurses nls pam pcre pdf perl pic png pppd python readline reflection rtc samba sendfile session sndfile snmp spell spl ssl tcpd truetype-fonts type1-fonts unicode userland_GNU video_cards_fbdev xml xml2 xorg zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Luca Lesinigo 2007-01-05 17:59:19 UTC
FYI, changing line 167 of postfix-2.2.10.ebuild from:
mylibs="${mylibs} -lmysqlclient -lm -lz"
to:
mylibs="${mylibs} -L/usr/lib/mysql -lmysqlclient -lm -lz"

changes the error in this one (seems it compiled OK this time?):

>>> Install postfix-2.2.10 into /var/tmp/portage/postfix-2.2.10/image/ category mail-mta
bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
[lots of this 'cannot open' errors]
postfix-install: Error: "" should be "no" or an absolute path name.

!!! ERROR: mail-mta/postfix-2.2.10 failed.
[...]
Comment 2 Luca Lesinigo 2007-01-06 13:14:12 UTC
Today I found mysql-5.0.26-r2 marked stable, upgrading to -r2 solves this problem. Now postfix compiles and works ok with mysql.

I noted that mysql-5.0.26-r1 just puts its libs in /usr/lib/mysql/, while -r2 also puts symlinks in /usr/lib.

mysql-5.0.26-r1 is b0rked, afaik, but it isn't in portage anymore. I think this qualifies as a fix for this bug.