static-php-cli icon indicating copy to clipboard operation
static-php-cli copied to clipboard

gcc 15 building shared extensions: segfault when running `php -d extension=memcache --ri memcache`

Open henderkes opened this issue 2 months ago • 3 comments

Not sure what this is about. Perhaps C23 default makes the code misbehave?

Edit: mysqli too!

/home/m/spc-packages/vendor/crazywhalecc/static-php-cli/buildroot/bin/php -n -d "extension_dir=/home/m/spc-packages/vendor/crazywhalecc/static-php-cli/buildroot/modules" -d "extension=mysqlnd" -d "extension=mysqli" --ri "mysqli"
Segmentation fault (core dumped)

henderkes avatar Dec 05 '25 12:12 henderkes

I'm currently mainly focused on refactoring work, so I may not have much energy to dedicate to the build bugs for specific behavior. If you're willing to take over, please assign it to yourself; otherwise, make this into milestone and I will leave it until finishing major 3.0 part.

crazywhalecc avatar Dec 06 '25 08:12 crazywhalecc

Forgot to assign myself, I did some good progress but somehow regressed spx into a build failure. Probably linked to setting c17 instead of gnu17 in my tests.

henderkes avatar Dec 06 '25 08:12 henderkes

With it empty it compiles again, but the extensions segfault. This will have to stay open for two weeks until I'm back.

henderkes avatar Dec 06 '25 09:12 henderkes

Right now I have all libraries and SAPI's building fine with gcc 15. But when building shared extensions, they still produce segfaults.

Building libraries + sapi with gcc 15 but then building extensions with gcc 14 works with no issues.

henderkes avatar Jan 03 '26 00:01 henderkes

It's patchelf. Dropping it. Looking for a way to properly take care of soname for phpize'd shared libraries instead.

henderkes avatar Jan 03 '26 16:01 henderkes

Gcc 15 ready in fixes branch.

henderkes avatar Jan 04 '26 02:01 henderkes