View Issue Details

IDProjectCategoryView StatusLast Update
0002089XdebugInstallationpublic2022-12-08 18:50
Reporterk0d3r1s Assigned Toderick  
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

Issue History

Date Modified Username Field Change
2022-05-10 13:32 k0d3r1s New Issue
2022-05-10 13:32 k0d3r1s Tag Attached: alpine
2022-05-10 13:32 k0d3r1s Tag Attached: res_ninit
2022-05-10 16:01 derick Status new => assigned
2022-05-10 16:01 derick Target Version => 3.2dev
2022-05-10 16:01 derick Summary Unable to use xdebug after 0000833 pull request => Alpine Linux does not support res_ninit
2022-05-10 16:05 derick Note Added: 0006291
2022-05-11 13:27 derick Assigned To => derick
2022-05-11 13:27 derick Status assigned => closed
2022-05-11 13:27 derick Resolution open => fixed
2022-05-11 13:27 derick Fixed in Version => 3.2dev
2022-07-20 15:49 derick Fixed in Version 3.2dev => 3.2.0alpha1
2022-12-08 18:50 derick Fixed in Version 3.2.0alpha1 => 3.2.0