[Bug]: 第三方clang编译错误
Fyg369 opened this issue · 53 comments
CheckBox
- I have searched the issue list and found no similar issues.
- I use the official action instead of someone else's
- I have read the FAQ section in README.md
Configuration
kernel-url: https://github.com/AcmeUI-Devices/android_kernel_xiaomi_cas
kernel-dir: msm-4.19
kernel-branch: taffy
config: cas_defconfig
arch: arm64
aosp-gcc: true
aosp-clang: false
other-clang-url: https://github.com/kdrag0n/proton-clang
other-clang-branch: master
ksu: true
ksu-version: main
android-version: 12
aosp-clang-version: r383902
disable-lto: true
anykernel3: true
Describe the bug
我Fork了您的仓库,仅修改配置为第三方clang,编译错误如下图所示,之前都是OK的,目前还未找到原因,希望大佬有时间指点一下谢谢啦
Screenshots
How to reproduce
No response
Expected behavior
No response
Error Logs
No response
Additional context
No response
full log pls
full log pls
name: CI
on:
push:
branches: main
pull_request:
jobs:
lint:
uses: ./.github/workflows/check.yml
ci-test:
needs:
- lint
name: Build Kernel
strategy:
fail-fast: false
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Kernel
uses: ./
with:
kernel-url: https://github.com/AcmeUI-Devices/android_kernel_xiaomi_cas
kernel-dir: msm-4.19
kernel-branch: taffy
config: cas_defconfig
arch: arm64
aosp-gcc: true
aosp-clang: false
other-clang-url: https://github.com/kdrag0n/proton-clang
other-clang-branch: master
ksu: true
ksu-version: main
android-version: 12
aosp-clang-version: r383902
disable-lto: true
anykernel3: true
请提供完整日志
https://github.com/Fyg369/kernel_build_action/actions/runs/11309630193/job/31453671165
Building Kernel with selected cross compiler
mkdir: created directory 'out'
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2.
请提供完整日志
https://github.com/Fyg369/kernel_build_action/actions/runs/11309630193/job/31453671165
Building Kernel with selected cross compiler mkdir: created directory 'out' make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' HOSTCC scripts/basic/fixdep GEN ./Makefile /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 collect2: error: ld returned 1 exit status make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1 make[2]: *** [../Makefile:492: scripts_basic] Error 2 make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2 make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' make: *** [Makefile:153: sub-make] Error 2 Error: Process completed with exit code 2.
请提供完整日志
https://github.com/Fyg369/kernel_build_action/actions/runs/11309630193/job/31453671165
Building Kernel with selected cross compiler mkdir: created directory 'out' make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' HOSTCC scripts/basic/fixdep GEN ./Makefile /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 collect2: error: ld returned 1 exit status make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1 make[2]: *** [../Makefile:492: scripts_basic] Error 2 make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2 make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' make: *** [Makefile:153: sub-make] Error 2 Error: Process completed with exit code 2.
Building Kernel with selected cross compiler
mkdir: created directory 'out'
using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu-
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2.
After testing, the above compilation error still exists
After testing, the above compilation error still exists
你这个clang里面有ld?
After testing, the above compilation error still exists
你这个clang里面有ld?
具体我也不清楚有没有id,,之前用都是正常的,自从改了如下图箭头所标的位置,就会出现上面编译错误
这是它的链接https://github.com/kdrag0n/proton-clang
具体我也不清楚有没有id,,之前用都是正常的,自从改了如下图箭头所标的位置,就会出现上面编译错误
这是它的链接https://github.com/kdrag0n/proton-clang
你把actions里所有的check都删掉就行了
9
具体我也不清楚有没有id,,之前用都是正常的,自从改了如下图箭头所标的位置,就会出现上面编译错误
这是它的链接https://github.com/kdrag0n/proton-clang你把actions里所有的check都删掉就行了
9
具体我也不清楚有没有id,,之前用都是正常的,自从改了如下图箭头所标的位置,就会出现上面编译错误
这是它的链接https://github.com/kdrag0n/proton-clang你把actions里所有的check都删掉就行了
y
9
具体我也不清楚有没有id,,之前用都是正常的,自从改了如下图箭头所标的位置,就会出现上面编译错误
这是它的链接https://github.com/kdrag0n/proton-clang你把actions里所有的check都删掉就行了
y
删除后的编译日志
Building Kernel with selected cross compiler
mkdir: created directory 'out'
using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu-
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2.
之前用都是正常的,自从改了如下图箭头所标的位置,就会出现上面编译错误
v1.6.3呢
要不重新fork一下看看
重新fok编译错误日志
Building Kernel with selected cross compiler
mkdir: created directory 'out'
using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu-
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2.
要不重新fork一下看看
重新fok编译错误日志
Building Kernel with selected cross compiler
mkdir: created directory 'out'
using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu-
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2.
/home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
aosp-gcc选项为关?
要不重新fork一下看看
重新fok编译错误日志
Building Kernel with selected cross compiler
mkdir: created directory 'out'
using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu-
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2./home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
aosp-gcc选项为关?
name: CI
on:
push:
branches: main
pull_request:
jobs:
lint:
uses: ./.github/workflows/check.yml
ci-test:
needs:
- lint
name: Build Kernel
strategy:
fail-fast: false
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Kernel
uses: ./
with:
kernel-url: https://github.com/AcmeUI-Devices/android_kernel_xiaomi_cas
kernel-dir: msm-4.19
kernel-branch: taffy
config: cas_defconfig
arch: arm64
aosp-gcc: true
aosp-clang: false
other-clang-url: https://github.com/kdrag0n/proton-clang
other-clang-branch: master
ksu: true
ksu-version: main
android-version: 12
aosp-clang-version: r383902
disable-lto: true
anykernel3: true
自从改了如下图箭头所标的位置,就会出现上面编译错误
要是不改呢
自从改了如下图箭头所标的位置,就会出现上面编译错误
要是不改呢
不用第三方编译链工具可以编译成功,大佬可以尝试使用第三方编译工具绝对报错
v1.6.3可以用第三方编译工具链,没问题不会编译错误
我记得v1.7.0没改编译逻辑啊
try 67b798c
根据错误提示貌似还是编译器路径问题,好像使用的是系统默认的编译器,没有使用到第三方编译器。
Building Kernel with selected cross compiler
mkdir: created directory 'out'
using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu-
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2.
改回之前的代码编译错误和之前一样
Building Kernel with selected cross compiler
mkdir: created directory 'out'
using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu-
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
/bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2.
改回之前的代码编译错误和之前一样
Building Kernel with selected cross compiler mkdir: created directory 'out' using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu- make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' /bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found /bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found HOSTCC scripts/basic/fixdep GEN ./Makefile /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 collect2: error: ld returned 1 exit status make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1 make[2]: *** [../Makefile:492: scripts_basic] Error 2 make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2 make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' make: *** [Makefile:153: sub-make] Error 2 Error: Process completed with exit code 2.
改回之前的代码编译错误和之前一样
Building Kernel with selected cross compiler mkdir: created directory 'out' using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu- make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' /bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found /bin/sh: 1: /home/runner/gcc-64/bin/aarch64-linux-android-gcc: not found HOSTCC scripts/basic/fixdep GEN ./Makefile /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 collect2: error: ld returned 1 exit status make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1 make[2]: *** [../Makefile:492: scripts_basic] Error 2 make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2 make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' make: *** [Makefile:153: sub-make] Error 2 Error: Process completed with exit code 2.
现在gcc没有的问题解决了,但还是编译错误,总感觉没用到第三方编译,只用到系统默认的编译器一样
Building Kernel with selected cross compiler
mkdir: created directory 'out'
using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu- CC=clang
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2.
0a0cd13
…
________________________________ From: Fyg369 @.> Sent: Friday, October 25, 2024 11:26:46 AM To: dabao1955/kernel_build_action @.> Cc: dabao1955 @.>; State change @.> Subject: Re: [dabao1955/kernel_build_action] [Bug]: 第三方clang编译错误 (Issue #37) 突然发现一个问题,启用3rd clang,会导致没有下载AOSP GCC 1.png (view on web)https://github.com/user-attachments/assets/9bc3b955-08ce-46d0-a7c6-1bf900e9e976 启用AOSP clang,可以正常下载AOSP GCC 2.png (view on web)https://github.com/user-attachments/assets/95cbf2d9-1edc-4fcb-9c63-56f9bc7fb8af 这可能是导致启用第三方编译工具编译错误问题所在 ― Reply to this email directly, view it on GitHub<#37 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS5CH5LEHVE5U26R7QU2J3DZ5G27NAVCNFSM6AAAAABPW45ABKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZWG42DANZRHE. You are receiving this because you modified the open/close state.Message ID: @.***>
简直无语了,启用第三方编译器,始终指向linux-x86
Building Kernel with selected cross compiler
mkdir: created directory 'out'
using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu- CC=clang
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2.
难绷,在ci上添加extra-cmd: LD=ld.lld LLVM_AS=1就可以了,应该是里面有ld文件而且没有指定连接器就默认用ld了 获取Outlook for Androidhttps://aka.ms/AAb9ysg
…
________________________________ From: Fyg369 @.> Sent: Friday, October 25, 2024 2:26:29 PM To: dabao1955/kernel_build_action @.> Cc: dabao1955 @.>; State change @.> Subject: Re: [dabao1955/kernel_build_action] [Bug]: 第三方clang编译错误 (Issue #37) 0a0cd13<0a0cd13> …
________________________________ From: Fyg369 @.> Sent: Friday, October 25, 2024 11:26:46 AM To: dabao1955/kernel_build_action @.> Cc: dabao1955 @.>; State change @.> Subject: Re: [dabao1955/kernel_build_action] [Bug]: 第三方clang编译错误 (Issue #37<#37>) 突然发现一个问题,启用3rd clang,会导致没有下载AOSP GCC 1.png (view on web)https://github.com/user-attachments/assets/9bc3b955-08ce-46d0-a7c6-1bf900e9e976 启用AOSP clang,可以正常下载AOSP GCC 2.png (view on web)https://github.com/user-attachments/assets/95cbf2d9-1edc-4fcb-9c63-56f9bc7fb8af 这可能是导致启用第三方编译工具编译错误问题所在 D Reply to this email directly, view it on GitHub<#37 (comment)<#37 (comment)>>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS5CH5LEHVE5U26R7QU2J3DZ5G27NAVCNFSM6AAAAABPW45ABKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZWG42DANZRHE. You are receiving this because you modified the open/close state.Message ID: @.> 简直无语了,启用第三方编译器,始终指向linux-x86 Building Kernel with selected cross compiler mkdir: created directory 'out' using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu- CC=clang make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' HOSTCC scripts/basic/fixdep GEN ./Makefile /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 collect2: error: ld returned 1 exit status make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1 make[2]: *** [../Makefile:492: scripts_basic] Error 2 make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2 make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' make: *** [Makefile:153: sub-make] Error 2 Error: Process completed with exit code 2. ― Reply to this email directly, view it on GitHub<#37 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS5CH5LERJKLT3XFAZRDX2LZ5HQBLAVCNFSM6AAAAABPW45ABKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZWHE3TQOJWGA. You are receiving this because you modified the open/close state.Message ID: @.>
看来这个问题一时半会解决不了
Building Kernel with selected cross compiler
mkdir: created directory 'out'
using command: make -j4 cas_defconfig ARCH=arm64 all LD=ld.lld LLVM_AS=1 O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu- CC=clang
make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
HOSTCC scripts/basic/fixdep
GEN ./Makefile
/home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section
.relr.dyn'
/home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [../Makefile:492: scripts_basic] Error 2
make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out'
make: *** [Makefile:153: sub-make] Error 2
Error: Process completed with exit code 2.
我把里面的ld删了就可以了 获取Outlook for Androidhttps://aka.ms/AAb9ysg
…
________________________________ From: Fyg369 @.> Sent: Friday, October 25, 2024 3:23:51 PM To: dabao1955/kernel_build_action @.> Cc: dabao1955 @.>; State change @.> Subject: Re: [dabao1955/kernel_build_action] [Bug]: 第三方clang编译错误 (Issue #37) 难绷,在ci上添加extra-cmd: LD=ld.lld LLVM_AS=1就可以了,应该是里面有ld文件而且没有指定连接器就默认用ld了 获取Outlook for Androidhttps://aka.ms/AAb9ysg …
________________________________ From: Fyg369 @.> Sent: Friday, October 25, 2024 2:26:29 PM To: dabao1955/kernel_build_action @.> Cc: dabao1955 @.>; State change @.> Subject: Re: [dabao1955/kernel_build_action] [Bug]: 第三方clang编译错误 (Issue #37<#37>) 0a0cd130a0cd13<0a0cd130a0cd13> …
________________________________ From: Fyg369 @.> Sent: Friday, October 25, 2024 11:26:46 AM To: dabao1955/kernel_build_action @.> Cc: dabao1955 @.>; State change @.> Subject: Re: [dabao1955/kernel_build_action] [Bug]: 第三方clang编译错误 (Issue #37<#37><#37#37>) 突然发现一个问题,启用3rd clang,会导致没有下载AOSP GCC 1.png (view on web)https://github.com/user-attachments/assets/9bc3b955-08ce-46d0-a7c6-1bf900e9e976 启用AOSP clang,可以正常下载AOSP GCC 2.png (view on web)https://github.com/user-attachments/assets/95cbf2d9-1edc-4fcb-9c63-56f9bc7fb8af 这可能是导致启用第三方编译工具编译错误问题所在 D Reply to this email directly, view it on GitHub<#37<#37> (comment)<#37 (comment)<#37 (comment)>>>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS5CH5LEHVE5U26R7QU2J3DZ5G27NAVCNFSM6AAAAABPW45ABKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZWG42DANZRHE. You are receiving this because you modified the open/close state.Message ID: @.> 简直无语了,启用第三方编译器,始终指向linux-x86 Building Kernel with selected cross compiler mkdir: created directory 'out' using command: make -j4 cas_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu- CC=clang make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' HOSTCC scripts/basic/fixdep GEN ./Makefile /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 collect2: error: ld returned 1 exit status make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1 make[2]: *** [../Makefile:492: scripts_basic] Error 2 make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2 make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' make: *** [Makefile:153: sub-make] Error 2 Error: Process completed with exit code 2. D Reply to this email directly, view it on GitHub<#37 (comment)<#37 (comment)>>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS5CH5LERJKLT3XFAZRDX2LZ5HQBLAVCNFSM6AAAAABPW45ABKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZWHE3TQOJWGA. You are receiving this because you modified the open/close state.Message ID: @.> 看来这个问题一时半会解决不了 Building Kernel with selected cross compiler mkdir: created directory 'out' using command: make -j4 cas_defconfig ARCH=arm64 all LD=ld.lld LLVM_AS=1 O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu- CC=clang make[1]: Entering directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' HOSTCC scripts/basic/fixdep GEN ./Makefile /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2 /home/runner/clang/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section .relr.dyn' /home/runner/clang/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2 collect2: error: ld returned 1 exit status make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1 make[2]: *** [../Makefile:492: scripts_basic] Error 2 make[1]: *** [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/Makefile:293: __build_one_by_one] Error 2 make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-4.19/out' make: *** [Makefile:153: sub-make] Error 2 Error: Process completed with exit code 2. ― Reply to this email directly, view it on GitHub<#37 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS5CH5OL746QZMJHKNMBALDZ5HWYPAVCNFSM6AAAAABPW45ABKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZXGA4DANRWHA. You are receiving this because you modified the open/close state.Message ID: @.**>
具体怎么删除没看到仓库里有代码更新啊
我丢果然可以了。。。。。。
麻了,之前用第三方编译工具,没有出现这个问题啊!!!
感谢大佬给的解决方法,我换了一加6t的内核源码,用extra-cmd: LD=ld.lld LLVM_AS=1这个参数尽然不报错,不需要编译工具里删除ld,顺利编译成功
大佬如果我下载的是.tar.gz第三方编译工具,这段下载代码是否需要改下?
其中两段mkdir clang代码是否要改成mkdir $HOME/clang -p -v
if [ ${{ inputs.aosp-clang }} = false ] && [ ${{ inputs.android-ndk }} = false ]; then
echo "::group:: Downloading 3rd clang"
export OTHER_CLANG_URL=${{ inputs.other-clang-url }}
if [[ "$OTHER_CLANG_URL" == *'.tar.gz' ]]; then
aria2c -o clang.tar.gz "$OTHER_CLANG_URL"
mkdir clang
tar -C $HOME/clang/ -zxvf clang.tar.gz
elif [[ "$OTHER_CLANG_URL" == *'.zip' ]]; then
aria2c -o clang.zip "$OTHER_CLANG_URL"
mkdir clang
unzip clang.zip -d $HOME/clang/
else
git clone "$OTHER_CLANG_URL"
fi
fi
echo "::endgroup::"
做了如下修改,大佬有时间看下是否需要改进?
if [ ${{ inputs.aosp-clang }} = false ] && [ ${{ inputs.android-ndk }} = false ]; then
echo "::group:: Downloading 3rd clang"
export OTHER_CLANG_URL=${{ inputs.other-clang-url }}
if [[ "$OTHER_CLANG_URL" == *'.tar.gz' ]]; then
mkdir $HOME/clang -p -v
aria2c -o clang.tar.gz "$OTHER_CLANG_URL"
tar -C $HOME/clang/ -zxf clang.tar.gz
elif [[ "$OTHER_CLANG_URL" == *'.zip' ]]; then
mkdir $HOME/clang -p -v
aria2c -o clang.zip "$OTHER_CLANG_URL"
unzip -q clang.zip -d $HOME/clang/
elif [[ "$OTHER_CLANG_URL" == *'.tar.xz' ]]; then
mkdir $HOME/clang -p -v
aria2c -o clang.tar.xz "$OTHER_CLANG_URL"
tar -C $HOME/clang/ -xf clang.tar.xz
else
git clone "$OTHER_CLANG_URL"
fi
fi
大佬这个action脚本用第三方编译器还是有点问题
我换这个编译器:https://kali.download/nethunter-images/toolchains/google_clang-10.0.4.tar.xz
编译错误如下:
error: unknown target CPU 'cortex-a55+crypto'
note: valid target CPU values are: cortex-a34, cortex-a35, cortex-a53, cortex-a55, cortex-a510, cortex-a57, cortex-a65, cortex-a65ae, cortex-a72, cortex-a73, cortex-a75, cortex-a76, cortex-a76ae, cortex-a77, cortex-a78, cortex-a78c, cortex-a710, cortex-r82, cortex-x1, cortex-x1c, cortex-x2, neoverse-e1, neoverse-n1, neoverse-n2, neoverse-512tvb, neoverse-v1, cyclone, apple-a7, apple-a8, apple-a9, apple-a10, apple-a11, apple-a12, apple-a13, apple-a14, apple-m1, apple-s4, apple-s5, exynos-m3, exynos-m4, exynos-m5, falkor, saphira, kryo, thunderx2t99, thunderx3t110, thunderx, thunderxt88, thunderxt81, thunderxt83, tsv110, a64fx, carmel
CC arch/arm64/crypto/aes-ce-ccm-glue.o
make[3]: *** [../scripts/Makefile.build:340: arch/arm64/crypto/aes-ce-cipher-core.o] Error 1
make[3]: *** Waiting for unfinished jobs....
CC arch/arm64/kernel/smp_spin_table.o
make[2]: *** [../Makefile:1143: arch/arm64/crypto] Error 2
make[2]: *** Waiting for unfinished jobs....
CC arch/arm64/kernel/topology.o
AS arch/arm64/kernel/smccc-call.o
CC arch/arm64/kernel/sys32.o
AS arch/arm64/kernel/kuser32.o
CC arch/arm64/kernel/signal32.o
CC arch/arm64/kernel/sys_compat.o
AS arch/arm64/kernel/entry32.o
CC arch/arm64/kernel/arm64ksyms.o
CC arch/arm64/kernel/module.o
CC arch/arm64/kernel/module-plts.o
CC arch/arm64/kernel/perf_regs.o
CC arch/arm64/kernel/perf_callchain.o
CC arch/arm64/kernel/perf_event.o
CC arch/arm64/kernel/perf_trace_counters.o
CC arch/arm64/kernel/perf_trace_user.o
CC arch/arm64/kernel/hw_breakpoint.o
AS arch/arm64/kernel/sleep.o
CC arch/arm64/kernel/cpuidle.o
CC arch/arm64/kernel/suspend.o
CC arch/arm64/kernel/jump_label.o
CC arch/arm64/kernel/pci.o
CC arch/arm64/kernel/armv8_deprecated.o
CC arch/arm64/kernel/kaslr.o
CC arch/arm64/kernel/ssbd.o
LD arch/arm64/kernel/probes/built-in.o
AS arch/arm64/kernel/head.o
LDS arch/arm64/kernel/vmlinux.lds
OBJCOPY arch/arm64/kernel/vdso/vdso.so
AS arch/arm64/kernel/vdso/vdso.o
LD arch/arm64/kernel/vdso/built-in.o
LD arch/arm64/kernel/built-in.o
make[1]: Leaving directory '/home/runner/work/Kernel-Action/Kernel-Action/kernel/ksu/out'
make[1]: *** [/home/runner/work/Kernel-Action/Kernel-Action/kernel/ksu/Makefile:567: __build_one_by_one] Error 2
make: *** [Makefile:154: sub-make] Error 2
Error: Process completed with exit code 2.
我在本地重新安装乌班图编译,版本ubuntu-20.04.6,同样的内核源码和编译工具可以正常编译成功
终端安装依赖包和action.yml里一摸一样
sudo apt-get update
sudo apt-get install --no-install-recommends -y binutils git make bc bison openssl curl zip kmod cpio flex libelf-dev libssl-dev libtfm-dev libc6-dev device-tree-compiler ca-certificates python3 xz-utils libc6-dev aria2 build-essential ccache
本地编译命令:
export PATH=$PATH:/home/mmp/clang/bin
export LLVM=1
export ARCH=arm64
export SUBARCH=arm64
export BUILD_INITRAMFS=1
export CLANG_TRIPLE=aarch64-linux-gnu-
export CROSS_COMPILE=/home/mmp/gcc-64/bin/aarch64-linux-android-
export COMPILE_ARM32=/home/mmp/gcc-32/bin/arm-linux-androideabi-
make ARCH=arm64 O=out mcd_ksu_defconfig
make CC=clang ARCH=arm64 O=out -j$(nproc --all) 2>&1 | tee build.log
大佬能否添加一个自定义第三方gcc的功能?
-
name: Download Custom-Gcc
if: env.USE_CUSTOM_GCC_64 == 'true' || env.USE_CUSTOM_GCC_32 == 'true'
run: |
cd $GITHUB_WORKSPACE/kernel_workspace
if [ ${{ env.USE_CUSTOM_GCC_64 }} = true ]; then
if [[ ${{ env.CUSTOM_GCC_64_SOURCE }} =~ git ]]; then
if [[ ${{ env.CUSTOM_GCC_64_SOURCE }} == *'.tar.gz' ]]; then
wget -O gcc-64.tar.gz ${{ env.CUSTOM_CLANG_SOURCE }}
mkdir gcc-64
tar -C gcc-64/ -zxvf gcc-64.tar.gz
else
git clone ${{ env.CUSTOM_GCC_64_SOURCE }} -b ${{ env.CUSTOM_GCC_64_BRANCH }} gcc-64 --depth=1
fi
else
wget -O gcc-64.zip ${{ env.CUSTOM_GCC_64_SOURCE }}
mkdir gcc-64
unzip gcc-64.zip -d gcc-64/
fiif [ ${{ env.USE_CUSTOM_GCC_32 }} = true ]; then if [[ ${{ env.CUSTOM_GCC_32_SOURCE }} =~ git ]]; then if [[ ${{ env.CUSTOM_GCC_32_SOURCE }} == *'.tar.gz' ]]; then wget -O gcc-32.tar.gz ${{ env.CUSTOM_CLANG_SOURCE }} mkdir gcc-32 tar -C gcc-32/ -zxvf gcc-32.tar.gz else git clone ${{ env.CUSTOM_GCC_32_SOURCE }} -b ${{ env.CUSTOM_GCC_32_BRANCH }} gcc-32 --depth=1 fi else wget -O gcc-32.zip ${{ env.CUSTOM_GCC_32_SOURCE }} mkdir gcc-32 unzip gcc-32.zip -d gcc-32/ fi
大佬能否添加一个自定义第三方gcc的功能?
* name: Download Custom-Gcc if: env.USE_CUSTOM_GCC_64 == 'true' || env.USE_CUSTOM_GCC_32 == 'true' run: | cd $GITHUB_WORKSPACE/kernel_workspace if [ ${{ env.USE_CUSTOM_GCC_64 }} = true ]; then if [[ ${{ env.CUSTOM_GCC_64_SOURCE }} =~ git ]]; then if [[ ${{ env.CUSTOM_GCC_64_SOURCE }} == *'.tar.gz' ]]; then wget -O gcc-64.tar.gz ${{ env.CUSTOM_CLANG_SOURCE }} mkdir gcc-64 tar -C gcc-64/ -zxvf gcc-64.tar.gz else git clone ${{ env.CUSTOM_GCC_64_SOURCE }} -b ${{ env.CUSTOM_GCC_64_BRANCH }} gcc-64 --depth=1 fi else wget -O gcc-64.zip ${{ env.CUSTOM_GCC_64_SOURCE }} mkdir gcc-64 unzip gcc-64.zip -d gcc-64/ fi if [ ${{ env.USE_CUSTOM_GCC_32 }} = true ]; then if [[ ${{ env.CUSTOM_GCC_32_SOURCE }} =~ git ]]; then if [[ ${{ env.CUSTOM_GCC_32_SOURCE }} == *'.tar.gz' ]]; then wget -O gcc-32.tar.gz ${{ env.CUSTOM_CLANG_SOURCE }} mkdir gcc-32 tar -C gcc-32/ -zxvf gcc-32.tar.gz else git clone ${{ env.CUSTOM_GCC_32_SOURCE }} -b ${{ env.CUSTOM_GCC_32_BRANCH }} gcc-32 --depth=1 fi else wget -O gcc-32.zip ${{ env.CUSTOM_GCC_32_SOURCE }} mkdir gcc-32 unzip gcc-32.zip -d gcc-32/ fi
难度太高,暂不考虑
大佬能否添加一个自定义第三方gcc的功能?
* name: Download Custom-Gcc if: env.USE_CUSTOM_GCC_64 == 'true' || env.USE_CUSTOM_GCC_32 == 'true' run: | cd $GITHUB_WORKSPACE/kernel_workspace if [ ${{ env.USE_CUSTOM_GCC_64 }} = true ]; then if [[ ${{ env.CUSTOM_GCC_64_SOURCE }} =~ git ]]; then if [[ ${{ env.CUSTOM_GCC_64_SOURCE }} == *'.tar.gz' ]]; then wget -O gcc-64.tar.gz ${{ env.CUSTOM_CLANG_SOURCE }} mkdir gcc-64 tar -C gcc-64/ -zxvf gcc-64.tar.gz else git clone ${{ env.CUSTOM_GCC_64_SOURCE }} -b ${{ env.CUSTOM_GCC_64_BRANCH }} gcc-64 --depth=1 fi else wget -O gcc-64.zip ${{ env.CUSTOM_GCC_64_SOURCE }} mkdir gcc-64 unzip gcc-64.zip -d gcc-64/ fi if [ ${{ env.USE_CUSTOM_GCC_32 }} = true ]; then if [[ ${{ env.CUSTOM_GCC_32_SOURCE }} =~ git ]]; then if [[ ${{ env.CUSTOM_GCC_32_SOURCE }} == *'.tar.gz' ]]; then wget -O gcc-32.tar.gz ${{ env.CUSTOM_CLANG_SOURCE }} mkdir gcc-32 tar -C gcc-32/ -zxvf gcc-32.tar.gz else git clone ${{ env.CUSTOM_GCC_32_SOURCE }} -b ${{ env.CUSTOM_GCC_32_BRANCH }} gcc-32 --depth=1 fi else wget -O gcc-32.zip ${{ env.CUSTOM_GCC_32_SOURCE }} mkdir gcc-32 unzip gcc-32.zip -d gcc-32/ fi
难度太高,暂不考虑
我是这样想的,在不改变原有的if [ ${{ inputs.aosp-gcc }} = true ]; then条件下,加入判断下载第三方gcc逻辑代码,只有当下载第三方gcc不满足的情况下,才执行下载原有的AOSP GCC代码,只是我感觉代码有点冗长,需要您指点优化下我提供的如下代码
other-gcc32-url:
required: false
default: ''
other-gcc32-branch:
required: false
default: main
other-gcc64-url:
required: false
default: ''
other-gcc64-branch:
required: false
default: main
if [ ${{ inputs.aosp-gcc }} = true ]; then
if [ -d $HOME/clang ]; then
if [ ! -z ${{ inputs.other-gcc32-url }} ] && [ ! -z ${{ inputs.other-gcc64-url }} ]; then
echo "::group:: Downloading 3rd gcc"
export OTHER_GCC32_URL=${{ inputs.other-gcc32-url }}
export OTHER_GCC64_URL=${{ inputs.other-gcc64-url }}
if [[ "$OTHER_GCC32_URL" == *'.tar.gz' ]]; then
aria2c -o gcc32.tar.gz "$OTHER_GCC32_URL"
mkdir -p $HOME/gcc-32
tar -C $HOME/gcc-32/ -zxvf gcc32.tar.gz
elif [[ "$OTHER_GCC32_URL" == *'.zip' ]]; then
aria2c -o gcc32.zip "$OTHER_GCC32_URL"
mkdir -p $HOME/gcc-32
unzip gcc32.zip -d $HOME/gcc-32/
else
git clone "$OTHER_GCC32_URL" $HOME/gcc-32 --depth=${{ inputs.depth }} -b ${{ inputs.other-gcc32-branch }}
fi
if [[ "$OTHER_GCC64_URL" == *'.tar.gz' ]]; then
aria2c -o gcc64.tar.gz "$OTHER_GCC64_URL"
mkdir -p $HOME/gcc-64
tar -C $HOME/gcc-64/ -zxvf gcc64.tar.gz
elif [[ "$OTHER_GCC64_URL" == *'.zip' ]]; then
aria2c -o gcc64.zip "$OTHER_GCC64_URL"
mkdir -p $HOME/gcc-64
unzip gcc64.zip -d $HOME/gcc-64/
else
git clone "$OTHER_GCC64_URL" $HOME/gcc-64 --depth=${{ inputs.depth }} -b ${{ inputs.other-gcc64-branch }}
fi
else
echo "::group:: Downloading AOSP GCC"
if [ ${{ inputs.aosp-clang }} = true ] || [ ${{ inputs.android.ndk }} = true ]; then
mkdir -p -v $HOME/gcc-64
aria2c -o gcc-aarch64.tar.gz https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/+archive/refs/tags/android-12.1.0_r27.tar.gz
tar -C $HOME/gcc-64 -zxf gcc-aarch64.tar.gz
mkdir -p -v $HOME/gcc-32
aria2c -o gcc-arm.tar.gz https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/+archive/refs/tags/android-12.1.0_r27.tar.gz
tar -C $HOME/gcc-32 -zxf gcc-arm.tar.gz
elif [ ${{ inputs.aosp-clang }} = true ] && [ ${{ inputs.android-ndk }} = true ]; then
echo "Error: The two options aosp-clang and android-ndk will conflict with each other, please turn off one." && exit 15
else
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/ --depth=1 -b android${{ inputs.android-version }}-release $HOME/gcc-64
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/ --depth=1 -b android${{ inputs.android-version }}-release $HOME/gcc-32
fi
fi
fi
fi
这是在保证代码功能不变的情况下简化和优化后的代码
download_gcc() {
local url=$1
local dest_dir=$2
local branch=$3
mkdir -p "$dest_dir"
if [[ "$url" == *'.tar.gz' ]]; then
aria2c -o archive.tar.gz "$url"
tar -C "$dest_dir" -zxf archive.tar.gz
elif [[ "$url" == *'.zip' ]]; then
aria2c -o archive.zip "$url"
unzip archive.zip -d "$dest_dir"
else
git clone "$url" "$dest_dir" --depth=${{ inputs.depth }} -b "$branch"
fi
}
if [ ${{ inputs.aosp-gcc }} = true ]; then
if [ -d $HOME/clang ]; then
if [ -n "${{ inputs.other-gcc32-url }}" ] && [ -n "${{ inputs.other-gcc64-url }}" ]; then
echo "::group:: Downloading 3rd party GCC"
download_gcc "${{ inputs.other-gcc32-url }}" "$HOME/gcc-32" "${{ inputs.other-gcc32-branch }}"
download_gcc "${{ inputs.other-gcc64-url }}" "$HOME/gcc-64" "${{ inputs.other-gcc64-branch }}"
else
echo "::group:: Downloading AOSP GCC"
if [ ${{ inputs.aosp-clang }} = true ] || [ ${{ inputs.android.ndk }} = true ]; then
download_gcc "https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/+archive/refs/tags/android-12.1.0_r27.tar.gz" "$HOME/gcc-64"
download_gcc "https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/+archive/refs/tags/android-12.1.0_r27.tar.gz" "$HOME/gcc-32"
elif [ ${{ inputs.aosp-clang }} = true ] && [ ${{ inputs.android-ndk }} = true ]; then
echo "Error: The options aosp-clang and android-ndk conflict with each other. Please disable one." && exit 15
else
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/ --depth=1 -b android${{ inputs.android-version }}-release "$HOME/gcc-64"
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/ --depth=1 -b android${{ inputs.android-version }}-release "$HOME/gcc-32"
fi
fi
fi
fi
但是gcc的文件名有aarch64-elf-gcc和aarch64-linux-gnu-gcc不好识别
但是gcc的文件名有aarch64-elf-gcc和aarch64-linux-gnu-gcc不好识别
可以先添加后面有问题在优化 哈哈哈
大佬怎么取消了第三方gcc支持 哈哈哈
大佬怎么取消了第三方gcc支持 哈哈哈
你可以提交一个pr过来