I’m doing a native compilation of an out-of-tree kernel module on Jetson R39.2.1 (L4T 39.2.1, kernel 6.8.12-1021-rt-tegra). During make modules, I get the following warning:
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
You are using: gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Environment:
Jetson Linux R39.2.1 (JetPack 7.2.1) Native Compilation
Kernel: 6.8.12-1021-rt-tegra (PREEMPT_RT)
readlink /lib/modules/$(uname -r)/build points to: /usr/src/linux-headers-6.8.12-1021-rt-tegra-ubuntu24.04_aarch64/3rdparty/canonical/linux-noble
Questions:
Is this warning safe to ignore for out-of-tree modules on the RT kernel, given the minor version difference (13.2.0 vs 13.3.0)?
Thank you for the clarification. However, my use case is native compilation on the Jetson itself, not cross-compilation from an x86 host.
The Jetson is already running the NVIDIA R39.2.1 RT kernel:
6.8.12-1021-rt-tegra
and I am building an out-of-tree kernel module directly on the Jetson using:
/lib/modules/$(uname -r)/build
The warning is:
The kernel was built by: gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 You are using: gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Could you please clarify whether NVIDIA recommends using the R39 Crosstool-NG GCC 13.2 toolchain specifically for native OOT module compilation as well?
If so, how should the R39 GCC 13.2 toolchain be used for native compilation on the Jetson ARM64 itself? The aarch64-none-linux-gnu toolchain referenced in the Kernel Customization guide appears to be a cross-compiler intended for x86_64 hosts.
Alternatively, is GCC 13.3 supported for native OOT module compilation on an R39.2.1 Jetson, with the warning simply indicating that the compiler version differs from the kernel build compiler?
I would especially like to understand whether this mismatch has any known impact on module ABI/CRC compatibility or PREEMPT_RT behavior.
I would like to clarify my current setup and purpose.
I am already using the official NVIDIA RT Kernel provided for Jetson Linux R39.2, rather than building my own RT kernel from source. I installed the RT kernel packages provided by NVIDIA, including the RT kernel, kernel headers, and OOT module packages, following NVIDIA’s official documentation:
My purpose is not to rebuild or customize the RT kernel itself. Instead, I need to compile several third-party out-of-tree (OOT) kernel drivers against the NVIDIA-provided RT kernel.
During the OOT driver compilation, I received the following warning:
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
You are using: gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Therefore, my question is specifically about building third-party OOT modules against the NVIDIA-provided RT kernel, rather than about rebuilding the RT kernel.
Could you please clarify:
Is GCC 13.3 officially supported for compiling OOT kernel modules against the NVIDIA R39.2 RT kernel, or should the OOT modules be compiled with exactly GCC 13.2.0, which was used to build the NVIDIA RT kernel?
If GCC 13.2.0 is required, is there an NVIDIA-provided ARM64 native GCC 13.2 toolchain/package that can be used directly on the Jetson device for native OOT module compilation? The NVIDIA cross-compilation toolchain is intended for an x86 host, while my OOT drivers are being compiled natively on the Jetson.
Since I am using the official NVIDIA RT kernel and its corresponding headers/Module.symvers, is there any additional NVIDIA-specific procedure required for compiling third-party OOT modules, or should the standard Linux Kbuild external-module procedure be sufficient?
I am trying to avoid rebuilding the RT kernel because the objective is simply to develop and load third-party OOT drivers while keeping the NVIDIA-provided RT kernel unchanged.
Hi,
It should be little practical risk in building the module with GCC 13.3.0 when the installed kernel was built with GCC 13.2.0. If the module can be built successfully and loaded correctly, you may ignore the warning about mismatched gcc versions.