-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building 8.4beta1 fail with clang on x86(64) #15384
Comments
The first one is related to #15152. |
Here, for the SHA-NI related errors, setting some additional CFLAGS like For example:
But we probably need to add that also to the build system files somewhere appropriately. Basically, only hash_sha_ni.c file needs additional compile options (was quickly tested in CMake and works ok). As for the 2nd error on 32-bit build, attributes are not defined properly in zend_portability.h. This check is a bit basic if you ask me:
|
Yeah, but dynamic detection of the CPU features is supposed to be supported. Might be able to solve this with #15312 (when finished).
I don't think FASTCALL makes sense for variadic functions. See #15389. |
Ok. I see. Better, yes. Thanks. |
I confirm the problem on Alpine. Unfortunately, 65c6d72 doesn't solve the first error. It seems the issue is that php-src/ext/hash/hash_sha_ni.c Lines 34 to 36 in bf1b0eb
Lines 524 to 527 in bf1b0eb
Removing the musl exclusion fixes the problem for me (after 65c6d72). I don't know if ifuncs are well supported by musl, but I assume that I think we should not compile |
@arnaud-lb, please see #15312, which is work in progress. Originally meant to support dynamic SHANI detection for MSVC, but may be extended. Especially see #15312 (comment) what might solve the problem (I hadn't had time to address that yet). PS: oh, and feel free to commit fixes to that PR. :) |
Oh nice. #15312 fixes the Alpine issue for me 👍 I will take a closer look tomorrow |
Used patch with variadics and gonna add #15312 next, meantime build using gcc14 fails on x86 as well |
Build passed, thank you a lot for quick fixes! btw x86 (32-bit) has only 3 warnings
|
…on of SHA256_Transform_shani This fixes the build for amd64 platforms that do not have `HAVE_FUNC_ATTRIBUTE_TARGET`, specifically Alpine/Musl as of now. Closes phpGH-15384. Related to phpGH-15312.
Indeed. I have done this in #15404 as the minimal patch to fix the Alpine build issue. I've confirmed it against the Alpine Docker Image. |
I wonder how many users may be affected by this, and whether we should release beta2 this week (with an appropriate fix cherry-picked)? /cc @NattyNarwhal |
FWIW I've been using clang on Mac, but breaking on x86 is obviously pretty bad. If things are in a good state right now, I'll build a beta2. |
To clarify: This is not a clang issue, but a non-glibc issue. |
It's safe to tag a beta2, yes, with what is in master branch. Not ideal like a final release, but a nice beta2 state. |
Confirm, that 2 patches in enough to pass for 8 arches |
@NattyNarwhal can you just recheck if correct patches are in the current beta 2 tag? Because it seems that this one isn't added yet. |
Indeed. It appears that the Edit: Not quite a copy, because of the commit Ilija snuck in during the release procedure, but definitely not up to date. |
Ugh, I had a git incident and it branched from the wrong point. I can push beta2 again, or would it be better to just call it beta3? |
Tag replacement is a no-no, because folks might already have the broken tag. It (unfortunately) should be a Beta 3. |
Oh, yep, looks beta3 is better option |
I'm pushing beta3, which should have the actual fix. Sorry for the embarrassing git mistake. |
Thank you! Awaiting announce to start fixing Drupal for compatibility) Meantime all arches passed on Alpinelinux |
I've just remembered and sorry about polluting this PR here. Should the API numbers like ZEND_MODULE_API_NO, PHP_API_VERSION, ZEND_VERSION and similar be also bumped or does this happen in RC phase? EDIT: Ah, ok! That is done in the RC1 (noted in the release-process.md file). All good then. |
Yeah, I have to keep double-checking, but:
|
Description
Attempted to build for Alpine fresh beta and it fails on x86 and x86_64
As I can find it was fixed earlier in #2975
Logs x86_64
and x86
PHP Version
PHP 8.4.0beta1
Operating System
Alpinelinux
The text was updated successfully, but these errors were encountered: