code errors in php compilation

code errors in php compilation

Post by Mark Drayto » Sun, 29 Aug 1999 04:00:00



Hi guys

I am having a *really* bad time trying to install Apache 1.3.9 and PHP
3.0.12 on my 486 intranet server. It's running RH5.2, with a 2.2.12 kernel.
The kernel source is all in place still.

I previously had Apache 1.3.6 / PHP 3.0.11 installed, but I needed to
recompile PHP to include some hashing functions. I thought I may as well
install Apache 1.3.9 at the same time. I deleted my old Apache install by
stopping the server process and then deleting the /www directory, where (I
think) everything was kept.

I have installed Apache and PHP in /usr/local/src/apache_1.3.9 and
/usr/local/src/php_3.0.12. Going by the installation guide, I typed (in
apache dir)

./configure --prefix=/www

then, in php dir

./configure --with-mysql --with-apache=../apache_1.3.9 --enable-track-vars -
-with-mhash

followed by

make

which results in (aplogies for size)

gcc -g -O2 -O2   -I. -I.   -I../apache_1.3.9/src/include -I../apache_1.3.9/s
rc/os/unix             -I/usr/include/mysql -I/usr/local/include    -c
functions/db.c -o functions/db.o
functions/db.c:114: parse error before `*'
functions/db.c: In function `_php3_dbm_exists':
functions/db.c:115: `datum' undeclared (first use this function)
functions/db.c:115: (Each undeclared identifier is reported only once
functions/db.c:115: for each function it appears in.)
functions/db.c:115: parse error before `value_datum'
functions/db.c:118: `value_datum' undeclared (first use this function)
functions/db.c:118: `dbf' undeclared (first use this function)
functions/db.c:118: `key_datum' undeclared (first use this function)
functions/db.c: In function `_php3_dbmopen':
functions/db.c:306: `DBM' undeclared (first use this function)
functions/db.c:306: `dbf' undeclared (first use this function)
functions/db.c:307: parse error before `int'
functions/db.c:326: `imode' undeclared (first use this function)
functions/db.c: In function `_php3_dbmclose':
functions/db.c:452: `DBM' undeclared (first use this function)
functions/db.c:452: `dbf' undeclared (first use this function)
functions/db.c:453: parse error before `int'
functions/db.c:461: `lockfd' undeclared (first use this function)
functions/db.c: In function `_php3_dbminsert':
functions/db.c:509: `datum' undeclared (first use this function)
functions/db.c:509: parse error before `key_datum'
functions/db.c:511: `DBM' undeclared (first use this function)
functions/db.c:511: `dbf' undeclared (first use this function)
functions/db.c:516: `value_datum' undeclared (first use this function)
functions/db.c:519: `key_datum' undeclared (first use this function)
functions/db.c:531: `DBM_INSERT' undeclared (first use this function)
functions/db.c: In function `_php3_dbmreplace':
functions/db.c:565: `DBM' undeclared (first use this function)
functions/db.c:565: `dbf' undeclared (first use this function)
functions/db.c:566: parse error before `int'
functions/db.c:567: `datum' undeclared (first use this function)
functions/db.c:576: `value_datum' undeclared (first use this function)
functions/db.c:579: `key_datum' undeclared (first use this function)
functions/db.c:591: `ret' undeclared (first use this function)
functions/db.c:591: `DBM_REPLACE' undeclared (first use this function)
functions/db.c: In function `_php3_dbmfetch':
functions/db.c:628: `datum' undeclared (first use this function)
functions/db.c:628: parse error before `key_datum'
functions/db.c:630: `DBM' undeclared (first use this function)
functions/db.c:630: `dbf' undeclared (first use this function)
functions/db.c:632: `key_datum' undeclared (first use this function)
functions/db.c:637: `value_datum' undeclared (first use this function)
functions/db.c: In function `_php3_dbmexists':
functions/db.c:698: `datum' undeclared (first use this function)
functions/db.c:698: parse error before `key_datum'
functions/db.c:700: `DBM' undeclared (first use this function)
functions/db.c:700: `dbf' undeclared (first use this function)
functions/db.c:702: `key_datum' undeclared (first use this function)
functions/db.c: In function `_php3_dbmdelete':
functions/db.c:745: `datum' undeclared (first use this function)
functions/db.c:745: parse error before `key_datum'
functions/db.c:747: `DBM' undeclared (first use this function)
functions/db.c:747: `dbf' undeclared (first use this function)
functions/db.c:749: `key_datum' undeclared (first use this function)
functions/db.c: In function `_php3_dbmfirstkey':
functions/db.c:795: `datum' undeclared (first use this function)
functions/db.c:795: parse error before `ret_datum'
functions/db.c:797: `DBM' undeclared (first use this function)
functions/db.c:797: `dbf' undeclared (first use this function)
functions/db.c:806: `ret_datum' undeclared (first use this function)
functions/db.c: In function `_php3_dbmnextkey':
functions/db.c:856: `datum' undeclared (first use this function)
functions/db.c:856: parse error before `key_datum'
functions/db.c:858: `DBM' undeclared (first use this function)
functions/db.c:858: `dbf' undeclared (first use this function)
functions/db.c:860: `key_datum' undeclared (first use this function)
functions/db.c:873: `ret_datum' undeclared (first use this function)
make: *** [functions/db.o] Error 1

I'm no C expert, but this looks like problems with the code. Please correct
me if I'm wrong!

I retryed after doing a make clean in the php dir, with no luck.

Can anyone help?

P.S. How exactly should software installed from tarballs be removed? How can
you find what went where? Is it safe remove the source code after making a
binary?

I appreciate any replies...

--
________________________
Mark Drayton

 
 
 

code errors in php compilation

Post by Rasmus Lerdo » Mon, 30 Aug 1999 04:00:00


Quote:>functions/db.c:858: `DBM' undeclared (first use this function)
>functions/db.c:858: `dbf' undeclared (first use this function)
>functions/db.c:860: `key_datum' undeclared (first use this function)
>functions/db.c:873: `ret_datum' undeclared (first use this function)
>make: *** [functions/db.o] Error 1

>I'm no C expert, but this looks like problems with the code. Please correct
>me if I'm wrong!

You have some sort of weird dbm-related problem I have never seen before.
Did you install anything funky on this box?  IBM DB2?  Berkeley DB2?  Try
installing the latest gdbm and gdbm-devel rpms

Quote:>P.S. How exactly should software installed from tarballs be removed? How can
>you find what went where? Is it safe remove the source code after making a
>binary?

Just rm -f the directory the tarball expanded to.

-Rasmus

 
 
 

code errors in php compilation

Post by Mark Drayto » Mon, 30 Aug 1999 04:00:00


No, I don't have anything but Samba, Apache, Mysql, mhash and PHP on my box.

I gave up with PHP 3.0.12, and went back to 3.0.11, which after some similar
problems in micotime.c compiled sucessfully. This was the problem before a
make clean:

functions/microtime.c: In function `php3_getrusage':
functions/microtime.c:122: storage size of `usg' isn't known
functions/microtime.c:125: `RUSAGE_SELF' undeclared (first use this
function)
functions/microtime.c:125: (Each undeclared identifier is reported only once
functions/microtime.c:125: for each function it appears in.)
functions/microtime.c:131: `RUSAGE_CHILDREN' undeclared (first use this
function)
make: *** [functions/microtime.o] Error 1

Cheers,

--
________________________
Mark Drayton