Edit report at https://bugs.php.net/bug.php?id=64833&edit=1
ID: 64833
Updated by: requinix@php.net
Reported by: clicky at erebot dot net
Summary: ext/sockets/sendrecvmsg.c related compilation errors
Status: Closed
Type: Bug
Package: Compile Failure
Operating System: Debian Stretch
PHP Version: 7.1.0alpha3
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
@peter: See https://github.com/php/php-src/issues/7978
Previous Comments:
------------------------------------------------------------------------
[2022-01-24 17:01:20] peter dot e dot lind at gmail dot com
I am hitting this issue repeatedly for php 8.x.
I can reproduce it pretty much without issue, when using docker buildx to build the extension.
Cmdline:
DOCKER_BUILDKIT=1 docker buildx build --platform linux/amd64 -t php8.0-sockets .
Dockerfile:
FROM php:8.0-fpm-buster AS php
RUN set -eux \
&& docker-php-ext-install \
sockets
Error output:
/usr/src/php/ext/sockets/sendrecvmsg.c: In function 'init_ancillary_registry':
/usr/src/php/ext/sockets/sendrecvmsg.c:128:19: error: invalid application of 'sizeof' to
incomplete type 'struct cmsgcred'
PUT_ENTRY(sizeof(struct cmsgcred), 0, 0, from_zval_write_ucred,
^~~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:99:17: note: in definition of macro 'PUT_ENTRY'
entry.size = sizev; \
^~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:129:36: error: 'SCM_CREDS' undeclared (first use in
this function); did you mean 'SCM_SRCRT'?
to_zval_read_ucred, SOL_SOCKET, SCM_CREDS);
^~~~~~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:105:19: note: in definition of macro 'PUT_ENTRY'
key.cmsg_type = type; \
^~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:129:36: note: each undeclared identifier is reported only
once for each function it appears in
to_zval_read_ucred, SOL_SOCKET, SCM_CREDS);
^~~~~~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:105:19: note: in definition of macro 'PUT_ENTRY'
key.cmsg_type = type; \
^~~~
make: *** [Makefile:216: sendrecvmsg.lo] Error 1
------------------------------------------------------------------------
[2020-03-23 17:41:55] clicky at erebot dot net
I haven't been able to reproduce this in any recent release.
------------------------------------------------------------------------
[2020-03-22 04:22:09] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2020-03-10 09:17:13] cmb@php.net
Is this still an issue for any of the actively supported PHP
versions[1]?
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2017-10-16 20:32:27] peterkokot at gmail dot com
Hello, I've tried compiling PHP 7.1.10 on Debian 9 and it goes through without any patches
required so far. Used procedure:
./configure --disable-all --enable-sockets=shared
make
I believe the compilation issues have been fixed in the mentioned problematic file and got into PHP
7.1.x release:
https://github.com/php/php-src/commits/master/ext/sockets/conversions.c
I believe we can close this issue since also according to some Docker images based on Debian 8 and 9
the compilation goes through ok. In case the issue is still relevant, you we can reopen this ticket
anytime anyway. Thanks.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=64833
--
Edit this bug report at https://bugs.php.net/bug.php?id=64833&edit=1