problems compiling php4b4pl1 under NetBSD 1.4.2 (and FreeBSD 4.0)...
| From: | alex | Date: | Tue, 11 Apr 2000 14:38:59 +0000 |
| Subject: | problems compiling php4b4pl1 under NetBSD 1.4.2 (and FreeBSD 4.0)... | ||
| Groups: | php.beta | ||
| Request: | Send a blank email to php-beta+get-153@lists.php.net to get a copy of this message | ||
hi everyone,
the problem compiling php4 under bsd first appeard under FreeBSD 4.0, so i
tried it under NetBSD 1.4.2, but got exact the same error(s). now the
problem is solved (under NetBSD 1.4.2, will est the hack under FreeBSD 4.0
later...). ok here goes the quest... :
i had problems compiling php4 under netbsd 1.4.2 with libgd installed (gd
was just installed on the system but not added with the --with-gd option to
php4 configure). back to the beginning: i extract apache_1.3.12.tgz and
php-4.0b4pl1.tgz, cd to apache dir, make a ./configure, cd to ../php-dir,
do a ./configure --with-apache=../apache_1.3.12 which runs throuh without
any errors, the i do a make.... compiling the zend stuff, then comming to
the ext dir, everything is fine, but when it reaches to
ext/standard/crypt.c file, compiler stops:
gcc -DHAVE_CONFIG_H -I. -I/usr/local/tmp/php-4.0b4pl1/ext/standard -I../..
-I../../Zend -I/usr/local/tmp/php-4.0b4pl1
-I/usr/local/tmp/apache_1.3.12/src/include
-I/usr/local/tmp/apache_1.3.12/src/os/unix -D_REENTRANT -g -O2
-I/usr/pkg/include -Wall -c crypt.c && touch crypt.lo
crypt.c: In function `php_if_crypt':
crypt.c:120: `PHP3_MAX_SALT_LEN' undeclared (first use in this function)
crypt.c:120: (Each undeclared identifier is reported only once
crypt.c:120: for each function it appears in.)
crypt.c:120: size of array `salt' has non-integer type
crypt.c: At top level:
crypt.c:111: warning: `php_to64' defined but not used
*** Error code 1
Stop.
*** Error code 1
Stop.
*** Error code 1
Stop.
*** Error code 1
Stop.
...that's it... :(
i'm not a "gcc/cc/libraries/compiling..etc.."-crack, so i asked several
people in irc. hubertf@netbsd.org finally solved the problem, caused by the
gnu autoconf/automake and configure script (i hope that's right, my english
is not the best, etc... just have a look at hubertf@netbsd.org's patch-file
i've attached to this mail and his 'sh-wrapper') :)
solution by hubertf@netbsd.org:
1. patch the configure script with the patch file attached to this mail
2. configure php4 like this:
sh -c 'CFLAGS="-L/usr/pkg/lib -Wl,-R/usr/pkg/lib" ./configure
--prefix=/usr/local/www --with-apache=../apache_1.3.12'
then 'make' and 'make install' it
3. configure apache with sh -c too:
sh -c 'CFLAGS="-L/usr/pkg/lib -Wl,-R/usr/pkg/lib" ./configure
--prefix=/usr/local/www --activate-module=src/modules/php4/libphp4.a'
then 'make' and 'make install' ... works :))
please don't tell me this is my own fault, i should've used
php-4.0RC1.tar.gz instead.... RC1 crashes much earlier while configuring /
compiling cause of other problems .... *sigh*
ciao alex
--- configure.BAK Tue Apr 11 15:17:22 2000 +++ configure Tue Apr 11 15:18:42 2000 @@ -9109,7 +9109,7 @@ if test "$shared" = "yes"; then echo "$ac_t""yes (shared)" 1>&6 - GD_LIBS="-lgd" + GD_LIBS="-ljpeg -lgd" else echo "$ac_t""yes (static)" 1>&6 @@ -9119,7 +9119,7 @@ if test -n "$unique" && test "`eval $cmd`" = "" ; then eval "LIBRARY$unique=set" - LIBS="-lgd $LIBS" + LIBS="-ljpeg -lgd $LIBS" fi @@ -9134,7 +9134,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9140 "configure" #include "confdefs.h" @@ -9257,7 +9257,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9263 "configure" #include "confdefs.h" @@ -9300,7 +9300,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9306 "configure" #include "confdefs.h" @@ -9343,7 +9343,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9349 "configure" #include "confdefs.h" @@ -9438,7 +9438,7 @@ if test "$shared" = "yes"; then echo "$ac_t""yes (shared)" 1>&6 - GD_LIBS="-lgd" + GD_LIBS="-ljpeg -lgd" GD_LFLAGS="-L$GD_LIB" else echo "$ac_t""yes (static)" 1>&6 @@ -9475,7 +9475,7 @@ if test -n "$unique" && test "`eval $cmd`" = "" ; then eval "LIBRARY$unique=set" - LIBS="-lgd $LIBS" + LIBS="-ljpeg -lgd $LIBS" fi @@ -9492,7 +9492,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9498 "configure" #include "confdefs.h" @@ -9615,7 +9615,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9621 "configure" #include "confdefs.h" @@ -9658,7 +9658,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9664 "configure" #include "confdefs.h" @@ -9701,7 +9701,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9707 "configure" #include "confdefs.h" @@ -9781,7 +9781,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9787 "configure" #include "confdefs.h" @@ -9815,7 +9815,7 @@ #define $ac_tr_lib 1 EOF - LIBS="-lgd $LIBS" + LIBS="-ljpeg -lgd $LIBS" else echo "$ac_t""no" 1>&6 @@ -9828,7 +9828,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9834 "configure" #include "confdefs.h" @@ -9873,7 +9873,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9879 "configure" #include "confdefs.h" @@ -9996,7 +9996,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 10002 "configure" #include "confdefs.h" @@ -10039,7 +10039,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 10045 "configure" #include "confdefs.h" @@ -10082,7 +10082,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 10088 "configure" #include "confdefs.h"
--- configure.BAK Tue Apr 11 15:17:22 2000 +++ configure Tue Apr 11 15:18:42 2000 @@ -9109,7 +9109,7 @@ if test "$shared" = "yes"; then echo "$ac_t""yes (shared)" 1>&6 - GD_LIBS="-lgd" + GD_LIBS="-ljpeg -lgd" else echo "$ac_t""yes (static)" 1>&6 @@ -9119,7 +9119,7 @@ if test -n "$unique" && test "`eval $cmd`" = "" ; then eval "LIBRARY$unique=set" - LIBS="-lgd $LIBS" + LIBS="-ljpeg -lgd $LIBS" fi @@ -9134,7 +9134,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9140 "configure" #include "confdefs.h" @@ -9257,7 +9257,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9263 "configure" #include "confdefs.h" @@ -9300,7 +9300,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9306 "configure" #include "confdefs.h" @@ -9343,7 +9343,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9349 "configure" #include "confdefs.h" @@ -9438,7 +9438,7 @@ if test "$shared" = "yes"; then echo "$ac_t""yes (shared)" 1>&6 - GD_LIBS="-lgd" + GD_LIBS="-ljpeg -lgd" GD_LFLAGS="-L$GD_LIB" else echo "$ac_t""yes (static)" 1>&6 @@ -9475,7 +9475,7 @@ if test -n "$unique" && test "`eval $cmd`" = "" ; then eval "LIBRARY$unique=set" - LIBS="-lgd $LIBS" + LIBS="-ljpeg -lgd $LIBS" fi @@ -9492,7 +9492,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9498 "configure" #include "confdefs.h" @@ -9615,7 +9615,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9621 "configure" #include "confdefs.h" @@ -9658,7 +9658,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9664 "configure" #include "confdefs.h" @@ -9701,7 +9701,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9707 "configure" #include "confdefs.h" @@ -9781,7 +9781,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9787 "configure" #include "confdefs.h" @@ -9815,7 +9815,7 @@ #define $ac_tr_lib 1 EOF - LIBS="-lgd $LIBS" + LIBS="-ljpeg -lgd $LIBS" else echo "$ac_t""no" 1>&6 @@ -9828,7 +9828,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9834 "configure" #include "confdefs.h" @@ -9873,7 +9873,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 9879 "configure" #include "confdefs.h" @@ -9996,7 +9996,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 10002 "configure" #include "confdefs.h" @@ -10039,7 +10039,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 10045 "configure" #include "confdefs.h" @@ -10082,7 +10082,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgd $LIBS" +LIBS="-ljpeg -lgd $LIBS" cat > conftest.$ac_ext <<EOF #line 10088 "configure" #include "confdefs.h"