PHP 4.0 Bug #9010: Compiler fails with --enable-sockets flag

From: Date: Tue, 30 Jan 2001 20:37:02 +0000
Subject: PHP 4.0 Bug #9010: Compiler fails with --enable-sockets flag
Groups: php.dev 
Request: Send a blank email to php-dev+get-45392@lists.php.net to get a copy of this message
From: mikhail@whasup.com Operating system: SCO OpenServer 5.05 PHP version: 4.0.4pl1 PHP Bug Type: Compile Failure Bug description: Compiler fails with --enable-sockets flag gcc -I. -I/u2/nobackup/tmp/php-4.0.4pl1/ext/sockets -I/u2/nobackup/tmp/php-4.0.4pl1/main -I/u2/nobackup/tmp/php-4.0.4pl1 -I/u2/nobackup/tmp/php-4.0.4pl1/Zend -I/usr/local/include/freetype -I/usr/local/gd/include -I/u2/nobackup/tmp/php-4.0.4pl1/ext/mysql/libmysql -I/u2/nobackup/tmp/php-4.0.4pl1/ext/xml/expat/xmltok -I/u2/nobackup/tmp/php-4.0.4pl1/ext/xml/expat/xmlparse -I/u2/nobackup/tmp/php-4.0.4pl1/TSRM -DXML_BYTE_ORDER=12 -g -O2 -belf -c sockets.c && touch sockets.lo sockets.c: In function `php_if_bind': sockets.c:1140: `h_errno' undeclared (first use in this function) [...] make[1]: *** [sockets.lo] Error 1 After adding "int h_errno;" to sockets.c: gcc -I. -I/u2/nobackup/tmp/php-4.0.4pl1/ext/sockets -I/u2/nobackup/tmp/php-4.0.4pl1/main -I/u2/nobackup/tmp/php-4.0.4pl1 -I/u2/nobackup/tmp/php-4.0.4pl1/Zend -I/usr/local/include/freetype -I/usr/local/gd/include -I/u2/nobackup/tmp/php-4.0.4pl1/ext/mysql/libmysql -I/u2/nobackup/tmp/php-4.0.4pl1/ext/xml/expat/xmltok -I/u2/nobackup/tmp/php-4.0.4pl1/ext/xml/expat/xmlparse -I/u2/nobackup/tmp/php-4.0.4pl1/TSRM -DXML_BYTE_ORDER=12 -g -O2 -belf -c sockets.c && touch sockets.lo In file included from /usr/include/sys/ucontext.h:22, from /usr/include/sys/signal.h:364, from /usr/include/xpg4v2/signal.h:35, from /usr/include/signal.h:7, from sockets.c:49: /usr/include/sys/regset.h:41: redefinition of `struct _fpstate' [...] make[1]: *** [sockets.lo] Error 1 After temporarily removing any mentioning of _fpstate from /usr/include/sys/regset.h: gcc [...] -o php -export-dynamic stub.lo libphp4.la Undefined first referenced symbol in file SUN_LEN .libs/libphp4.a(sockets.o) php: fatal error: Symbol referencing errors. No output written to php After adding "#define SUN_LEN(a) sizeof(*a)" to sockets.c, it compiles fine Configuration options: ./configure --with-gd=/usr/local/gd --with-mysql --enable-sockets -- Edit Bug report at: http://bugs.php.net/?id=9010&edit=1

« previous php.dev (#45392) next »