On Sat, Mar 4, 2023 at 4:09 AM <[email protected]> wrote: > > Hi Bruce, > Thanks, I missed the "make scripts prepare" 8 years has past since I did this > the last time. > Now I can compile and load the driver but still get the warning. > > warning: the compiler differs from the one used to build the kernel > The kernel was built by: x86_64-poky-linux-gcc (GCC) 11.3.0 > You are using: gcc (GCC) 11.3.0 > > > So something is not 100% correct.
That is expected at the moment, since we are cross compiling on the host, but natively building on the target. kernel-devsrc takes steps to ensure that kernel reconfiguration doesn't happen on target (which I assume you aren't seeing), but it doesn't fix that up. In kernel devsrc, I could also fix that compiler string in the captured .config, but we can't change the kernel-build-artifacts .config, as it is used for future cross builds. Bruce > > Kind regards > Anders > > > > -----Original Message----- > From: [email protected] <[email protected]> > On Behalf Of Bruce Ashfield > Sent: den 3 mars 2023 19:08 > To: Anders Berndtsson <[email protected]> > Cc: [email protected] > Subject: Re: [linux-yocto] Can't compile kernel module under kirkstone > > On Fri, Mar 3, 2023 at 12:23 PM Anders Berndtsson > <[email protected]> wrote: > > > > Get this message when compiling a kernel module under branch kirkstone > > and intel-corei7-64 > > warning: the compiler differs from the one used to build the kerne > > The kernel was built by: x86_64-poky-linux-gcc (GCC) 11.3.0 > > You are using: gcc (GCC) 11.3.0 > > cat /proc/version > > Linux version 5.15.85-intel-pk-standard (oe-user@oe-host) > > (x86_64-poky-linux-gcc (GCC) 11.3.0, GNU ld (GNU Binutils) > > 2.38.20220708) #1 SMP PREEMPT Wed Jan 11 19:36:47 UTC 2023 gcc > > --version gcc (GCC) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. > > This is free software; see the source for copying conditions. There > > is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > > PURPOSE. > > So you are building the module on target ? If so, that is something we test > nightly, and as part of the release builds, so it is known to work for all > releases (i.e. we won't release with it broken). > > > > > But I actual believe that I use the same compiler as the one used to build > > the kernel. > > I suspect that the version format from the gcc compiler has changed so the > > compare of the versions don't work. > > > > The kernel compiling works for an old Yocto kernel 3.19.5 from 2015 with > > same makefile and source file. > > A kernel of that vintage wouldn't have checks for the compiler. > > We'd have to know more about your image, your layers, if kernel-devsrc is > installed on target, and if you've done "make scripts prepare" > before starting to build the module. > > Bruce > > > > > > > > > > > > -- > - Thou shalt not follow the NULL pointer, for chaos and madness await thee at > its end > - "Use the force Harry" - Gandalf, Star Trek II > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12227): https://lists.yoctoproject.org/g/linux-yocto/message/12227 Mute This Topic: https://lists.yoctoproject.org/mt/97367211/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
