PHP 4.0 Bug #5207: Cannot open sockets using (p)fsockopen - problems using configure and inet_aton
| From: | djordan at completeweb dot net | Date: | Fri, 23 Jun 2000 19:34:38 +0000 |
| Subject: | PHP 4.0 Bug #5207: Cannot open sockets using (p)fsockopen - problems using configure and inet_aton | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-22099@lists.php.net to get a copy of this message | ||
From: djordan@completeweb.net
Operating system: BSDI 4.1
PHP version: 4.0 Release Candidate 2
PHP Bug Type: Compile Failure
Bug description: Cannot open sockets using (p)fsockopen - problems using configure and inet_aton
While trying to configure php-4 on BSDi 4.1 I am getting
errors finding inet_aton, which in BSDi there isnt
one, however there is an __inet_aton which is defined
in /arpa/inet.h however I cannot get configure to use
the /arpa/inet.h file. So configure constantly complains
about inet_aton and thus sockets thru php4 dont work.
PHP4 does compile into apache and runs just fine, Im just
missing socket ability.
Command line:
./configure --with-mysql --with-apache=../apache_1.3.12
=======================================
Here is an output from config.log:
configure:4388: checking for inet_aton in -lbind
configure:4407: gcc -o conftest -g -O2 conftest.c -lbind -lm -ldl 1>&5
/var/tmp/ccS6N9zY.o: In function `main':
/usr/home/source/php-4.0.0/configure:4403: undefined reference to `inet_aton'
configure: failed program was:
#line 4396 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char inet_aton();
int main() {
inet_aton()
; return 0; }
configure:4447: checking for inet_aton in -lresolv
configure:4466: gcc -o conftest -g -O2 conftest.c -lresolv -lm -ldl 1>&5
ld: cannot open -lresolv: No such file or directory
configure: failed program was:
#line 4455 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
And an output from configure itself:
<snip>
Running system checks checking for missing declarations of reentrant functions... done
checking whether compiler supports -R... no
checking whether compiler supports -Wl,-rpath,... yes
checking for sendmail... /usr/lib/sendmail
checking whether system uses EBCDIC... no
checking for socket in -lsocket... no
checking for htonl in -lsocket... no
checking for yp_get_default_domain... yes
checking for crypt in -lcrypt... no
checking for dlopen in -ldl... yes
checking for sin in -lm... yes
checking for inet_aton in -lbind... no
checking for inet_aton in -lresolv... no
checking for res_search in -lsocket... no
<snipped>
Although, later in the configure output I see this:
checking for arpa/inet.h... yes
I did check arpa/inet.h and it definitely defines
inet_aton to __inet_aton. Here is a snippet from
arpa/inet.h
<snipped>
#ifndef _INET_H_
#define _INET_H_
/* External definitions for functions in inet(3) */
#include <sys/param.h>
#if (!defined(BSD)) || (BSD < 199306)
# include <sys/bitypes.h>
#else
# include <sys/types.h>
#endif
#include <sys/cdefs.h>
#define inet_addr __inet_addr
#define inet_aton __inet_aton
<snipped>