Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37436 - Snort 2.1 fails to find postgresql headers with USE postgresql
Summary: Snort 2.1 fails to find postgresql headers with USE postgresql
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Michael Boman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-06 17:14 UTC by aent
Modified: 2007-09-22 23:14 UTC (History)
3 users (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 aent 2004-01-06 17:14:09 UTC
Fails on configure...

[ebuild     U ] net-analyzer/snort-2.1.0 [2.0.6] +ssl +postgres +mysql -flexresp

checking for compress in -lz... yes
checking for postgresql...
 
**********************************************
  ERROR: unable to find postgresql header file (libpq-fe.h)
  checked in the following places
**********************************************
 
make: *** No targets specified and no makefile found.  Stop.
 
!!! ERROR: net-analyzer/snort-2.1.0 failed.
!!! Function src_compile, Line 82, Exitcode 2
!!! compile problem


I checked and I do infact have this lib its looking for, here:
/usr/include/postgresql/pgsql/libpq-fe.h


Reproducible: Always
Steps to Reproduce:
1. USE="postgres" emerge snort
2.
3.

Actual Results:  
Compile failed

Expected Results:  
Snort should find the postgreSQL libs and compile/install properly

Portage 2.0.49-r20 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0,
2.6.0-gentoo-r1)
=================================================================
System uname: 2.6.0-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.26GHz
Gentoo Base System version 1.4.3.12
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer -fforce-addr
-funroll-loops -frerun-loop-opt -frerun-cse-after-loop -falign-functions=4
-fexpensive-optimizations"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /opt/resin/conf /opt/tomcat/conf /usr/X11R6/lib/X11/xkb
/usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer -fforce-addr
-funroll-loops -frerun-loop-opt -frerun-cse-after-loop -falign-functions=4
-fexpensive-optimizations"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/ http://gentoo.noved.org/
ftp://gentoo.mirrors.pair.com ftp://ftp.uesb.edu/pub/mirrors/linux/gentoo
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib accessiblity acl acpi alsa apache2 apm arts avi berkdb bonobo cdr
crypt cups curl dga directfb doc dvb dvd encode esd evo faad fbcon firebird flac
flash foomaticdb freetds gd gd-external gdbm gif gnome gnomedb gpm gstreamer gtk
gtk2 gtkhtml guile imagemagick imap imlib informix innodb jack java jikes
joystick jpeg kde ladcca lcms ldap libg++ libgda libwww lirc mad mcal mikmod mmx
motif mozcalendar mozilla mozp3p mozsvg mozxmlterm mpeg mysql nas ncurses netcdf
nls odbc oggvorbis opengl oss pam pdflib perl plotutils png pnp postgres python
qt quicktime readline ruby samba sasl scanner sdl slang spell sqlite sse ssl
svga tcltk tcpd tetex tiff truetype unicode usb wmf wxwindows x86 xine xinerama
xml xml2 xmms xosd xv zlib"
Comment 1 Michael Boman (RETIRED) gentoo-dev 2004-01-06 18:30:39 UTC
Hmm.. I can't reproduce this at first sight, but damn if I can't figure this bug out.

I noticed that you only seem to find one instance of "libpq-fe.h", but when I searched my system I find two:

/usr/include/libpq-fe.h
/usr/include/postgresql/pgsql/libpq-fe.h

And as you can see with:

$ qpkg -v -nc -f /usr/include/libpq-fe.h
dev-db/postgresql-7.3.4-r1

and

$ qpkg -v -nc -f /usr/include/postgresql/pgsql/libpq-fe.h
dev-db/postgresql-7.3.4-r1

they are both installed by the same package.

Could you repeat the above mentioned qpkg commands and paste the result here?
Comment 2 aent 2004-01-06 18:49:46 UTC
# qpkg -v -nc -f /usr/include/libpq-fe.h
# qpkg -v -nc -f /usr/include/postgresql/pgsql/libpq-fe.hdev-db/postgresql-7.4.1-r1

Should I attempt to re-emerge postgresql to see if it will get the 2nd copy of the file?
Comment 3 Michael Boman (RETIRED) gentoo-dev 2004-01-06 21:23:26 UTC
Yes, please do. Something seems broken with your postgresql installation...

But before you bring out the axe and re-install postgresql try to run:

$ qpkg --check --verbose -nc dev-db/postgresql

and see if it spits out any errors.. I highly suspected a borken postgresql installation here, but what would be interesting is what broke it?
Comment 4 aent 2004-01-07 17:46:57 UTC
# qpkg --check --verbose -nc dev-db/postgresql
dev-db/postgresql-7.4.1-r1
0/1720

Just re-emerged it too and I still don't have the second copy of that lib...
Comment 5 Michael Boman (RETIRED) gentoo-dev 2004-01-08 01:48:59 UTC
Ok.. I know of a work-around for this issue, but it seems there is a problem how postgresql is installed on your box. I'll attach a diff with the work-around to this ticket, but we really should talk with the postgresql guys about why your postgresql installation is different from mine ;)

Give me a few minutes to produce the said patch.
Comment 6 Michael Boman (RETIRED) gentoo-dev 2004-01-08 04:48:28 UTC
Sorry, no patch for you to download. Try out the 2.1.0-r1 release and feedback. I still would prefer the pgsql guys explain why they moved the include directory... I am sure that it's more then snort that will break...

Anyway, snort-2.1.0-r1 should hit the mirrors in about 30 minutes or so.
Comment 7 aent 2004-01-08 13:02:47 UTC
Yeah, I just tested on my other box and the 2nd copy of the libs were removed between dev-db/postgresql-7.4.1 and dev-db/postgresql-7.4.1-r1... anyways, snort-2.1.0-r1 does infact work fine for me :)
Comment 8 Michael Boman (RETIRED) gentoo-dev 2004-01-08 22:26:27 UTC
Yes, I came to the same conclusion about when (which version) pgsql broke snort. It's actually a side effect from bug #37436 (PostgreSQL and unixODBC installs sqltypes.h into the same place).

Now the question is: Are we the only distribution that place the pgsql headers where they are now? If we are we will need to keep the work-around alive our self, but if we are not the patch should get moved upstream.

I'll close the bug, as the issue at hand is "fixed", while I stick these question on my own ToDo/ToResearch list..
Comment 9 N Addy 2004-01-13 20:23:51 UTC
For what it is worth, I have the same issue with the xemacs ebuild.  This seems to affect more than just snort.

<snip>
checking for LDAP
checking for PostgreSQL
checking for libpq-fe.h... no
checking for pgsql/libpq-fe.h... no
checking for postgresql/libpq-fe.h... no
Error: Required PostgreSQL support cannot be provided.  Check --site-prefixes.
 
!!! ERROR: app-editors/xemacs-21.4.12 failed.
!!! Function src_compile, Line 166, Exitcode 1
!!! (no error message)

Like the other poster, libpq-fe.h does exist:

# find /usr/include -name libpq-fe.h
/usr/include/postgresql/pgsql/libpq-fe.h

qpkg shows the following:
# qpkg --check --verbose -nc dev-db/postgresql
dev-db/postgresql-7.4.1-r1
/etc/conf.d/postgresql !md5!
1/882