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
Summary: Compiling app-admin/apache-tools-2.2.9 fails to find
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Apache Team - Bugzilla Reports
Depends on:
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: ---


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  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/ -lgdbm -lpq -lmysqlclient_r -lexpat /usr/lib/ -luuid -lrt -lcrypt -lpthread -ldl

I have dev-db/postgresql-base-8.3.1 installed, which provides,, and, 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/ is causing the failure.

Reproducible: Always

Steps to Reproduce:
1. Make sure 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 (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-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
CFLAGS="-march=k8 -O2 -pipe"
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"
FEATURES="buildpkg ccache distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
LINGUAS="en en_CA en_US"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
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"
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/ with the usual symlinks in the same directory and also two symlinks from /usr/lib/libpq.a and /usr/lib/

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.