ID: 33569 Updated by: [EMAIL PROTECTED] Reported By: jccann at gmail dot com -Status: Open +Status: Feedback Bug Type: Compile Failure Operating System: Solaris PHP Version: 5.0.4 New Comment:
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 Previous Comments: ------------------------------------------------------------------------ [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
