Skip to content

Installation of sockets extension fails on php 8.0.15 in docker #7987

@isfedorov

Description

@isfedorov

Description

Create Dockerfile with code

FROM php:8.0.15

RUN docker-php-ext-install sockets

Perform docker build .

the build will fail with the next log

  => [internal] load metadata for docker.io/library/php:8.0.15                                                                                                                                                      1.3s
 => CACHED [1/2] FROM docker.io/library/php:8.0.15@sha256:b80b135491f45bfc8bb44a13a1137178e5a9d2e8f261902bb47afc9f0cbdbc5e                                                                                         0.0s
 => ERROR [2/2] RUN docker-php-ext-install sockets                                                                                                                                                                 6.6s
------                                                                                                                                                                                                                  
 > [2/2] RUN docker-php-ext-install sockets:                                                                                                                                                                            
#5 1.645 Configuring for:                                                                                                                                                                                               
#5 1.645 PHP Api Version:         20200930                                                                                                                                                                              
#5 1.645 Zend Module Api No:      20200930
#5 1.645 Zend Extension Api No:   420200930
#5 2.224 checking for grep that handles long lines and -e... /bin/grep
#5 2.226 checking for egrep... /bin/grep -E
#5 2.229 checking for a sed that does not truncate output... /bin/sed
#5 2.265 checking for pkg-config... /usr/bin/pkg-config
#5 2.266 checking pkg-config is at least version 0.9.0... yes
#5 2.268 checking for cc... cc
#5 2.291 checking whether the C compiler works... yes
#5 2.323 checking for C compiler default output file name... a.out
#5 2.325 checking for suffix of executables... 
#5 2.365 checking whether we are cross compiling... no
#5 2.409 checking for suffix of object files... o
#5 2.431 checking whether we are using the GNU C compiler... yes
#5 2.452 checking whether cc accepts -g... yes
#5 2.476 checking for cc option to accept ISO C89... none needed
#5 2.506 checking how to run the C preprocessor... cc -E
#5 2.556 checking for icc... no
#5 2.565 checking for suncc... no
#5 2.575 checking for system library directory... lib
#5 2.575 checking if compiler supports -Wl,-rpath,... yes
#5 2.619 checking build system type... x86_64-pc-linux-gnu
#5 2.625 checking host system type... x86_64-pc-linux-gnu
#5 2.625 checking target system type... x86_64-pc-linux-gnu
#5 2.667 checking for PHP prefix... /usr/local
#5 2.667 checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
#5 2.668 checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20200930
#5 2.668 checking for PHP installed headers prefix... /usr/local/include/php
#5 2.668 checking if debug is enabled... no
#5 2.685 checking if zts is enabled... no
#5 2.702 checking for gawk... no
#5 2.703 checking for nawk... nawk
#5 2.703 checking if nawk is broken... no
#5 2.705 checking whether to enable sockets support... yes, shared
#5 2.709 checking for hstrerror... yes
#5 2.752 checking for if_nametoindex... yes
#5 2.795 checking for if_indextoname... yes
#5 2.840 checking for ANSI C header files... yes
#5 2.935 checking for sys/types.h... yes
#5 2.965 checking for sys/stat.h... yes
#5 2.998 checking for stdlib.h... yes
#5 3.027 checking for string.h... yes
#5 3.057 checking for memory.h... yes
#5 3.095 checking for strings.h... yes
#5 3.125 checking for inttypes.h... yes
#5 3.155 checking for stdint.h... yes
#5 3.190 checking for unistd.h... yes
#5 3.225 checking netinet/tcp.h usability... yes
#5 3.252 checking netinet/tcp.h presence... yes
#5 3.265 checking for netinet/tcp.h... yes
#5 3.274 checking sys/un.h usability... yes
#5 3.301 checking sys/un.h presence... yes
#5 3.315 checking for sys/un.h... yes
#5 3.323 checking sys/sockio.h usability... no
#5 3.350 checking sys/sockio.h presence... no
#5 3.364 checking for sys/sockio.h... no
#5 3.364 checking for field ss_family in struct sockaddr_storage... yes
#5 3.388 checking if getaddrinfo supports AI_V4MAPPED... yes
#5 3.414 checking if getaddrinfo supports AI_ALL... yes
#5 3.446 checking if getaddrinfo supports AI_IDN... no
#5 3.536 checking if ancillary credentials uses ucred... no
#5 3.557 checking if ancillary credentials uses cmsgcred... no
#5 3.595 checking for a sed that does not truncate output... /bin/sed
#5 3.599 checking for ld used by cc... /usr/bin/ld
#5 3.604 checking if the linker (/usr/bin/ld) is GNU ld... yes
#5 3.607 checking for /usr/bin/ld option to reload object files... -r
#5 3.607 checking for BSD-compatible nm... /usr/bin/nm -B
#5 3.610 checking whether ln -s works... yes
#5 3.610 checking how to recognize dependent libraries... pass_all
#5 3.626 checking dlfcn.h usability... yes
#5 3.650 checking dlfcn.h presence... yes
#5 3.664 checking for dlfcn.h... yes
#5 3.666 checking the maximum length of command line arguments... 1572864
#5 3.672 checking command to parse /usr/bin/nm -B output from cc object... ok
#5 3.744 checking for objdir... .libs
#5 3.748 checking for ar... ar
#5 3.748 checking for ranlib... ranlib
#5 3.749 checking for strip... strip
#5 3.800 checking if cc supports -fno-rtti -fno-exceptions... no
#5 3.824 checking for cc option to produce PIC... -fPIC
#5 3.825 checking if cc PIC flag -fPIC works... yes
#5 3.851 checking if cc static flag -static works... yes
#5 3.918 checking if cc supports -c -o file.o... yes
#5 3.949 checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
#5 3.967 checking whether -lc should be explicitly linked in... no
#5 3.993 checking dynamic linker characteristics... GNU/Linux ld.so
#5 4.011 checking how to hardcode library paths into programs... immediate
#5 4.011 checking whether stripping libraries is possible... yes
#5 4.014 checking if libtool supports shared libraries... yes
#5 4.014 checking whether to build shared libraries... yes
#5 4.014 checking whether to build static libraries... no
#5 4.198 
#5 4.198 creating libtool
#5 4.220 appending configuration tag "CXX" to libtool
#5 4.294 configure: patching config.h.in
#5 4.297 configure: creating ./config.status
#5 4.355 config.status: creating config.h
#5 4.397 /bin/bash /usr/src/php/ext/sockets/libtool --mode=compile cc -I. -I/usr/src/php/ext/sockets -I/usr/src/php/ext/sockets/include -I/usr/src/php/ext/sockets/main -I/usr/src/php/ext/sockets -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/sockets/sockets.c -o sockets.lo 
#5 4.496 mkdir .libs
#5 4.499  cc -I. -I/usr/src/php/ext/sockets -I/usr/src/php/ext/sockets/include -I/usr/src/php/ext/sockets/main -I/usr/src/php/ext/sockets -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/sockets/sockets.c  -fPIC -DPIC -o .libs/sockets.o
#5 5.107 /bin/bash /usr/src/php/ext/sockets/libtool --mode=compile cc -I. -I/usr/src/php/ext/sockets -I/usr/src/php/ext/sockets/include -I/usr/src/php/ext/sockets/main -I/usr/src/php/ext/sockets -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/sockets/multicast.c -o multicast.lo 
#5 5.211  cc -I. -I/usr/src/php/ext/sockets -I/usr/src/php/ext/sockets/include -I/usr/src/php/ext/sockets/main -I/usr/src/php/ext/sockets -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/sockets/multicast.c  -fPIC -DPIC -o .libs/multicast.o
#5 5.397 /bin/bash /usr/src/php/ext/sockets/libtool --mode=compile cc -I. -I/usr/src/php/ext/sockets -I/usr/src/php/ext/sockets/include -I/usr/src/php/ext/sockets/main -I/usr/src/php/ext/sockets -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/sockets/conversions.c -o conversions.lo 
#5 5.496  cc -I. -I/usr/src/php/ext/sockets -I/usr/src/php/ext/sockets/include -I/usr/src/php/ext/sockets/main -I/usr/src/php/ext/sockets -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/sockets/conversions.c  -fPIC -DPIC -o .libs/conversions.o
#5 5.845 /bin/bash /usr/src/php/ext/sockets/libtool --mode=compile cc -I. -I/usr/src/php/ext/sockets -I/usr/src/php/ext/sockets/include -I/usr/src/php/ext/sockets/main -I/usr/src/php/ext/sockets -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/sockets/sockaddr_conv.c -o sockaddr_conv.lo 
#5 5.947  cc -I. -I/usr/src/php/ext/sockets -I/usr/src/php/ext/sockets/include -I/usr/src/php/ext/sockets/main -I/usr/src/php/ext/sockets -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/sockets/sockaddr_conv.c  -fPIC -DPIC -o .libs/sockaddr_conv.o
#5 6.075 /bin/bash /usr/src/php/ext/sockets/libtool --mode=compile cc -I. -I/usr/src/php/ext/sockets -I/usr/src/php/ext/sockets/include -I/usr/src/php/ext/sockets/main -I/usr/src/php/ext/sockets -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/sockets/sendrecvmsg.c -o sendrecvmsg.lo 
#5 6.177  cc -I. -I/usr/src/php/ext/sockets -I/usr/src/php/ext/sockets/include -I/usr/src/php/ext/sockets/main -I/usr/src/php/ext/sockets -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/sockets/sendrecvmsg.c  -fPIC -DPIC -o .libs/sendrecvmsg.o
#5 6.270 /usr/src/php/ext/sockets/sendrecvmsg.c: In function 'init_ancillary_registry':
#5 6.270 /usr/src/php/ext/sockets/sendrecvmsg.c:128:19: error: invalid application of 'sizeof' to incomplete type 'struct cmsgcred'
#5 6.270   128 |  PUT_ENTRY(sizeof(struct cmsgcred), 0, 0, from_zval_write_ucred,
#5 6.270       |                   ^~~~~~
#5 6.270 /usr/src/php/ext/sockets/sendrecvmsg.c:99:17: note: in definition of macro 'PUT_ENTRY'
#5 6.270    99 |  entry.size   = sizev; \
#5 6.270       |                 ^~~~~
#5 6.273 /usr/src/php/ext/sockets/sendrecvmsg.c:129:36: error: 'SCM_CREDS' undeclared (first use in this function)
#5 6.273   129 |    to_zval_read_ucred, SOL_SOCKET, SCM_CREDS);
#5 6.273       |                                    ^~~~~~~~~
#5 6.273 /usr/src/php/ext/sockets/sendrecvmsg.c:105:19: note: in definition of macro 'PUT_ENTRY'
#5 6.273   105 |  key.cmsg_type  = type; \
#5 6.273       |                   ^~~~
#5 6.273 /usr/src/php/ext/sockets/sendrecvmsg.c:129:36: note: each undeclared identifier is reported only once for each function it appears in
#5 6.273   129 |    to_zval_read_ucred, SOL_SOCKET, SCM_CREDS);
#5 6.273       |                                    ^~~~~~~~~
#5 6.273 /usr/src/php/ext/sockets/sendrecvmsg.c:105:19: note: in definition of macro 'PUT_ENTRY'
#5 6.273   105 |  key.cmsg_type  = type; \
#5 6.273       |                   ^~~~
#5 6.281 make: *** [Makefile:216: sendrecvmsg.lo] Error 1
------
executor failed running [/bin/sh -c docker-php-ext-install sockets]: exit code: 2

The same build works fine with PHP 8.0.14

PHP Version

PHP 8.0.15

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions