php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
/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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-30 11:53 UTC] sniper@php.net
Fixed in 4.0.5

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC