Announcement

Collapse
No announcement yet.

Wrong compiler version when building extra (out-of-tree) kernel module

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [System] Wrong compiler version when building extra (out-of-tree) kernel module

    Hi all,

    I've just made a fresh installation of Kubuntu 25.04, installed gcc as well as linux-headers-$(uname -r) but when I try to build an out-of-tree kernel module, I get this error

    Code:
    warning: the compiler differs from the one used to build the kernel
    The kernel was built by: x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-19ubuntu2) 14.2.0
    You are using: gcc-14 (Ubuntu 14.2.0-19ubuntu2) 14.2.0​
    I've seen such errors before if e.g. the kernel was built with gcc-10 and I tried to build a module with gcc-11, but this case looks different because obviously, the compiler versions are identical (gcc-14 (Ubuntu 14.2.0-19ubuntu2) 14.2.0​) and it looks like the kernel was simply built using a kind of cross compiler which is effectively the same as the native compiler.

    If someone wants to duplicate this, just build the "devel" branch of this git repo:
    https://git.meinbergglobal.com/drivers/mbgtools-lx.git/

    How can this be fixed?

    Martin

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X