Re: [PHP4BETA] compile error with RC2 and thttpd
| From: | Dave Goodrich | Date: | Tue, 16 May 2000 16:12:39 +0000 |
| Subject: | Re: [PHP4BETA] compile error with RC2 and thttpd | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-15083@lists.php.net to get a copy of this message | ||
I have a bug report on this with Slackware, and another by someone else on
RedHat, http://bugs.php.net/version4/bugs.php?id=4105.
The second bug did not happen to me on FBSD or on Slackware when I used
source instead of the ports collection.
DAve.
on 5/14/00 2:45 AM, Jonas Jochum at jj@commandline.de wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Just got this error, when compiling php4-rc2 for thttpd on FreeBSD
> 5.0-current:
>
> Making all in sapi
> Making all in thttpd
> gcc -DHAVE_CONFIG_H -I. -I/usr/src/php-4.0RC2/sapi/thttpd
> - -I/usr/src/php-4.0RC2
> - -I/usr/ports/www/thttpd/work/thttpd-2.16 -I/usr/src/php-4.0RC2/Zend
> - -I/usr/src/p
> hp-4.0RC2 -I/usr/src/php-4.0RC2/ext/mysql/libmysql
> - -I/usr/src/php-4.0RC2/ext/xml
> /expat/xmltok -I/usr/src/php-4.0RC2/ext/xml/expat/xmlparse
> - -DXML_BYTE_ORDER=12
> - -g -O2 -Wall -c thttpd.c && touch thttpd.lo
> thttpd.c: In function `thttpd_hash_environment':
> thttpd.c:175: incompatible type for argument 1 of `__inet_ntoa'
> *** Error code 1
> Stop in /usr/src/php-4.0RC2/sapi/thttpd.
> *** Error code 1
> Stop in /usr/src/php-4.0RC2/sapi/thttpd.
> *** Error code 1
> Stop in /usr/src/php-4.0RC2/sapi.
> *** Error code 1
> Stop in /usr/src/php-4.0RC2.
>
> and
>
> echo 'PHP_LIBS = -L. -lphp4 -lpam -lm -lcrypt' >
> /usr/ports/www/thttpd/work/thttpd-2.16/php_makefile; echo 'PHP_LDFLAGS = ' >>
> /usr/ports/www/thttpd/work/thttpd-2.16/php_makefile; cp
> /sapi/thttpd/php_thttpd.h libs/libphp4.a
> /usr/ports/www/thttpd/work/thttpd-2.16; test -f
> /usr/ports/www/thttpd/work/thttpd-2.16/php_patched || (cd
> /usr/ports/www/thttpd/work/thttpd-2.16 && patch <
> /sapi/thttpd/thttpd_patch && touch php_patched)
> cp: /sapi/thttpd/php_thttpd.h: No such file or directory
> *** Error code 1 (continuing)
>
> My configure-line (shouldn't be important, but...)
>
> ./configure --with-thttpd=/usr/ports/www/thttpd/work/thttpd-2.16
> - --with-mysql --without-gd --with-ftp --enable-track-vars --enable-trans-sid
>
> The following patch fixed the first error for me. I hope, it's the right
> fix ;)
>
> - --- sapi/thttpd/thttpd.c.old Sun May 14 11:37:04 2000
> +++ sapi/thttpd/thttpd.c Sun May 14 11:37:14 2000
> @@ -174,7 +174,7 @@
> snprintf(buf, BUF_SIZE, "/%s", TG(hc)->origfilename);
> ADD_STRING("SCRIPT_NAME");
>
> - - strncpy(buf, inet_ntoa(TG(hc)->client_addr), BUF_SIZE);
> + strncpy(buf, inet_ntoa(TG(hc)->client_addr.sa_in.sin_addr), BUF_SIZE);
> ADD_STRING("REMOTE_ADDR");
> ADD_STRING("REMOTE_HOST");
>
> Now to the second error: $abs_srcdir doesn't seem to get set. Dunno how to
> fix that. Someone who's a *bit* more familiar with the "configure" stuff
> should check that :)
>
> - --
> Reg.,
> Jonas Jochum
>