Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99128 - nagios-core-1.2-r2 does not build with USE=postgres
Summary: nagios-core-1.2-r2 does not build with USE=postgres
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-15 10:14 UTC by k_berbach
Modified: 2005-10-15 15:05 UTC (History)
0 users

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 k_berbach 2005-07-15 10:14:27 UTC
# USE=postgres emerge -v nagios-core  
... 
gcc -O2 -march=pentium3 -mmmx -msse -mfpmath=sse -fomit-frame-pointer 
-fforce-addr -pipe -DHAVE_CONFIG_H -DNSCORE   -c -o perfdata.o perfdata.c 
gcc -O2 -march=pentium3 -mmmx -msse -mfpmath=sse -fomit-frame-pointer 
-fforce-addr -pipe -DHAVE_CONFIG_H -DNSCORE -lpq  nagios.c checks.o config.o 
commands.o flapping.o logging.o notifications.o sehandlers.o utils.o 
sretention.o ../xdata/xrddb.c ../common/comments.c ../xdata/xcddb.c ../common/objects.c ../xdata/xodtemplate.c ../common/statusdata.c ../xdata/xsddb.c 
perfdata.o ../xdata/xpddefault.c ../common/downtime.c ../xdata/xdddb.c    -lm 
-o nagios 
../xdata/xrddb.c:46:28: pgsql/libpq-fe.h: No such file or directory 
../xdata/xrddb.c:63: error: parse error before '*' token 
../xdata/xrddb.c:63: warning: data definition has no type or storage class 
../xdata/xrddb.c:64: error: parse error before '*' token 
../xdata/xrddb.c:64: warning: data definition has no type or storage class 
../xdata/xrddb.c: In function `xrddb_connect': 
../xdata/xrddb.c:268: warning: assignment makes pointer from integer without a 
cast 
../xdata/xrddb.c:270: error: `CONNECTION_BAD' undeclared (first use in this 
function) 
../xdata/xrddb.c:270: error: (Each undeclared identifier is reported only once 
../xdata/xrddb.c:270: error: for each function it appears in.) 
../xdata/xrddb.c: In function `xrddb_disconnect': 
../xdata/xrddb.c:304: error: `CONNECTION_BAD' undeclared (first use in this 
function) 
../xdata/xrddb.c: In function `xrddb_query': 
../xdata/xrddb.c:334: warning: assignment makes pointer from integer without a 
cast 
../xdata/xrddb.c:335: error: `PGRES_FATAL_ERROR' undeclared (first use in this 
function) 
../xdata/xrddb.c:335: error: `PGRES_BAD_RESPONSE' undeclared (first use in 
this function) 
../xdata/xrddb.c: In function `xrddb_read_program_information': 
../xdata/xrddb.c:876: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:877: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:878: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:879: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:880: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:881: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:882: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:883: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c: In function `xrddb_read_host_information': 
../xdata/xrddb.c:1016: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1019: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1022: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1025: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1026: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1027: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1030: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1033: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1036: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1039: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1042: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1045: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1048: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1051: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1054: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1057: warning: passing arg 1 of `set_host_state_information' 
makes pointer from integer without a cast 
../xdata/xrddb.c:1057: warning: passing arg 3 of `set_host_state_information' 
makes pointer from integer without a cast 
../xdata/xrddb.c: In function `xrddb_read_service_information': 
../xdata/xrddb.c:1207: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1214: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1217: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1220: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1221: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1222: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1223: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1226: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1229: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1232: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1235: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1238: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1241: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1244: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1247: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1250: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1253: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1256: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1259: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xrddb.c:1262: warning: passing arg 1 of 
`set_service_state_information' makes pointer from integer without a cast 
../xdata/xrddb.c:1262: warning: passing arg 2 of 
`set_service_state_information' makes pointer from integer without a cast 
../xdata/xrddb.c:1262: warning: passing arg 4 of 
`set_service_state_information' makes pointer from integer without a cast 
../xdata/xcddb.c:54:28: pgsql/libpq-fe.h: No such file or directory 
../xdata/xcddb.c:70: error: parse error before '*' token 
../xdata/xcddb.c:70: warning: data definition has no type or storage class 
../xdata/xcddb.c:71: error: parse error before '*' token 
../xdata/xcddb.c:71: warning: data definition has no type or storage class 
../xdata/xcddb.c: In function `xcddb_connect': 
../xdata/xcddb.c:278: warning: assignment makes pointer from integer without a 
cast 
../xdata/xcddb.c:280: error: `CONNECTION_BAD' undeclared (first use in this 
function) 
../xdata/xcddb.c:280: error: (Each undeclared identifier is reported only once 
../xdata/xcddb.c:280: error: for each function it appears in.) 
../xdata/xcddb.c: In function `xcddb_disconnect': 
../xdata/xcddb.c:308: error: `CONNECTION_BAD' undeclared (first use in this 
function) 
../xdata/xcddb.c: In function `xcddb_query': 
../xdata/xcddb.c:334: warning: assignment makes pointer from integer without a 
cast 
../xdata/xcddb.c:335: error: `PGRES_FATAL_ERROR' undeclared (first use in this 
function) 
../xdata/xcddb.c:335: error: `PGRES_BAD_RESPONSE' undeclared (first use in 
this function) 
../xdata/xcddb.c: In function `xcddb_validate_host_comments': 
../xdata/xcddb.c:508: warning: passing arg 1 of `find_host' makes pointer from 
integer without a cast 
../xdata/xcddb.c:512: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xcddb.c: In function `xcddb_validate_service_comments': 
../xdata/xcddb.c:597: warning: passing arg 1 of `find_service' makes pointer 
from integer without a cast 
../xdata/xcddb.c:597: warning: passing arg 2 of `find_service' makes pointer 
from integer without a cast 
../xdata/xcddb.c:601: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xcddb.c: In function `xcddb_save_host_comment': 
../xdata/xcddb.c:761: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xcddb.c: In function `xcddb_save_service_comment': 
../xdata/xcddb.c:860: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xsddb.c:51:28: pgsql/libpq-fe.h: No such file or directory 
../xdata/xsddb.c:66: error: parse error before '*' token 
../xdata/xsddb.c:66: warning: data definition has no type or storage class 
../xdata/xsddb.c:67: error: parse error before '*' token 
../xdata/xsddb.c:67: warning: data definition has no type or storage class 
../xdata/xsddb.c: In function `xsddb_connect': 
../xdata/xsddb.c:307: warning: assignment makes pointer from integer without a 
cast 
../xdata/xsddb.c:309: error: `CONNECTION_BAD' undeclared (first use in this 
function) 
../xdata/xsddb.c:309: error: (Each undeclared identifier is reported only once 
../xdata/xsddb.c:309: error: for each function it appears in.) 
../xdata/xsddb.c: In function `xsddb_disconnect': 
../xdata/xsddb.c:340: error: `CONNECTION_BAD' undeclared (first use in this 
function) 
../xdata/xsddb.c: In function `xsddb_check_connection': 
../xdata/xsddb.c:378: error: `CONNECTION_BAD' undeclared (first use in this 
function) 
../xdata/xsddb.c: In function `xsddb_query': 
../xdata/xsddb.c:468: warning: assignment makes pointer from integer without a 
cast 
../xdata/xsddb.c:469: error: `PGRES_FATAL_ERROR' undeclared (first use in this 
function) 
../xdata/xsddb.c:469: error: `PGRES_BAD_RESPONSE' undeclared (first use in 
this function) 
../xdata/xdddb.c:54:28: pgsql/libpq-fe.h: No such file or directory 
../xdata/xdddb.c:70: error: parse error before '*' token 
../xdata/xdddb.c:70: warning: data definition has no type or storage class 
../xdata/xdddb.c:71: error: parse error before '*' token 
../xdata/xdddb.c:71: warning: data definition has no type or storage class 
../xdata/xdddb.c: In function `xdddb_connect': 
../xdata/xdddb.c:278: warning: assignment makes pointer from integer without a 
cast 
../xdata/xdddb.c:280: error: `CONNECTION_BAD' undeclared (first use in this 
function) 
../xdata/xdddb.c:280: error: (Each undeclared identifier is reported only once 
../xdata/xdddb.c:280: error: for each function it appears in.) 
../xdata/xdddb.c: In function `xdddb_disconnect': 
../xdata/xdddb.c:308: error: `CONNECTION_BAD' undeclared (first use in this 
function) 
../xdata/xdddb.c: In function `xdddb_query': 
../xdata/xdddb.c:334: warning: assignment makes pointer from integer without a 
cast 
../xdata/xdddb.c:335: error: `PGRES_FATAL_ERROR' undeclared (first use in this 
function) 
../xdata/xdddb.c:335: error: `PGRES_BAD_RESPONSE' undeclared (first use in 
this function) 
../xdata/xdddb.c: In function `xdddb_validate_host_downtime': 
../xdata/xdddb.c:513: warning: passing arg 1 of `find_host' makes pointer from 
integer without a cast 
../xdata/xdddb.c:517: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xdddb.c:522: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xdddb.c:526: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xdddb.c: In function `xdddb_validate_service_downtime': 
../xdata/xdddb.c:627: warning: passing arg 1 of `find_service' makes pointer 
from integer without a cast 
../xdata/xdddb.c:627: warning: passing arg 2 of `find_service' makes pointer 
from integer without a cast 
../xdata/xdddb.c:631: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xdddb.c:636: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xdddb.c:640: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xdddb.c: In function `xdddb_save_host_downtime': 
../xdata/xdddb.c:801: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xdddb.c: In function `xdddb_save_service_downtime': 
../xdata/xdddb.c:900: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xdddb.c: In function `xdddb_read_host_downtime': 
../xdata/xdddb.c:1161: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1164: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1167: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1170: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1173: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1176: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1179: warning: passing arg 1 of `add_host_downtime' makes 
pointer from integer without a cast 
../xdata/xdddb.c:1179: warning: passing arg 3 of `add_host_downtime' makes 
pointer from integer without a cast 
../xdata/xdddb.c:1179: warning: passing arg 4 of `add_host_downtime' makes 
pointer from integer without a cast 
../xdata/xdddb.c: In function `xdddb_read_service_downtime': 
../xdata/xdddb.c:1292: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1295: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1298: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1301: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1304: warning: passing arg 1 of `atoi' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1307: warning: passing arg 1 of `strtoul' makes pointer from 
integer without a cast 
../xdata/xdddb.c:1310: warning: passing arg 1 of `add_service_downtime' makes 
pointer from integer without a cast 
../xdata/xdddb.c:1310: warning: passing arg 2 of `add_service_downtime' makes 
pointer from integer without a cast 
../xdata/xdddb.c:1310: warning: passing arg 4 of `add_service_downtime' makes 
pointer from integer without a cast 
../xdata/xdddb.c:1310: warning: passing arg 5 of `add_service_downtime' makes 
pointer from integer without a cast 
make[1]: *** [nagios] Error 1 
make[1]: Leaving directory 
`/home/gentoo/build/portage/nagios-core-1.2-r2/work/nagios-1.2/base' 
make: *** [nagios] Error 2 
 
!!! ERROR: net-analyzer/nagios-core-1.2-r2 failed. 
!!! Function src_compile, Line 109, Exitcode 2 
!!! make failed 
!!! If you need support, post the topmost build error, NOT this status 
message. 
 
#  

Reproducible: Always
Steps to Reproduce:
1. emerge -v nagios-core  
2. 
3. 
 
Actual Results:  
build failed 

Expected Results:  
finishing build 

"USE=-postgres emerge -v nagios-core" and nagios-core builds, but at the end   
of the day not what is desired.   
Postgres is: postgresql-8.0.1-r4  
 
------------- 
 
# emerge --info 
Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.3, 
glibc-2.3.4.20041102-r1, 2.6.11.11 i686) 
================================================================= 
System uname: 2.6.11.11 i686 Pentium III (Coppermine) 
Gentoo Base System version 1.6.12 
dev-lang/python:     2.3.5 
sys-apps/sandbox:    1.2.10 
sys-devel/autoconf:  2.13, 2.59-r6 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 
sys-devel/binutils:  2.15.92.0.2-r10 
sys-devel/libtool:   1.5.18-r1 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CBUILD="i686-pc-linux-gnu" 
CFLAGS="-O2 -march=pentium3 -mmmx -msse -mfpmath=sse -fomit-frame-pointer 
-fforce-addr -pipe" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /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/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O2 -march=pentium3 -mmmx -msse -mfpmath=sse -fomit-frame-pointer 
-fforce-addr -pipe" 
DISTDIR="/home/gentoo/distfiles" 
FEATURES="autoconfig distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ 
ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ 
http://ftp.du.se/pub/os/gentoo http://ftp.lug.ro/gentoo/" 
LINGUAS="de nds en_GB tr" 
MAKEOPTS="-j1" 
PKGDIR="/home/gentoo/packages" 
PORTAGE_TMPDIR="/home/gentoo/build" 
PORTDIR="/home/gentoo/portage" 
PORTDIR_OVERLAY="/home/gentoo/local" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="X X509 aac aalib alsa apm audiofile bidi bitmap-fonts bonobo bzlib 
calendar caps cdparanoia cdr crypt cups dga dts dvd dvdr eds emboss encode 
exif faac faad fam fftw flac fortran ftp gd gdbm gif gmp gnome gphoto2 gpm 
gstreamer gtk gtk2 hal howl imagemagick imlib ithreads jpeg jpeg2k ladcca lcms 
ldap libwww live mad matroska mmap mmx mng mp3 mpeg nls no_wxgtk1 nocardbus 
nptl nptlonly offensive ogg oggvorbis opengl pam pcmcia pcntl pdflib pic png 
quicktime readline rtc samba scanner sdl skey slp smartcard sndfile speex 
spell sse ssl svg theora threads tiff truetype truetype-fonts type1-fonts 
unicode usb v4l v4l2 vorbis wifi winbind x86 xine xml2 xsl xv xvid zlib 
linguas_de linguas_nds linguas_en_GB linguas_tr userland_GNU kernel_linux 
elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Richard C 2005-10-02 14:23:18 UTC
Same problem here..

It is related to this line in the the stuff above: 
    ../xdata/xrddb.c:46:28: pgsql/libpq-fe.h: No such file or directory 

Postgres stuff is in /usr/include/postgresql, not /usr/include/pgsql.

I made a symlink for pgsql -> postgresql and everything worked.


My guess is that in the ebuild, 

    if [ -r /usr/include/postgresql/pgsql/libpq-fe.h ] ; then

should be

    if [ -r /usr/include/postgresql/libpq-fe.h ] ; then

..at least to work with the 8.0.3 postgres ebuild.
Comment 2 Marco Morales 2005-10-15 15:05:34 UTC
Fixed in cvs (nagios-core-1.2-r4), thanks for your help :)
Comment 3 Marco Morales 2005-10-15 15:05:59 UTC
Fixed in cvs (nagios-core-1.2-r4), thanks for your help :)