crazywhalecc / static-php-cli

Build standalone PHP binary on Linux, macOS, FreeBSD, Windows, with PHP project together, with popular extensions included.
https://static-php.dev
MIT License
1.33k stars 233 forks source link

Pack musl-wrapper into musl-toolchain #537

Open crazywhalecc opened 2 months ago

crazywhalecc commented 2 months ago

Solve the version dependency problem of musl-toolchain and musl-wrapper

crazywhalecc commented 3 weeks ago

@DubbleClick Sorry to bother you, but if you have time, I recently encountered some situations when solving this issue.

I saw that gcc has a major version update, and musl-libc has also been upgraded by a version. Do we need to upgrade musl-toolchain to the latest?

Currently I try to build musl-toolchain based on gcc-14 and musl-1.2.5 locally, but segmentation faults will occur when using them to compile php and intl extensions, while the current old version will not, and I haven't researched why yet.

DubbleClick commented 3 weeks ago

Do we need to upgrade musl-toolchain to the latest?

I think we should. I won't be around to take a look at it until I'm back from vacation in two weeks though. I'll set myself a reminder to figure things out.

Currently I try to build musl-toolchain based on gcc-14 and musl-1.2.5 locally, but segmentation faults will occur when using them to compile php and intl extensions, while the current old version will not

Yeeeeah, I ran into that issue before. I believe I created an issue in the php-src repository and there was some progress. PHP plans to make musl-libc a first class citizen in the future too, worst case we will have to wait with a toolchain upgrade until some more if these issues are ironed out.

DubbleClick commented 3 weeks ago

Edit: https://github.com/php/php-src/issues/13877#issuecomment-2315701771

It's only for php 8.4+