Subject: pkg/31123: databases/php-pgsql not building
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <joel@webslinger1.student.iastate.edu>
List: pkgsrc-bugs
Date: 09/02/2005 05:00:00
>Number:         31123
>Category:       pkg
>Synopsis:       databases/php-pgsql will not build due to incorrect (or missing) include paths
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 02 05:00:00 +0000 2005
>Originator:     jleyh@iastate.edu
>Release:        NetBSD 2.0.2
>Organization:
	
>Environment:
System: NetBSD webslinger1 2.0.2 NetBSD 2.0.2 (GENERIC) #0: Wed Mar 23 08:53:42 UTC 2005 jmc@faith.netbsd.org:/home/builds/ab/netbsd-2-0-2-RELEASE/i386/200503220140Z-obj/home/builds/ab/netbsd-2-0-2-RELEASE/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	When running make in  databases/php-pgsql, the configure script exits with:

	===> Checking for vulnerabilities in php-pgsql-5.0.4
	=> Checksum SHA1 OK for php-5.0.4.tar.bz2.
	=> Checksum RMD160 OK for php-5.0.4.tar.bz2.
	--snip--
	checking for PHP prefix... /usr/pkg
	checking for PHP includes... -I/usr/pkg/include/php -I/usr/pkg/include/php/main -I/usr/pkg/include/php/TSRM -I/usr/pkg/include/php/Zend
	checking for PHP extension directory... /usr/pkg/lib/php/20040412
	checking for re2c... exit 0;
	checking for gawk... /usr/bin/awk
	checking for PostgreSQL support... yes, shared
	checking for pg_config... not found
	configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
	*** Error code 1

	Stop.
	make: stopped in /usr/pkgsrc/databases/php-pgsql
	===> 
	===> There was an error during the ``configure'' phase.
	===> Please investigate the following for more information:
	===>      * config.log
	===>      * /usr/tmp/pkgsrc/databases/php-pgsql/work/.work.log
	===> 
	*** Error code 1

	Stop.
	make: stopped in /usr/pkgsrc/databases/php-pgsql


	Adding PGSQL_PREFIX=/usr/pkg to mk.conf allows the configure script to finish. When the Makefile runs:

	===> Building for php-pgsql-5.0.4
	/bin/sh /usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/libtool --mode=compile cc  -I. -I/usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql -DPHP_ATOM_INC -I/usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/include -I/usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/main -I/usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql -I/usr/pkg/include/php -I/usr/pkg/include/php/main -I/usr/pkg/include/php/TSRM -I/usr/pkg/include/php/Zend -I/usr/pkg/include  -I/usr/pkg/include -I/usr/include -DHAVE_CONFIG_H  -O2 -I/usr/pkg/include -I/usr/include   -c /usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/pgsql.c -o pgsql.lo
	mkdir .libs
	 cc -I. -I/usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql -DPHP_ATOM_INC -I/usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/include -I/usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/main -I/usr/tmp/pkgsrc/databases/php-pgsql/work/.buildlink/include/php -I/usr/tmp/pkgsrc/databases/php-pgsql/work/.buildlink/include/php/main -I/usr/tmp/pkgsrc/databases/php-pgsql/work/.buildlink/include/php/TSRM -I/usr/tmp/pkgsrc/databases/php-pgsql/work/.buildlink/include/php/Zend -I/usr/tmp/pkgsrc/databases/php-pgsql/work/.buildlink/include -DHAVE_CONFIG_H -O2 -c /usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/pgsql.c  -fPIC -DPIC -o .libs/pgsql.o
	 In file included from /usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/pgsql.c:38:
	 /usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/php_pgsql.h:32:22: libpq-fe.h: No such file or directory
	 /usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/php_pgsql.h:44:28: libpq/libpq-fs.h: No such file or directory
	 /usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/php_pgsql.h:49:23: pg_config.h: No such file or directory
	 In file included from /usr/tmp/pkgsrc/databases/php-pgsql/work/php-5.0.4/ext/pgsql/pgsql.c:38:
	 -- snip pages of errors --


	 The includes are not found, and I'm assuming there is a missing
	 -I/usr/pkg/include somewhere. I tried stubbing this in random places, but
	 to no avail. I use the default install paths for everything, so /usr/pkg
	 is where all my package related stuff lives.

	 I downloaded the latest pkgsrc avaliable. I have sucessfully built and
	 used php-mysql-5.0.4 build from this very pkgsrc. Relavant installed
	 packages:
	 postgresql80-client-8.0.3 -- from binary pkg
	 php-mysql-5.0.4 -- from pkgsrc
	 ap-php-5.0.4 -- from pkgsrc
	 mysql-client-4.1.13 -- from binary
	 php-5.0.4 -- from binary
	 apache-2.0.54nb2 -- from binary
	 apr-0.9.6.2.0.54nb1 -- from binary
	
>How-To-Repeat:
	I would assume have the above packages installed, and try a make from databases/php-pgsql
>Fix: