Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 363557 - net-analyzer/snort-2.9.0.5 fails to configure, because postgresql header are not found
Summary: net-analyzer/snort-2.9.0.5 fails to configure, because postgresql header are ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-14 07:48 UTC by Juergen Rose
Modified: 2011-04-16 10:19 UTC (History)
2 users (show)

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


Attachments
/var/tmp/portage/net-analyzer/snort-2.9.0.5/work/snort-2.9.0.5/config.log (config.log,94.32 KB, text/plain)
2011-04-14 07:49 UTC, Juergen Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2011-04-14 07:48:13 UTC
'emerge snort' fails with:
...
checking for mysql setting of reconnect option before connect bug... no
checking "for odbc"... yes
checking for postgresql... 

**********************************************
  ERROR: unable to find postgresql header file (libpq-fe.h)
  checked in the following places
        /usr/include
        /usr/include/pgsql
        /usr/local/include
        /usr/local/include/pgsql
        /usr/local/pgsql/include
        /usr/local/pgsql/include/pgsql
        /usr/pgsql/include
        /usr/pgsql/include/pgsql
        /usr/local/include
        /usr/local/include/pgsql
**********************************************


!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/net-analyzer/snort-2.9.0.5/work/snort-2.9.0.5/config.log
 * ERROR: net-analyzer/snort-2.9.0.5 failed (configure phase):
 *   econf failed


Reproducible: Always




I can find the missed file libpq-fe.h at:
root@grizzly:/root(23)# find /usr/include -name libpq-fe.h
/usr/include/postgresql-9.0/libpq-fe.h

root@grizzly:/usr/src/linux(21)# eselect postgresql list
Available PostgreSQL Slots
  8.3                       
  9.0 *                      server-9.0.3-r3 base-9.0.3-r1 docs-9.0.3-r1


root@grizzly:/root(24)# emerge --info =net-analyzer/snort-2.9.0.5
Portage 2.1.9.45 (default/linux/amd64/10.0/desktop, gcc-4.5.2, glibc-2.13-r2, 2.6.37-gentoo-r4 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.37-gentoo-r4-x86_64-AMD_Athlon-tm-_64_Processor_3200+-with-gentoo-2.0.2
Timestamp of tree: Thu, 14 Apr 2011 02:00:01 +0000
app-shells/bash:     4.2_p8
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.1
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.38 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula googleearth AdobeFlash-10.1 cadsoft"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.2/ext-active/ /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.2/ext-active/ /etc/php/cli-php5.3/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"
CXXFLAGS="-O2 -march=k8"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=k8"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo ftp://ftp.easynet.nl/mirror/gentoo/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de fr"
MAKEOPTS="-j1"
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="/var/lib/layman/java-overlay /var/lib/layman/lordvan /var/lib/layman/science /var/lib/layman/x11 /var/lib/layman/sunrise /var/lib/layman/arcon /usr/local/portage /var/lib/cpan /var/lib/g-octave"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 64bit R X Xaw3d a52 aac abiword acl acpi admin afs alsa amd64 ao apache2 applet archive arpack asf aspell assistant audacious audiofile automap automount bash-completion beagle berkdb blas blast bluetooth boo boost branding bzip2 cairo cdda cddb cdf cdio cdparanoia cdr cgi chm cli consolekit corba cracklib crypt css cups curl cxx daap db dbase dbi dbm dbus declarative designer devhelp device-mapper dga dia djvu doc dri ds2490 ds9097 ds9097u dts dv dvb dvd dvdr dvi dynamicplugin eds elf emacs emboss emf empathy encode epiphany evo examples exif expat extensions extra extras fam fame ffmpeg fftw firefox fits flac fltk fontconfig foomaticdb fortran fortran95 fpx fts3 fuse galago garmin gd gdal gdbm gdu gedit geoip geolocation geos gfortran gif gimp ginac git glade glib gml gmp gmtsuppl gnokii gnome gnome-keyring gnome-print gnuplot gnutls gphoto2 gpm grammar graphics graphtft graphviz grass gs gsl gsm gstreamer gtk guile harness hddtemp hdf hdf5 hdri http httpd iconv icq icu id3 ide imagemagick imap innodb inotify ipod ipv6 irda ithreads jabber jadetex java java6 jbig john jpeg jpeg2k kde kdrive kerberos kpathsea ladspa lame lapack latex latex3 lcms ldap lensfun libffi libgda libnotify libsamplerate lirc lm_sensors lua lzo mad mail maildir mapnik math matroska mikmod mkl mmx mmxext mng modules mono moonlight motif mozilla mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networking networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numpy obex objc ocaml octave odbc ogdi ogg ole openexr opengl openmp overview pae pam pango pcre pda pdf perl plotutils plugins png podcast policykit posix postgres postscript ppds pppd preview-latex proj projectx pstricks pulseaudio pymol python python-bindings q16 q32 qemu qhull qt3support qt4 quicktime readline reiserfs reports rle romio rpc rrdcgi rrdtool samba sasl science sdk sdl secure-delete semantic-desktop server session sip slang slp smbclient sms sndfile snmp soup sox speex spell sql sqlite sse sse2 ssl startup-notification stlport subtitles subversion suexec svg svm swig sysfs szip t1lib tcl tcpd tex tex4ht texmacs tgif theora threads thunderbird tidy tiff tk tntc tools truetype udev unicode usb userlocales utempter v4l2 video virtualbox vorbis wav webdav webdav-serf webkit wmf wxwidgets x264 xattr xcb xemacs xext xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc yaml zlib zvbi" ALSA_CARDS="intel8x0" 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 cgid 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 so speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="tda10046 saa7134" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" LIRC_DEVICES="hauppauge_dvb" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy gsf harness ide identity j2ee java mobility nb php profiler ruby websvccommon xml" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 ppc ppc64 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon ati vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



root@grizzly:/root(25)# emerge -pqv =net-analyzer/snort-2.9.0.5
[ebuild     U ] net-analyzer/snort-2.9.0.5 [2.9.0.4-r1] USE="decoder-preprocessor-rules dynamicplugin ipv6 mysql odbc postgres threads zlib -active-response -aruba -debug -flexresp3 -gre -inline-init-failopen -linux-smp-stats -mpls -normalizer -perfprofiling -ppm -prelude -react -reload-error-restart (-selinux) -static -targetbased"
Comment 1 Juergen Rose 2011-04-14 07:49:36 UTC
Created attachment 269903 [details]
/var/tmp/portage/net-analyzer/snort-2.9.0.5/work/snort-2.9.0.5/config.log
Comment 2 Aaron W. Swenson gentoo-dev 2011-04-14 11:10:59 UTC
Run:
    eselect postgresql update

libpq-fe.h is explicitly managed by the module.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2011-04-14 14:20:25 UTC
This sort of issue keeps coming up with eselect/postgresql, so CCing postgresql maintainers.
Comment 4 Jason Wallace 2011-04-14 15:14:59 UTC
Did 'eselect postgresql update' solve your problem? I'm trying to determine if I need to start digging into the snort ebuild or if this is truly an eselect/postgresql issue.
Comment 5 Juergen Rose 2011-04-15 16:17:55 UTC
I have just now no access to to computer from my last posting (grizzly). On a second computer (lynx) I have the same problem. I tried 'eselect postgresql update', but I got an error and 'emerge snort' fails as before:

checking "for odbc"... yes
checking for postgresql... 

**********************************************
  ERROR: unable to find postgresql header file (libpq-fe.h)
  checked in the following places
        /usr/include
        /usr/include/pgsql
        /usr/local/include
        /usr/local/include/pgsql
        /usr/local/pgsql/include
        /usr/local/pgsql/include/pgsql
        /usr/pgsql/include
        /usr/pgsql/include/pgsql
        /usr/local/include
        /usr/local/include/pgsql
**********************************************


!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/net-analyzer/snort-2.9.0.5/work/snort-2.9.0.5/config.log
 * ERROR: net-analyzer/snort-2.9.0.5 failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_configure
 *   environment, line 2899:  Called econf '--enable-shared' '--disable-static' '--enable-dynamicplugin' '--enable-ipv6' '--enable-zlib' '--disable-gre' '--disable-mpls' '--disable-targetbased' '--enable-decoder-preprocessor-rules' '--disable-ppm' '--disable-perfprofiling' '--disable-linux-smp-stats' '--disable-inline-init-failopen' '--disable-prelude' '--enable-pthread' '--disable-debug' '--disable-debug-msgs' '--disable-corefiles' '--enable-dlclose' '--disable-active-response' '--disable-normalizer' '--disable-reload-error-restart' '--disable-react' '--disable-flexresp3' '--disable-aruba' '--with-mysql' '--with-odbc' '--with-postgresql' '--enable-reload' '--disable-build-dynamic-examples' '--disable-profile' '--disable-ppm-test' '--disable-intel-soft-cpm' '--disable-static-daq' '--disable-rzb-saac' '--without-oracle'
 *     ebuild.sh, line  557:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 * 
 * If you need support, post the output of 'emerge --info =net-analyzer/snort-2.9.0.5',
 * the complete build log and the output of 'emerge -pqv =net-analyzer/snort-2.9.0.5'.
 * The complete build log is located at '/var/tmp/portage/net-analyzer/snort-2.9.0.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/snort-2.9.0.5/temp/environment'.
 * S: '/var/tmp/portage/net-analyzer/snort-2.9.0.5/work/snort-2.9.0.5'

>>> Failed to emerge net-analyzer/snort-2.9.0.5, Log file:

>>>  '/var/tmp/portage/net-analyzer/snort-2.9.0.5/temp/build.log'
root@lynx:/root(4)# eselect postgresql list
Available PostgreSQL Slots
  8.4                       
  9.0 *                      server-9.0.3-r4 base-9.0.3-r1 docs-9.0.3-r1
root@lynx:/root(5)# eselect postgresql update
Setting 9.0 as the default installation...
        Removing old links...!!! Error: The target '/usr/lib64/postgresql' still exists and could not be removed!
exiting
root@lynx:/root(6)# eselect postgresql list
Available PostgreSQL Slots
  8.4                       
  9.0 *                      server-9.0.3-r4 base-9.0.3-r1 docs-9.0.3-r1
root@lynx:/root(7)# eselect postgresql update
Setting 9.0 as the default installation...
        Removing old links...!!! Error: The target '/usr/lib64/postgresql' still exists and could not be removed!
exiting
root@lynx:/root(8)# /etc/init.d/postgresql-9.0 status
 * Reloading PostgreSQL configuration ...
pg_ctl: server is running (PID: 4196)
/usr/lib64/postgresql-9.0/bin/postgres "-D" "/var/lib/postgresql/9.0/data" "-D" "/etc/postgresql-9.0/" "--data-directory=/var/lib/postgresql/9.0/data" "--silent-mode=true"                                                                                                                                                             [ ok ]
root@lynx:/root(9)# /etc/init.d/postgresql-9.0 stop
 * Stopping PostgreSQL (this can take up to 92 seconds) ...                                                                                                      [ ok ]
root@lynx:/root(10)# eselect postgresql update
Setting 9.0 as the default installation...
        Removing old links...!!! Error: The target '/usr/lib64/postgresql' still exists and could not be removed!
exiting
root@lynx:/root(11)# emerge -vuND world
...
checking for postgresql... 

**********************************************
  ERROR: unable to find postgresql header file (libpq-fe.h)
  checked in the following places
        /usr/include
        /usr/include/pgsql
        /usr/local/include
        /usr/local/include/pgsql
        /usr/local/pgsql/include
        /usr/local/pgsql/include/pgsql
        /usr/pgsql/include
        /usr/pgsql/include/pgsql
        /usr/local/include
        /usr/local/include/pgsql
**********************************************


!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/net-analyzer/snort-2.9.0.5/work/snort-2.9.0.5/config.log
Comment 6 Juergen Rose 2011-04-15 16:19:45 UTC
Still some information:
root@lynx:/root(12)# eselect postgresql update
Setting 9.0 as the default installation...
        Removing old links...!!! Error: The target '/usr/lib64/postgresql' still exists and could not be removed!
exiting
root@lynx:/root(13)# ll /usr/lib64/postgresql
total 0
lrwxrwxrwx 1 root root 31 Apr 12 16:38 lib64 -> /usr/lib64/postgresql-9.0/lib64/
root@lynx:/root(14)# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video),1217(tuntap)
root@lynx:/root(15)# qlist -Iv eselect
app-admin/eselect-1.2.15
...
app-admin/eselect-postgresql-1.0.6
...
Comment 7 Aaron W. Swenson gentoo-dev 2011-04-15 21:30:49 UTC
Error: The target '/usr/lib64/postgresql' still exists and could not be removed!

That's a hint there. You have to take care of that manually. It's up to you to see if it's safe to remove that directory, and, if it is, remove it.
Comment 8 Juergen Rose 2011-04-16 09:59:50 UTC
On some of my computers /usr/lib/postgresql is a directory containing one link lib64:

root@lynx:/root(5)# ll -d /usr/lib/postgresql
drwxr-xr-x 2 root root 4096 Apr 12 16:38 /usr/lib/postgresql/
root@lynx:/root(6)# ll /usr/lib/postgresql/
total 0
lrwxrwxrwx 1 root root 31 Apr 12 16:38 lib64 -> /usr/lib64/postgresql-9.0/lib64/

on the other computers /usr/lib/postgresql is a link to /usr/lib/postgresql-9.0/lib/>

root@caiman:/root(2)# ll -d /usr/lib/postgresql
lrwxrwxrwx 1 root root 31 Apr 14 08:32 /usr/lib/postgresql -> /usr/lib64/postgresql-9.0/lib64/

If I remove the link inside the /usr/lib/postgresql directory and the /usr/lib/postgresql directory, 'eselect postgresql update' fails with:

root@lynx:/root(9)# eselect postgresql update
Setting 9.0 as the default installation...
        Removing old links...!!! Error: The target '/usr/share/postgresql' still exists and could not be removed!
exiting

/usr/share/postgresql is again a directory containing one subdirectory /usr/share/postgresql/contrib and a link /usr/share/postgresql/postgresql-9.0

root@lynx:/root(10)# ll -d /usr/share/postgresql
drwxr-xr-x 3 root root 4096 Apr 12 16:38 /usr/share/postgresql/
root@lynx:/root(11)# ll -d /usr/share/postgresql/*
drwxr-xr-x 2 root root 4096 Feb 25  2010 /usr/share/postgresql/contrib/
lrwxrwxrwx 1 root root   25 Apr 12 16:38 /usr/share/postgresql/postgresql-9.0 -> /usr/share/postgresql-9.0/

I recursively removed /usr/share/postgresql, and tried once more 'eselect postgresql update':

root@lynx:/root(12)# rm -r /usr/share/postgresql
root@lynx:/root(13)# eselect postgresql update
Setting 9.0 as the default installation...
        Removing old links...done.
        Generating new links...done.
Setting 9.0 as default was successful!

Cleaning out old links before refreshing...done.
Refreshing symbolic links for 9.0 applications (like /usr/bin/psql90)...done.
Refreshing symbolic links for 8.4 applications (like /usr/bin/psql84)...find: `/usr/lib64/postgresql-8.4/bin': No such file or directory
done.
root@lynx:/root(14)# eselect postgresql list
Available PostgreSQL Slots
  8.4                       
  9.0 *                      server-9.0.3-r4 base-9.0.3-r1 docs-9.0.3-r1

Why 'eselect postgresql list' offers to select 8.4? postgresql-*-8.4 is not installed:
root@lynx:/root(16)# qlist -Iv postgresql 
app-admin/eselect-postgresql-1.0.6
dev-db/postgresql-base-9.0.3-r1
dev-db/postgresql-docs-9.0.3-r1
dev-db/postgresql-server-9.0.3-r4
dev-java/jdbc-postgresql-9.0_p801

There is still an almost empty /usr/lib/postgresql-8.4 directory:
root@lynx:/root(22)# ll /usr/lib/postgresql-8.4/
total 4
drwxr-xr-x 2 root root 4096 Sep 29  2010 lib64/
root@lynx:/root(23)# ll /usr/lib/postgresql-8.4/lib64/
total 56
-rw-r--r-- 1 root root  9270 Oct 23  2009 slon-tools.pm
-rwxr-xr-x 1 root root 26720 Oct 23  2009 slony1_funcs.so*
-rwxr-xr-x 1 root root 14216 Oct 23  2009 xxid.so*


After removing the /usr/lib/postgresql-8.4 directory and reinstalling postgresql-*-9 'eselect list update' does not complain any more and I also could install snort.
Comment 9 Aaron W. Swenson gentoo-dev 2011-04-16 10:19:50 UTC
Because you have a system that wasn't cleaned up properly from the old dev-db/{postgresql,libpq} ebuilds most likely.

The way that the module determines which slots are available is by looking for key directories being in place. And the way the module is used in the ebuilds causes false positives when checking for versions using alternative methods. It isn't foolproof, and most likely never will be. (I won't write it to check for the existence of every single file and executable that a package should contain.)