#33569 [NEW]: Compile fails with /usr/include/sys/socket.h:202: net/if_dl.h: No such file or

From: Date: Mon, 04 Jul 2005 20:40:10 +0000
Subject: #33569 [NEW]: Compile fails with /usr/include/sys/socket.h:202: net/if_dl.h: No such file or
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81382@lists.php.net to get a copy of this message
From: jccann at gmail dot com Operating system: Solaris PHP version: 5.0.4 PHP Bug Type: Compile Failure Bug description: Compile fails with /usr/include/sys/socket.h:202: net/if_dl.h: No such file or 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 bug report at http://bugs.php.net/?id=33569&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33569&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33569&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33569&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33569&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33569&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33569&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33569&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33569&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33569&r=support Expected behavior: http://bugs.php.net/fix.php?id=33569&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33569&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33569&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33569&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33569&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33569&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33569&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33569&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33569&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33569&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33569&r=mysqlcfg

« previous php.bugs (#81382) next »