php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19212 Socket extension won't compile
Submitted: 2002-09-03 13:21 UTC Modified: 2002-09-04 10:06 UTC
From: patrickb at buzzimage dot com Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.2.2 OS: Irix 6.5.12f
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: patrickb at buzzimage dot com
New email:
PHP Version: OS:

 

 [2002-09-03 13:21 UTC] patrickb at buzzimage dot com
Irix 6.5.12f
GCC 3.0.4

./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --enable-yp --enable-calendar --enable-ftp --enable-sockets

/bin/sh /usr/src/php-4.2.2/libtool --silent --mode=compile /usr/freeware/bin/gcc -I. -I/usr/src/php-4.2.2/ext/sockets -I/usr/src/php-4.2.2/main -I/usr/src/php-4.2.2 -I/usr/local/apache_1.3.23/include -I/usr/src/php-4.2.2/Zend -I/usr/local/mysql/include -I/usr/src/php-4.2.2/ext/xml/expat  -D_XPG_IV -DIRIX -DUSE_HSREGEX -DUSE_EXPAT -I/usr/src/php-4.2.2/TSRM -g -O2 -prefer-pic  -c sockets.c
sockets.c:34:1: warning: "__EXTENSIONS__" redefined
<command line>:1:1: warning: this is the location of the previous definition
sockets.c: In function `zif_socket_recvmsg':
sockets.c:1476: warning: assignment from incompatible pointer type
sockets.c:1481: warning: assignment from incompatible pointer type
sockets.c:1483: structure has no member named `msg_flags'
sockets.c:1499: structure has no member named `msg_flags'
sockets.c:1525: warning: assignment from incompatible pointer type
sockets.c:1531: warning: assignment from incompatible pointer type
sockets.c:1538: structure has no member named `msg_flags'
sockets.c:1554: structure has no member named `msg_flags'
sockets.c: In function `zif_socket_sendmsg':
sockets.c:1611: warning: assignment from incompatible pointer type
sockets.c:1639: warning: assignment from incompatible pointer type
gmake[3]: *** [sockets.lo] Error 1
gmake[3]: Leaving directory `/usr/src/php-4.2.2/ext/sockets'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/src/php-4.2.2/ext/sockets'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/src/php-4.2.2/ext'
gmake: *** [all-recursive] Error 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-03 13:28 UTC] patrickb at buzzimage dot com
Same as bug #9229
 [2002-09-03 18:20 UTC] kalowsky@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

More specifically can you test for the new PHP 4.2.3 RC files and see if this continues.  This should be something fairly easy to fix, and hopefully we can get a patch in (if it's not fixed).
 [2002-09-04 08:10 UTC] patrickb at buzzimage dot com
It actually died quicker this time. During the compilation of a Zend module I think. Didn't even get to the sockets extension. It does die with the same type of 'msg_flags' error though.

/bin/sh libtool --silent --mode=compile /usr/freeware/bin/gcc  -Iext/sockets/ -I/usr/src/php4-200209040300/ext/sockets/ -DPHP_ATOM_INC -I/usr/src/php4-200209040300/include -I/usr/src/php4-200209040300/main -I/usr/src/php4-200209040300 -I/usr/src/php4-200209040300/Zend -I/usr/local/mysql/include -I/usr/src/php4-200209040300/ext/xml/expat  -D_XPG_IV -DIRIX -DUSE_HSREGEX -DUSE_EXPAT -I/usr/src/php4-200209040300/TSRM  -g -O2  -prefer-pic -c /usr/src/php4-200209040300/ext/sockets/sockets.c -o ext/sockets/sockets.lo 
/usr/src/php4-200209040300/ext/sockets/sockets.c:34:1: warning: "__EXTENSIONS__" redefined
<command line>:1:1: warning: this is the location of the previous definition
/usr/src/php4-200209040300/ext/sockets/sockets.c: In function `zif_socket_recvmsg':
/usr/src/php4-200209040300/ext/sockets/sockets.c:1539: structure has no member named `msg_flags'
/usr/src/php4-200209040300/ext/sockets/sockets.c:1556: structure has no member named `msg_flags'
/usr/src/php4-200209040300/ext/sockets/sockets.c:1598: structure has no member named `msg_flags'
/usr/src/php4-200209040300/ext/sockets/sockets.c:1617: structure has no member named `msg_flags'
gmake: *** [ext/sockets/sockets.lo] Error 1
 [2002-09-04 08:11 UTC] patrickb at buzzimage dot com
My mistake, it is the sockets.c file that choked.
 [2002-09-04 08:44 UTC] msopacua at idg dot nl
Hi,
I found a manpage on IRIX 5.3, that had the struct msghdr as follows:
struct msghdr {
               caddr_t   msg_name; /* optional address */
               int  msg_namelen;   /* size of address */
               struct    iovec *msg_iov;     /* scatter/gather array */
               int  msg_iovlen;    /* # elements in msg_iov */
              caddr_t    msg_accrights; /* access rights sent/received */
               int  msg_accrightslen;
          };

Could you check sys/sockets.h on your os, and find that struct definition?

(it indeed doesn't contain msgflags).
 [2002-09-04 09:00 UTC] msopacua at idg dot nl
Have hunch this is a bug in ext/sockets/config.m4.

After configuring, could you edit:
main/php_config.h

and change:
#undef MISSING_MSGHDR_MSGFLAGS
to:
#define MISSING_MSGHDR_MSGFLAGS 1
 [2002-09-04 09:30 UTC] sniper@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2002-09-04 10:06 UTC] patrickb at buzzimage dot com
msopacua@idg.nl:

Here is the struct from the sys/sockets.h file on my system:

#if _SGIAPI
struct msghdr {
        caddr_t msg_name;               /* optional address */
        int     msg_namelen;            /* size of address */
        struct  iovec *msg_iov;         /* scatter/gather array */
        int     msg_iovlen;             /* # elements in msg_iov */
        caddr_t msg_accrights;          /* access rights sent/received */
        int     msg_accrightslen;
};
#else
struct msghdr {
        void    *msg_name;              /* optional address */
        size_t  msg_namelen;            /* size of address */
        struct  iovec *msg_iov;         /* scatter/gather array */
        int     msg_iovlen;             /* # elements in msg_iov */
        void    *msg_control;           /* ancillary data */
        size_t  msg_controllen;         /* ancillary data buffer len */
        int     msg_flags;              /* flags on rec'd message */
};
#endif  /* _SGIAPI  */

sniper@php.net:

I'll try the latest stable snapshot in a few hours.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 07 06:01:27 2024 UTC