View Issue Details

IDProjectCategoryView StatusLast Update
0002089XdebugInstallationpublic2022-12-08 18:50
Reporterk0d3r1s Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSAlpineOS Version3.15.4
Target Version3.2devFixed in Version3.2.0 
Summary0002089: Alpine Linux does not support res_ninit
Description

Hi. After https://github.com/xdebug/xdebug/pull/833 into master it is no longer possible to run xdebug on alpine docker image. Configure and make runs fine, there are no errors. But trying to run anything from php (like php -v or phpunit) results in this error:

Warning: Failed loading Zend extension 'xdebug' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/xdebug (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20210902/xdebug: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so (Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so: res_ninit: symbol not found)) in Unknown on line 0

As far as I did debug this, issue here is that 0000833 introduced src/debugger/ip_info.c file with char *xdebug_get_private_nameserver(void) function which uses res_ninit function which is not present on alpine docker image. I'm not sure that if this pull introduced any other missing functions as error happens on this res_ninit one

Steps To Reproduce

Build xdebug from master source using alpine docker image (like alpine:3.15)

actual part from my dockerfile is this:

git clone --single-branch https://github.com/xdebug/xdebug.git \
&& ( \
cd xdebug \
&& phpize \
&& autoupdate \
&& ./configure --enable-xdebug \
&& make -j "$(expr $(nproc) / 2)" \
&& make install \
&& cd .. || exit \
) \
&& docker-php-ext-enable xdebug

Tagsalpine, res_ninit
Operating System
PHP Version8.1-dev

Activities