ID: 33569
User updated by: jccann at gmail dot com
Reported By: jccann at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: Compile Failure
Operating System: Solaris
PHP Version: 5.0.4
New Comment:
Hi,
With today's snapshot [php5-200507050430], it still fails in the same
way as in php 5.0.4 - configure runs to success. But, when I check the
config.log for the net/if_dl.h test, it fails:
configure:9795: checking for NSAPI support
configure:9815: checking for NSAPI include files
configure:9868: checking for /apps/SUNWwbsvr/plugins/include/nsapi.h
configure:9878: gcc -E -D_POSIX_PTHREAD_SEMANTICS conftest.c
>/dev/null 2>conftest.out
In file included from /apps/SUNWwbsvr/plugins/include/nsapi.h:278,
from configure:9874:
/usr/include/sys/socket.h:202: net/if_dl.h: No such file or directory
configure: failed program was:
#line 9873 "configure"
#include "confdefs.h"
#include </apps/SUNWwbsvr/plugins/include/nsapi.h>
Here's the compilation failure.
/bin/sh /usr/local/php/php5-200507050430/libtool --silent
--preserve-dup-deps --mode=compile
/usr/local/php/php5-200507050430/meta_ccld -Iext/mysql/
-I/usr/local/php/php5-200507050430/ext/mysql/ -DPHP_ATOM_INC
-I/usr/local/php/php5-200507050430/include
-I/usr/local/php/php5-200507050430/main
-I/usr/local/php/php5-200507050430 -I/apps/SUNWwbsvr/plugins/include
-I/opt/csw/include/libxml2 -I/usr/local/mysql/include
-I/usr/local/php/php5-200507050430/TSRM
-I/usr/local/php/php5-200507050430/Zend -D_POSIX_PTHREAD_SEMANTICS
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g -O2 -pthreads -DZTS -c
/usr/local/php/php5-200507050430/ext/mysql/php_mysql.c -o
ext/mysql/php_mysql.lo
In file included from /usr/include/netdb.h:98,
from
/usr/local/php/php5-200507050430/ext/mysql/php_mysql.c:53:
/usr/include/sys/socket.h:202: net/if_dl.h: No such file or directory
make: *** [ext/mysql/php_mysql.lo] Error 1
Previous Comments:
------------------------------------------------------------------------
[2005-07-04 22:44:23] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-07-04 22:40:08] jccann at gmail dot com
Description:
------------
I am trying to compile php 5.0.4 with NSAPI support. The configuration
script runs to success, but the compilation fails.
Reproduce code:
---------------
Solaris 8 [SunOS spapp7 5.8 Generic_117350-24 sun4u sparc
SUNW,Sun-Fire]
gcc -v
Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Tried both Sun ONE Web Server 6.1 SP4 and Sun ONE Web Server 6.0 SP5.
Here's my configure options:
$ ./configure --with-mysql=/usr/local/mysql --enable-libgcc
--with-nsapi=/opt/SUNWwbsvr --with-libxml-dir=/opt/csw/
I've also tried with the --enable-sockets option with the same result.
Here's the output from config.log - but configure ran to success.
configure:16691: gcc -c -g -O2 -pthreads -D_POSIX_PTHREAD_SEMANTICS
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT conftest.c 1>&5
In file included from configure:16684:
/usr/include/sys/socket.h:202: net/if_dl.h: No such file or directory
configure: failed program was:
#line 16681 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
int main() {
static struct sockaddr sa; int n = (int) sa.sa_len; return n
; return 0; }
Expected result:
----------------
I expect that since the configure script could not detect the if_dl.h
file, the compiler was set to an invalid compilation path.
Based on information in below (actual result), I expected configure
script to 'figure out' that it needs to set a different compilation
preprocessor flag (!defined(_XPG4_2) || defined(__EXTENSIONS__)
At a minimum, since configure detected the error, shouldn't it stop
with an error since the compile won't work?
Finally, I'm not sure how to set this or what other php configure flag
to turn on XPG4_2 compliance. Could you suggest a work around?
Actual result:
--------------
After configuration, the compile fails with:
/mysql/php_mysql.o && echo > ext/mysql/php_mysql.lo
In file included from /usr/include/netdb.h:98,
from /usr/local/php-5.0.4/ext/mysql/php_mysql.c:53:
/usr/include/sys/socket.h:202: net/if_dl.h: No such file or directory
make: *** [ext/mysql/php_mysql.lo] Error 1
Here's the relevant lines from /usr/include/netdb.h :
90 #ifndef _NETDB_H
91 #define _NETDB_H
92
93 #pragma ident "@(#)netdb.h 1.25 01/05/08 SMI"
94
95 #include <sys/types.h>
96 #include <netinet/in.h>
97 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
98 #include <sys/socket.h>
99 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
100 #include <sys/feature_tests.h>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33569&edit=1