sql.c:192:22: error: libpq-fe.h: No such file or directory Yet I have the header file here: /usr/include/postgresql-8.3/libpq-fe.h Here is the gcc command line: i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../lib -I../sasldb -I../include -I/usr/lib/postgresql-8.3/lib -fPIC -Wall -W -O2 -march=athlon-xp -fno-strict-aliasing -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED -MT sql.lo -MD -MP -MF .deps/sql.Tpo -c sql.c -fPIC -DPIC -o .libs/sql.o Perhaps the problem is that we're looking in /usr/lib/postgresql-8.3/lib? Reproducible: Always GENTOO_VM= CLASSPATH="" JAVA_HOME="/etc/java-config-2/current-system-vm" JAVACFLAGS="" COMPILER="" Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.28.9 i686) ================================================================= System uname: Linux-2.6.28.9-i686-AMD_Athlon-tm-_XP_2700+-with-glibc2.0 Timestamp of tree: Sun, 28 Jun 2009 09:00:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p39 dev-java/java-config: 2.1.7 dev-lang/python: 2.5.4-r2 dev-python/pycrypto: 2.0.1-r8 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.4 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=athlon-xp" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.utf8" LDFLAGS="-Wl,-O1" LINGUAS="de en en_US" MAKEOPTS="-j2" 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/portage/local/layman/lisp /usr/portage/local/layman/java-overlay" SYNC="rsync://sphinktoo.pippiandcarlos.com/gentoo-portage" USE="3dnow 3dnowext X acl acpi alsa apache2 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups curl dbus dri dvd dvdr dvdread emacs emboss encode evo fam ffmpeg firefox fortran gd gdbm gif gnutls gpm gstreamer gtk gtkhtml guile hal iconv imagemagick imap ipv6 isdnlog ithreads java jpeg latex libnotify libwww mad maildir midi mikmod mmx mmxext motif mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin odbc ogg opengl openmp pam pcre pdf perl pic png ppds pppd python qt3 qt3support qt4 quicktime readline reflection ruby samba sasl sdl session source spell spl sse ssl startup-notification svg sysfs tcltk tcpd tetex threads tiff truetype unicode urandom usb vorbis win32codecs x86 xattr xft xml xorg xulrunner xv zlib" ALSA_CARDS="nvidia" 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 speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Which postgres package do you have installed? I can't reproduce this, it just works for me.
[I--] [ ] app-admin/eselect-postgresql-0.3 (0) [I--] [ ~] dev-db/postgresql-base-8.3.7 (8.3) [I--] [ ~] dev-db/postgresql-server-8.3.7 (8.3) [I--] [ ~] virtual/postgresql-base-8.3 (8.3) [I--] [ ~] virtual/postgresql-server-8.3 (8.3)
The pgsql patch is being applied (see below). I have tried symlinking the header files like so: ln -s /usr/include/postgresql-8.3/libpq-fe.h /usr/lib/postgresql-8.3/lib/libpq-fe.h ln -s /usr/include/postgresql-8.3/postgres_ext.h /usr/lib/postgresql-8.3/lib/postgres_ext.h which enabled me to compile the package successfully. This means that the /usr/include/postgresql-8.3/ directory is not being included. Perhaps the header files on some machines are in /usr/lib/postgresql-8.3/lib/, but on my machine they are in /usr/include/postgresql-8.3/. That's where portage put them. >>> Emerging (1 of 1) dev-libs/cyrus-sasl-2.1.23 * cyrus-sasl-2.1.23.tar.gz RMD160 SHA1 SHA256 size ;-) * checking ebuild checksums ;-) * checking auxfile checksums ;-) * checking miscfile checksums ;-) >>> Unpacking source... >>> Unpacking cyrus-sasl-2.1.23.tar.gz to /var/tmp/portage/dev-libs/cyrus-sasl-2.1.23/work * Applying cyrus-sasl-2.1.17-pgsql-include.patch * Applying cyrus-sasl-2.1.22-as-needed.patch * Applying cyrus-sasl-2.1.19-checkpw.c.patch * Applying cyrus-sasl-2.1.22-crypt.patch * Applying cyrus-sasl-2.1.22-qa.patch * Applying cyrus-sasl-2.1.22-db4.patch * Applying cyrus-sasl-2.1.22-gcc44.patch
>>> Installing (1 of 1) dev-libs/cyrus-sasl-2.1.23 * Generating an empty sasldb2 with correct permissions ... saslpasswd2: generic failure * * ERROR: dev-libs/cyrus-sasl-2.1.23 failed. * Call stack: * ebuild.sh, line 49: Called pkg_postinst * environment, line 4682: Called die * The specific snippet of code: * echo "p" | "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -p login || die "Failed to generate sasldb2"; * The die message: * Failed to generate sasldb2 * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/log/portage/dev-libs:cyrus-sasl-2.1.23:20090721-081803.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-libs/cyrus-sasl-2.1.23/temp/environment'. * !!! When you file a bug report, please include the following information: GENTOO_VM=sun-jdk-1.6 CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.6.0.14" JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="" and of course, the output of emerge --info !!! FAILED postinst: 1 >>> Failed to install dev-libs/cyrus-sasl-2.1.23, Log file: >>> '/var/log/portage/dev-libs:cyrus-sasl-2.1.23:20090721-081803.log' * Messages for package dev-libs/cyrus-sasl-2.1.23: * * ERROR: dev-libs/cyrus-sasl-2.1.23 failed. * Call stack: * ebuild.sh, line 49: Called pkg_postinst * environment, line 4682: Called die * The specific snippet of code: * echo "p" | "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -p login || die "Failed to generate sasldb2"; * The die message: * Failed to generate sasldb2 * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/log/portage/dev-libs:cyrus-sasl-2.1.23:20090721-081803.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-libs/cyrus-sasl-2.1.23/temp/environment'. *
I just fixed it by re-running `eselect postgresql set 8.4`, though I *STRONGLY* recommend the following change be made in portage. The current version just happens to work since everything is already in PREFIX. --- cyrus-sasl-2.1.23-r1.ebuild.old 2010-01-18 19:22:37.281253814 -0600 +++ cyrus-sasl-2.1.23-r1.ebuild 2010-01-18 19:22:46.511251577 -0600 @@ -140,7 +140,7 @@ $(use_enable java) \ $(use_with java javahome ${JAVA_HOME}) \ $(use_with mysql) \ - $(use_with postgres pgsql $(pg_config --libdir)) \ + $(use_with postgres pgsql) \ $(use_with sqlite) \ $(use_enable srp) \ ${myconf} || die "econf failed"
I should note that the --with-pgsql option is used for both headers and libraries.
Created attachment 220551 [details] /var/tmp/portage/dev-libs/cyrus-sasl-2.1.23-r1/temp/build.log Another versions, but the same error text
*** Bug 339271 has been marked as a duplicate of this bug. ***
+*cyrus-sasl-2.1.23-r3 (08 May 2011) + + 08 May 2011; Eray Aslan <eras@gentoo.org> + +files/cyrus-sasl-0001_versioned_symbols.patch, +cyrus-sasl-2.1.23-r3.ebuild, + +files/cyrus-sasl-0002_testsuite.patch, + +files/cyrus-sasl-0006_library_mutexes.patch, + +files/cyrus-sasl-0008_one_time_sasl_set_alloc.patch, + +files/cyrus-sasl-0010_maintainer_mode.patch, + +files/cyrus-sasl-0011_saslauthd_ac_prog_libtool.patch, + +files/cyrus-sasl-0012_xopen_crypt_prototype.patch, + +files/cyrus-sasl-0014_avoid_pic_overwrite.patch, + +files/cyrus-sasl-0016_pid_file_lock_creation_mask.patch, + +files/cyrus-sasl-0026_drop_krb5support_dependency.patch: + Drop sqlite USE flag bug #245072. Drop pg_config from configure script bug + #296391. Cherry pick and add debian patches. EAPI bump. +