Closed TimWolla closed 5 months ago
php -i | grep Debug
says no, as it is built without --enable-debug
, but with -g
in CFLAGS
.
From that build dh_strip
removes the debug symbols, so they can be packaged separately, this way it does not need to be built twice. All packaging for Debian is done similarly.
When debug is set to true, it adds those stripped debug symbols to /var/lib/debug/.build-id
directory. Tools like objdump
and gdb
should pick debuginfo
from there.
Test workflow: https://github.com/shivammathur/test-setup-php/actions/runs/7875037633/workflow
I see. Calling it a “Debug Build Setup” without it actually being a Debug Build of PHP certainly was confusing to me.
Do you plan to provide actual Debug Builds with your Action? If not, I would suggest adding a clarification to the README that the “Debug Build Setup” will just install the debug symbols.
Or perhaps it would make sense to always install the debug symbols, GitHub Actions is for testing and debugging after all and having symbols available at all times certainly would not hurt.
I have tried to improve the documentation for this in https://github.com/shivammathur/setup-php/commit/1a5ac4aa9a4ee5f52acf166f3deebbd514f5735a but switching to debug by default would mean the build size would increase by 3 to 5 times for all, while a very few CI workflows use debug. Ref: https://github.com/shivammathur/php-ubuntu/releases/tag/builds
Describe the bug
Installing a Debug Build as per https://github.com/shivammathur/setup-php?tab=readme-ov-file#debug-build-setup does not appear to work.
Version
v1
orv2
.v2
v1
Runners
Operating systems
ubuntu-latest
PHP versions
Any of 7.4 - 8.3 (possible more).
To Reproduce
Expected behavior
I expected
php -i
to indicate that the PHP build is a debug build.Screenshots/Logs
Additional context
Example run at: https://github.com/TimWolla/setup-php-debug/actions/runs/7874782401
Are you willing to submit a PR?
No, as I could not find where it goes wrong. I confirmed that the
debug
environment variable is properly set.