-
Notifications
You must be signed in to change notification settings - Fork 567
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
build: fix undeclared AUDIT_ARCH_AARCH64 on Linux <3.17 #6441
Conversation
It apparently only exists since Linux kernel version 3.17 (in linux/audit.h)[1]. Partial build log: ../include/seccomp.h:114:25: error: 'AUDIT_ARCH_AARCH64' undeclared (first use in this function); did you mean 'AUDIT_ARCH_SPARC64'? 114 | # define ARCH_NR AUDIT_ARCH_AARCH64 | ^~~~~~~~~~~~~~~~~~ ../include/seccomp.h:198:38: note: in expansion of macro 'ARCH_NR' 198 | BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ARCH_NR, 1, 0), \ | ^~~~~~~ sbox.c:113:25: note: in expansion of macro 'VALIDATE_ARCHITECTURE' 113 | VALIDATE_ARCHITECTURE, | ^~~~~~~~~~~~~~~~~~~~~ ../include/seccomp.h:114:25: note: each undeclared identifier is reported only once for each function it appears in 114 | # define ARCH_NR AUDIT_ARCH_AARCH64 | ^~~~~~~~~~~~~~~~~~ ../include/seccomp.h:198:38: note: in expansion of macro 'ARCH_NR' 198 | BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ARCH_NR, 1, 0), \ | ^~~~~~~ sbox.c:113:25: note: in expansion of macro 'VALIDATE_ARCHITECTURE' 113 | VALIDATE_ARCHITECTURE, | ^~~~~~~~~~~~~~~~~~~~~ Environment: Linux kernel/headers 3.10 / CentOS 7 / arm64. Fixes netblue30#6440. [1] torvalds/linux@875cbf3 Reported-by: @snakethatlovesstaticlibs
Does this work? By the way, what kind of hardware is this (PC/phone/SBC)? Considering that it's arm64 and a rather old CentOS version I'm assuming that If it's something unusual it might be interesting to add it to the wiki: |
Thank you for creating a fix! I don't have a chance to validate this at the moment, but may next week.
This is a bit of a mess, it's a docker container running on Normally we only deploy for x86, but devs use arm machines so this is where it crops up |
I've tested the fix, and unfortunately now I'm seeing:
(likely another undefined macro) |
Since it's a custom-built toolchain, can you check and try to do the same fix Then post the diff here or open a new PR if you want. |
Feel free to comment if you decide to work on this. Closing for now. |
It apparently only exists since Linux kernel version 3.17 (in
linux/audit.h)[1].
Partial build log:
Environment: Linux kernel/headers 3.10 / CentOS 7 / arm64.
Fixes #6440.
[1] torvalds/linux@875cbf3
Reported-by: @snakethatlovesstaticlibs