Closed crazywhalecc closed 10 months ago
缺 linux-headers 头文件吧
@jingjingxyk
Package kernel-headers-5.14.0-284.30.1.el9_2.aarch64 is already installed.
Is this a bug with aarch64-linux-musl too, or just the gcc wrapper?
Is this a bug with aarch64-linux-musl too, or just the gcc wrapper?
It seems that it only fails to compile on AlmaLinux-aarch64. It works fine on both alpine and debian of my arm64 architecture.
I meant if it also happened when you build musl-cross-compile (TARGET=aarch64-linux-musl) and then use aarch64-linux-musl to compile php-fpm. I don't have an ARM64 machine, so I cannot test this. :/
I meant if it also happened when you build musl-cross-compile (TARGET=aarch64-linux-musl) and then use aarch64-linux-musl to compile php-fpm. I don't have an ARM64 machine, so I cannot test this. :/
I finally tested on clean debian 12 arm64 platform and use spc doctor --auto-fix
, got the same error:
I can't see the configure command so I don't know if that's musl-gcc wrapper or aarch64-linux-musl compiler.
Maybe I will rent an aarch64 VM to test this.
@DubbleClick I uploaded the entire php-src
and found no useful information so far.
GitHub only allows me to upload files smaller than 25MB, and not in bz2 format, so I can only compress it again.
It's musl-gcc wrapper. Can you try with the cplusplus branch at https://github.com/crazywhalecc/static-php-cli/pull/214? It contains a lot of fixes and might just implicitly tackle this too. It seems to be missing various system headers, but compiling gcc with musl-cross-make will produce new ones.
/usr/bin/ld: /tmp/ccAzYpTF.o: in function `main':
conftest.c:(.text+0x8): undefined reference to `__dns_search
and I remember something about dns problems with aarch64/gcc for static builds.
Either way I will see to get access to an arm64 system that I can test on next week.
I spun up an arm64 almalinux (minimal) vm, installed php, composer and zip, copied spc over, ran spc doctor -> spc build snappy and it worked.
[13:36:03] [INFO] [EXEC] strip --strip-all php-fpm
[13:36:03] [DEBU] Running command with direct output: cd '/opt/static-php-cli/source/php-src/sapi/fpm' && strip --strip-all php-fpm
[13:36:03] [INFO] Deploying fpm file
[13:36:03] [INFO] [EXEC] cp '/opt/static-php-cli/source/php-src/sapi/fpm/php-fpm' '/opt/static-php-cli/buildroot/bin/'
[13:36:03] [DEBU] Running command with direct output: cp '/opt/static-php-cli/source/php-src/sapi/fpm/php-fpm' '/opt/static-php-cli/buildroot/bin/'
[13:36:03] [INFO] Build complete, used 219.747 s !
[13:36:03] [INFO] Static php-fpm binary path: /opt/static-php-cli/buildroot/bin/php-fpm
[13:36:03] [DEBU] Making new directory recursive: /opt/static-php-cli/buildroot/license
[13:36:03] [INFO] License path: /opt/static-php-cli/buildroot/license/
[root@aarch64 static-php-cli]# uname -a
Linux aarch64 5.14.0-284.11.1.el9_2.aarch64 #1 SMP PREEMPT_DYNAMIC Tue May 9 09:48:54 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux```
@DubbleClick How did you install musl? I used the doctor from the default branch.
From the c++ branch pull request (#214 ) it worked right away. I didn't do extensive testing yet because imap fails with an error that makes little sense, but compiling the list of default extensions worked fine.
I don't have much free time this week and may not be able to work on it. I'll be diving into it over the weekend and next week.
No problem, I will be able to get Alpine support done this week so all that's left will be MacOS support.
Build Command
Console Log
System Info
Other Info
Compile pure C program with
__arch64__
successfully..