libpq creates symlinks for libpq-fe.h in /usr/include and in /usr/include/postgresql The file libpq-fe.h contains an include for "postgres_ext.h". However, no symlink for this file is created when libpq is installed. Therefore any package attempting to compile against /usr/include/libpq-fe.h or /usr/include/postgresql/libpq-fe.h fail. Working fix: ln -s /usr/include/postgresql/libpq-3/server/postgres_ext.h /usr/include/postgres_ext.h ln -s /usr/include/postgresql/libpq-3/server/postgres_ext.h /usr/include/postgresql/postgres_ext.h I discovered this, for instance, when attempting to emerge bacula with postgresql support. Any application which calls "pg_config --includedir" to locate header files should not have this problem.
Portage 2.1.1-r2 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r5, 2.6.19-hardened-r1 i686) ================================================================= System uname: 2.6.19-hardened-r1 i686 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz Gentoo Base System version 1.12.6 Last Sync: Tue, 19 Dec 2006 01:00:01 +0000 ccache version 2.3 [enabled] app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 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.8.5-r3, 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.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=prescott -O2 -msse3 -fomit-frame-pointer -frename-registers -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=prescott -O2 -msse3 -fomit-frame-pointer -frename-registers -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" 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" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl apache2 authdaemond authlib bash-completion berkdb bzip2 calendar canna cdb cjk clamav courier cracklib crypt cups curl curlwrappers dbx dlloader elibc_glibc examples exif fastcgi ftp gd geoip gif hardened hardenedphp idn imap imlib input_devices_keyboard input_devices_mouse java jpeg jpeg2k kernel_linux lame libwww lm_sensors maildir mailwrapper memlimit mmx mp3 mysql mysqli ncurses net nfs nls nptl nptlonly pam pcntl pcre pdf perl php pic png postgres python readline reiserfs ruby samba sasl session spl sse sse2 ssl tcpd tidy tiff tokenizer unicode userland_GNU userlocales verbose vhosts vim-syntax x86 xml xorg zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
I'm sorry, but I can't reproduce it. This is what I get and it seems complete: /usr /usr/include /usr/include/libpq /usr/include/libpq/libpq-fs.h -> ../postgresql/libpq-3/libpq/libpq-fs.h /usr/include/libpq-fe.h -> postgresql/libpq-3/libpq-fe.h /usr/include/pg_config.h -> postgresql/libpq-3/pg_config.h /usr/include/pg_config_manual.h -> postgresql/libpq-3/pg_config_manual.h /usr/include/pg_config_os.h -> postgresql/libpq-3/pg_config_os.h /usr/include/postgres_ext.h -> postgresql/libpq-3/postgres_ext.h /usr/include/postgresql /usr/include/postgresql/internal /usr/include/postgresql/internal/c.h -> /usr/include/postgresql/libpq-3/internal/c.h /usr/include/postgresql/internal/lib /usr/include/postgresql/internal/lib/dllist.h -> /usr/include/postgresql/libpq-3/internal/lib/dllist.h /usr/include/postgresql/internal/libpq /usr/include/postgresql/internal/libpq/pqcomm.h -> /usr/include/postgresql/libpq-3/internal/libpq/pqcomm.h /usr/include/postgresql/internal/libpq-int.h -> /usr/include/postgresql/libpq-3/internal/libpq-int.h /usr/include/postgresql/internal/port.h -> /usr/include/postgresql/libpq-3/internal/port.h /usr/include/postgresql/internal/postgres_fe.h -> /usr/include/postgresql/libpq-3/internal/postgres_fe.h /usr/include/postgresql/internal/pqexpbuffer.h -> /usr/include/postgresql/libpq-3/internal/pqexpbuffer.h /usr/include/postgresql/libpq /usr/include/postgresql/libpq/libpq-fs.h -> /usr/include/postgresql/libpq-3/libpq/libpq-fs.h /usr/include/postgresql/libpq-3 /usr/include/postgresql/libpq-3/internal /usr/include/postgresql/libpq-3/internal/c.h /usr/include/postgresql/libpq-3/internal/lib /usr/include/postgresql/libpq-3/internal/lib/dllist.h /usr/include/postgresql/libpq-3/internal/libpq /usr/include/postgresql/libpq-3/internal/libpq/pqcomm.h /usr/include/postgresql/libpq-3/internal/libpq-int.h /usr/include/postgresql/libpq-3/internal/port.h /usr/include/postgresql/libpq-3/internal/postgres_fe.h /usr/include/postgresql/libpq-3/internal/pqexpbuffer.h /usr/include/postgresql/libpq-3/libpq /usr/include/postgresql/libpq-3/libpq/libpq-fs.h /usr/include/postgresql/libpq-3/libpq-fe.h /usr/include/postgresql/libpq-3/pg_config.h /usr/include/postgresql/libpq-3/pg_config_manual.h /usr/include/postgresql/libpq-3/pg_config_os.h /usr/include/postgresql/libpq-3/postgres_ext.h /usr/include/postgresql/libpq-fe.h -> /usr/include/postgresql/libpq-3/libpq-fe.h /usr/include/postgresql/pg_config.h -> /usr/include/postgresql/libpq-3/pg_config.h /usr/include/postgresql/pg_config_manual.h -> /usr/include/postgresql/libpq-3/pg_config_manual.h /usr/include/postgresql/pg_config_os.h -> /usr/include/postgresql/libpq-3/pg_config_os.h /usr/include/postgresql/postgres_ext.h -> /usr/include/postgresql/libpq-3/postgres_ext.h [...] Please try again and re-open with a complete build-log if the problem still exists.