Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

78
Vistas
Error installing sockets php extension inside docker

Inside dockerfile:

docker-php-ext-install sockets

Gives these errors, on docker build (I used same dockerfile for days but today it appears this new error):

/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'
  128 |  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'
   99 |  entry.size   = sizev; \
      |                 ^~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:129:36: error: 'SCM_CREDS' undeclared (first use in this function)
  129 |    to_zval_read_ucred, SOL_SOCKET, SCM_CREDS);
      |                                    ^~~~~~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:105:19: note: in definition of macro 'PUT_ENTRY'
  105 |  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
  129 |    to_zval_read_ucred, SOL_SOCKET, SCM_CREDS);
      |                                    ^~~~~~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:105:19: note: in definition of macro 'PUT_ENTRY'
  105 |  key.cmsg_type  = type; \
      |                   ^~~~
make: *** [Makefile:213: sendrecvmsg.lo] Error 1
make: *** Waiting for unfinished jobs....
over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Adding to the answer posted by @user8998926

You can find several workarounds in the docker-library issue posted here: https://github.com/docker-library/php/issues/1245

The easiest being

CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install sockets
over 4 years ago · Santiago Trujillo Denunciar

0

It's a bug in docker images php:8.0.15 and php:8.1.2 for alpine & bullseye.

The fix is pending merge, in my case i've stick with a previous version in order to build.

It's being tracked here: https://github.com/php/php-src/issues/7978

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda