Skip to content

xdebug installation fails on 8.x debian (missing lib/php-header.h) #613

@schmunk42

Description

@schmunk42

Version of install-php-extensions

v.1.5.29

Error description

Build fails in Docker build for RUN install-php-extensions xdebug.
With fatal error: lib/php-header.h: No such file or directory

See for example https://github.com/yiisoft/yii-docker/runs/7444548717?check_suite_focus=true#step:6:752 - also tested with the command above.

2: compilation terminated.
2: make: *** [Makefile:286: src/lib/lib.lo] Error 1
2:  cc -I. -I/tmp/pickle.tmp/xdebug/xdebug-3.2.0alpha1 -I/tmp/pickle.tmp/pickle-7f747bef79dcb11e3af9f2d35a5c23574d431cf4/include -I/tmp/pickle.tmp/pickle-7f747bef79dcb11e3af9f2d35a5c23574d431cf4/main -I/tmp/pickle.tmp/xdebug/xdebug-3.2.0alpha1 -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 -I/tmp/pickle.tmp/xdebug/xdebug-3.2.0alpha1/src -I/tmp/pickle.tmp/pickle-7f747bef79dcb11e3af9f2d35a5c23574d431cf4/src -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pickle.tmp/xdebug/xdebug-3.2.0alpha1/src/lib/usefulstuff.c -MMD -MF src/lib/usefulstuff.dep -MT src/lib/usefulstuff.lo  -fPIC -DPIC -o src/lib/.libs/usefulstuff.o
2: make: *** [Makefile:304: src/lib/var.lo] Error 1
2: make: *** [Makefile:262: src/base/base.lo] Error 1
2: /tmp/pickle.tmp/xdebug/xdebug-3.2.0alpha1/src/lib/compat.c:42:10: fatal error: lib/php-header.h: No such file or directory
2:    42 | #include "lib/php-header.h"
2:       |          ^~~~~~~~~~~~~~~~~~
2: compilation terminated.
2: make: *** [Makefile:271: src/lib/compat.lo] Error 1
2: /tmp/pickle.tmp/xdebug/xdebug-3.2.0alpha1/src/lib/str.c:23:10: fatal error: lib/php-header.h: No such file or directory
2:    23 | #include "lib/php-header.h"
2:       |          ^~~~~~~~~~~~~~~~~~
2: compilation terminated.
2: make: *** [Makefile:298: src/lib/str.lo] Error 1
2: In file included from /tmp/pickle.tmp/xdebug/xdebug-3.2.0alpha1/src/lib/usefulstuff.c:33:
2: /tmp/pickle.tmp/xdebug/xdebug-3.2.0alpha1/php_xdebug.h:28:10: fatal error: lib/php-header.h: No such file or directory
2:    28 | #include "lib/php-header.h"
2:       |          ^~~~~~~~~~~~~~~~~~
2: compilation terminated.
2: make: *** [Makefile:268: src/lib/usefulstuff.lo] Error 1The command '/bin/sh -c install-php-extensions         xdebug' returned a non-zero code: 1

Docker image

php:8.x

Minimal Dockerfile

FROM php:8.1-apache
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions \
        xdebug

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions