|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9010 Compiler fails with --enable-sockets flag
Submitted: 2001-01-30 15:37 UTC Modified: 2001-05-30 11:53 UTC
From: mikhail at whasup dot com Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.0.4pl1 OS: SCO OpenServer 5.05
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mikhail at whasup dot com
New email:
PHP Version: OS:


 [2001-01-30 15:37 UTC] mikhail at whasup dot com
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

gcc [...]   -o php -export-dynamic      stub.lo
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-30 11:53 UTC]
Fixed in 4.0.5

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 08:01:28 2024 UTC