Closed FedeDP closed 4 months ago
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Uh it seems like debian
for example (but possible other builders) overriddes CC
in the kernel sources makefiles, using the gcc it was built with; in Debian, we set CMAKE_C_COMPILER
to /usr/bin/gcc-11.0.0
but then it tries to build it using gcc-10
:
level=DEBUG msg="+ cmake -Wno-dev -DUSE_BUNDLED_DEPS=On -DCREATE_TEST_TARGETS=Off -DBUILD_LIBSCAP_GVISOR=Off -DBUILD_LIBSCAP_MODERN_BPF=Off -DENABLE_DRIVERS_TESTS=Off -DDRIVER_NAME=falco -DPROBE_NAME=falco -DBUILD_BPF=On -DDRIVER_VERSION=17f5df52a7d9ed6bb12d3b1768460def8439936d -DPROBE_VERSION=17f5df52a7d9ed6bb12d3b1768460def8439936d -DGIT_COMMIT=17f5df52a7d9ed6bb12d3b1768460def8439936d -DDRIVER_DEVICE_NAME=falco -DPROBE_DEVICE_NAME=falco -DCMAKE_C_COMPILER=/usr/bin/gcc-11.0.0 .."
...
level=DEBUG msg="make[6]: gcc-10: No such file or directory"
and indeed:
level=DEBUG msg="+ grep -R CC_VERSION /usr/src/linux-headers-5.10.0-10-amd64" level=DEBUG msg="/usr/src/linux-headers-5.10.0-10-amd64/scripts/Kbuild.include:cc-ifversion = $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(2)000 ] && echo $(3) || echo $(4))" level=DEBUG msg="/usr/src/linux-headers-5.10.0-10-amd64/.config:CONFIG_CC_VERSION_TEXT=\"gcc-10 (Debian 10.2.1-6) 10.2.1 20210110\"" level=DEBUG msg="/usr/src/linux-headers-5.10.0-10-amd64/.config:CONFIG_GCC_VERSION=100201" level=DEBUG msg="/usr/src/linux-headers-5.10.0-10-amd64/include/generated/autoconf.h:#define CONFIG_CC_VERSION_TEXT \"gcc-10 (Debian 10.2.1-6) 10.2.1 20210110\"" level=DEBUG msg="/usr/src/linux-headers-5.10.0-10-amd64/include/generated/autoconf.h:#define CONFIG_GCC_VERSION 100201" level=DEBUG msg="/usr/src/linux-headers-5.10.0-10-amd64/include/config/auto.conf:CONFIG_CC_VERSION_TEXT=\"gcc-10 (Debian 10.2.1-6) 10.2.1 20210110\"" level=DEBUG msg="/usr/src/linux-headers-5.10.0-10-amd64/include/config/auto.conf:CONFIG_GCC_VERSION=100201"
/close
@FedeDP: Closed this PR.
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area pkg
What this PR does / why we need it:
Instead, set CMAKE_C_COMPILER variable at cmake configure step.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: