-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Important
You can mention the @dosu AI robot, which can quickly answer your questions.
Describe the bug
The one-click script (https://raw.githubusercontent.com/gojue/ecapture/master/builder/init_env.sh) specifies incorrect dependencies for clang-9 and llvm-9, which results in compilation failures on Ubuntu 20.04.
To Reproduce
Steps to reproduce the behavior:
Run the one-click script on a fresh Ubuntu 20.04 installation.
Observe the compilation errors related to clang-9 and llvm-9.
test -f kern/bpf/x86/vmlinux.h || bpftool btf dump file /sys/kernel/btf/vmlinux format c > kern/bpf/x86/vmlinux.h
clang -D__TARGET_ARCH_x86 \
-O2 -mcpu=v1 -nostdinc -Wno-pointer-sign \
-I ./kern -I ./kern/bpf/x86 \
-target bpfel -c kern/boringssl_na_kern.c -o user/bytecode/boringssl_na_kern_core.o \
-fno-ident -fdebug-compilation-dir . -g -D__BPF_TARGET_MISSING="GCC error \"The eBPF is using target specific macros, please provide -target\"" \
-MD -MP || exit 1
clang -D__TARGET_ARCH_x86 \
-O2 -mcpu=v1 -nostdinc -Wno-pointer-sign \
-I ./kern -I ./kern/bpf/x86 \
-DKERNEL_LESS_5_2 \
-target bpfel -c kern/boringssl_na_kern.c -o user/bytecode/boringssl_na_kern_core_less52.o \
-fno-ident -fdebug-compilation-dir . -g -D__BPF_TARGET_MISSING="GCC error \"The eBPF is using target specific macros, please provide -target\"" \
-MD -MP || exit 1
In file included from kern/boringssl_na_kern.c:77:
In file included from ./kern/boringssl_masterkey.h:15:
In file included from ./kern/ecapture.h:20:
./kern/bpf/x86/vmlinux.h:5:15: error: attribute 'preserve_access_index' is not supported by '#pragma clang attribute'
#pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record)
^
./kern/bpf/x86/vmlinux.h:131555:15: error: '#pragma clang attribute pop' with no matching '#pragma clang attribute push'
#pragma clang attribute pop
^
2 errors generated.
make: *** [Makefile:122: kern/boringssl_na_kern.o] Error 1
Manually installing clang-10 and llvm-10 resolved the issue. Please update the one-click script to reflect the correct dependencies.
Screenshots
If applicable, add screenshots to help explain your problem.
Linux Server/Android (please complete the following information):
- Device:
Linux Server
- Kernel Info:
6.6
- eCapture Version: master branch
Additional context
Add any other context about the problem here.