Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 231324 - Compiling app-admin/apache-tools-2.2.9 fails to find libpq.so
Summary: Compiling app-admin/apache-tools-2.2.9 fails to find libpq.so
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-09 18:28 UTC by Ian Petersen
Modified: 2009-07-05 14:40 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 Ian Petersen 2008-07-09 18:28:12 UTC
I'm trying to upgrade world, which includes upgrading app-admin/apache-tools from 2.2.8 to 2.2.9.  The compile fails because the linker can't find libpq.so.  The exact error message is:

/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lpq

It seems ld is being invoked by libtool.  Sample failing command line:

/usr/bin/libtool --silent --mode=link i686-pc-linux-gnu-gcc -pthread  -march=k8 -O2 -pipe   -Wl,--no-as-needed -L/usr/lib/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto  -Wl,--no-as-needed -o htdigest  htdigest.lo   -L/usr/lib -lpcre /usr/lib/libaprutil-1.la -lgdbm -lpq -lmysqlclient_r -lexpat /usr/lib/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl

I have dev-db/postgresql-base-8.3.1 installed, which provides libpq.so, libpq.so.5, and libpq.so.5.1, all in /usr/lib/postgresql-8.3/lib.

I assume the problem is that /usr/lib/postgresql-8.3/lib is not in the library search path for ld and the nonexistence of /usr/lib/libpq.so is causing the failure.

Reproducible: Always

Steps to Reproduce:
1. Make sure libpq.so is in /usr/lib/postgresql-8.3/lib, possibly by installing postgresql-base-8.3.1
2. Try to install apache-tools-2.2.9


Actual Results:  
Failure to compile--can't find libpq.

Expected Results:  
Successful compile.

Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8 i686)
=================================================================
System uname: 2.6.24-gentoo-r8 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Timestamp of tree: Thu, 03 Jul 2008 16:21:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en en_CA en_US"
MAKEOPTS="-j11"
PKGDIR="/usr/portage/packages"
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.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X aac acpi aiglx alsa apache2 artworkextra asf bash-completion binary-drivers bitmap-fonts bonobo branding bzip2 cairo canna cdb cdparanoia cdr chardet cjk consolekit cpudetection cracklib cups dba dbase dbcp dbm dbus dbx dga dio directfb djvu dlloader dmi doc dri dvd dvdr dvi encode examples expat fam fastcgi fbcon firefox foomaticdb fuse gb gdbm gif gimpprint glitz gnome gnome-keyring gnutls gphoto2 gpm graphviz gstreamer gtk gtk2 hal hddtemp iconv imagemagick imap imlib innodb iodbc ipv6 java java5 javascript jboss jpeg jpeg2k junit kqemu latex libffi libnotify libwww lzo lzw m17n-lib mad maildir mdb midi mime mmap mmx mmxext modplug mozdevelop mozilla moznocompose moznoirc moznomail moznoroaming moznoxft mozsvg mp3 mp4 mpeg mpeg2 mplayer msn multiuser musepack mysql nautilus ncurses network new-login nls no-htdocs no-old-linux nolvm1 nptl nptlonly nsplugin nvidia nvidis odbc offensive ogg on-the-fly-crypt opengl pam pch pcre pdf perl pmu png postgres print qt4 quicktime quotes readline real rtc ruby sdl seamonkey sensord sharedmem smp sockets sox speex spell sse sse-filters sse2 ssl subversion svg sysfs sysvipc t1lib tetex theora threads thunderbird tidy tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales vim-with-x vorbis win32codecs wma wmf x86 xanim xbase xcomposite xine xinerama xml xorg xpm xsl xv xvid xvmc zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias asis auth_basic auth_digest autoindex cache cern_meta charset_lite dav dav_fs deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_connect proxy_ftp proxy_http rewrite setenvif speling status unique_id userdir usertrack vhost_alias authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user dav_lock dbd dumpio ident imagemap log_forensic proxy_ajp proxy_balancer version" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_CA en_US" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Luca Lesinigo 2008-11-16 08:47:22 UTC
Starting from a more-or-less 'clean' gentoo 2008.0 stage3 on HPPA with gcc-4.3.2:
gcc43 ~ # USE=postgres emerge -pv apache-tools
[ebuild  N    ] dev-libs/apr-1.3.2  USE="-debug -doc -urandom" 0 kB 
[ebuild  N    ] dev-db/libpq-8.0.15  USE="nls pam readline ssl zlib -kerberos -pg-intdatetime -threads" 0 kB 
[ebuild  N    ] virtual/postgresql-base-8.0  0 kB 
[ebuild  N    ] dev-libs/apr-util-1.3.2  USE="berkdb gdbm postgres -doc -freetds -ldap -mysql -odbc -sqlite -sqlite3" 0 kB 
[ebuild  N    ] app-admin/apache-tools-2.2.9  USE="ssl" 0 kB 
this merge went without apparent problems.
 * dev-db/libpq-8.0.15 installs the library in /usr/lib/ with the usual symlinks - no subdirectories
 * apache-tools doesn't actually USE, link or depend on postgresql or its libraries. strange that it tried to link libpq in your case
 * apr-util is the one who actually links libpq and it depends on virtual/postgresql-base if USE=postgres
 * apr-util correctly linked to libpq on my system after installing dev-db/libpq-8.0.15 (files /usr/lib/apr-util-1/apr_dbd_pgsql*)

you talk about postgresql-base-8.3.1 but every single dev-db/postgresql-base ebuild is masked.
Also >=virtual/postgresql-base-8.1 and >=dev-db/libpq-8.1* are masked.

there seem to be some conflicts between dev-db/libpq and dev-db/postgresql-base, see bug #243982 
are you sure about your postrgresql-base-8.3.1? Maybe you should remove that and use dev-db/libpq instead
Also, are you sure about apache-tools trying to link libpq? It shouldn't.

By the way, on my system unmasking and emerging dev-db/postgresql-base-8.3.4 will install /usr/lib/postgresql-8.3/lib/libpq.so.5.1 with the usual symlinks in the same directory and also two symlinks from /usr/lib/libpq.a and /usr/lib/libpq.so

On the other hand, dev-db/libpq-8.3.1 is not only ~* but also currently package.mask'ed (see the same bug #243982 as above) so I didn't go further with tests.

Hope this helps.