Subject: pkg/7773: pkgsrc/www/ap-php3 failed to build out of the box
To: None <gnats-bugs@gnats.netbsd.org>
From: None <alaric@ivision.co.uk>
List: netbsd-bugs
Date: 06/14/1999 05:20:49
>Number:         7773
>Category:       pkg
>Synopsis:       pkgsrc/www/ap-php3 failed to build out of the box
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 14 05:20:01 1999
>Last-Modified:
>Originator:     Alaric Williams
>Organization:
>Release:        1.4
>Environment:
NetBSD lust 1.4 NetBSD 1.4 (LUST) #0: Sat Jun 12 07:26:03 PDT 1999     root@lust:/usr/src/sys/arch/i386/compile/LUST i386

>Description:
ap-php3 seems to expect libgdbm in /usr/local/lib not /usr/pkg/lib

bash-2.03# cd ap-php3
bash-2.03# ls
CVS          Makefile     README.html  pkg          work
bash-2.03# make
===>  Building for ap-php-3.0.7
/usr/pkg/sbin/apxs -c -o libphp3.so -L/usr/local/lib                                 -lz              -lgdbm  -L./dbase -ldbf -lm -lcrypt  -lresolv mod_php3.c libmodphp3-so.a
cc -DNETBSD -DEAPI -O2 -fPIC -DPIC -DSHARED_MODULE -I/usr/pkg/include/httpd  -c mod_php3.c
ld -Bshareable -o libphp3.so mod_php3.o libmodphp3-so.a -L/usr/local/lib -L./dbase -lz -lgdbm -ldbf -lm -lcrypt -lresolv
ld: -lgdbm: no match
apxs:Break: Command failed with rc=65536
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
bash-2.03# locate libgdbm
/usr/pkg/lib/libgdbm.a
/usr/pkg/lib/libgdbm.so.1.73
/usr/pkgsrc/databases/gdbm/work/gdbm-1.7.3/.libs/libgdbm.a
/usr/pkgsrc/databases/gdbm/work/gdbm-1.7.3/.libs/libgdbm.la
/usr/pkgsrc/databases/gdbm/work/gdbm-1.7.3/.libs/libgdbm.so.1.73
/usr/pkgsrc/databases/gdbm/work/gdbm-1.7.3/libgdbm.la
bash-2.03# cp /usr/pkg/lib/libgdm* /usr/local/lib
cp: /usr/pkg/lib/libgdm*: No such file or directory
bash-2.03# ls -l /usr/pkg/lib/libgdbm*
-rw-r--r--  1 root  wheel  25880 Jun 12 18:20 /usr/pkg/lib/libgdbm.a
-r--r--r--  1 root  wheel  29151 Jun 12 18:20 /usr/pkg/lib/libgdbm.so.1.73
bash-2.03# cp /usr/pkg/lib/libgdbm* /usr/local/lib
bash-2.03# make
===>  Building for ap-php-3.0.7
/usr/pkg/sbin/apxs -c -o libphp3.so -L/usr/local/lib                                 -lz              -lgdbm  -L./dbase -ldbf -lm -lcrypt  -lresolv mod_php3.c libmodphp3-so.a
cc -DNETBSD -DEAPI -O2 -fPIC -DPIC -DSHARED_MODULE -I/usr/pkg/include/httpd  -c mod_php3.c
ld -Bshareable -o libphp3.so mod_php3.o libmodphp3-so.a -L/usr/local/lib -L./dbase -lz -lgdbm -ldbf -lm -lcrypt -lresolv


>How-To-Repeat:

See above
>Fix:

Quick fix: cp /usr/pkg/lib/libgdbm* /usr/local/lib
Full fix:

The reference to /usr/local/lib seems to come from the php3 package.
I'm not sure, but maybe the configur.in file needs to be patched:

bash-2.03$ pwd
/usr/pkgsrc/www/php3/work/php-3.0.7
bash-2.03$ grep /usr/local/lib *
...
configure.in:    PHP_LIBS=-L/usr/local/lib
...
>Audit-Trail:
>Unformatted: