Doubt regarding build warnings
I got these warning today while building the kernel. I already got some patches accepted but was not not getting any such warnings before. What can be the reason and how to fix? I used make M=drivers/staging for the build.
The warnings are like:
WARNING: "__cpu_online_mask" [drivers/staging/lustre/lustre/ptlrpc/ptlrpc.ko] undefined!
WARNING: "__put_page" [drivers/staging/lustre/lustre/ptlrpc/ptlrpc.ko] undefined!
WARNING: "__put_page" [drivers/staging/lustre/lustre/obdecho/obdecho.ko] undefined!
WARNING: "__cpu_possible_mask" [drivers/staging/lustre/lustre/obdclass/obdclass.ko] undefined!
WARNING: "__page_mapcount" [drivers/staging/lustre/lustre/llite/lustre.ko] undefined!
WARNING: "__put_page" [drivers/staging/lustre/lustre/llite/lustre.ko] undefined!
WARNING: "__cpu_possible_mask" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!
WARNING: "__cpu_online_mask" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!
Thank you,
Bhumika
Quoted 6 lines · On Monday 08 February 2016 20:06:15 Bhumika Goyal wrote:
I got these warning today while building the kernel. I already got some patches accepted but was not not getting any such warnings before. What can be the reason and how to fix? I used make M=drivers/staging for the build.
The warnings are like:
Quoted 17 lines
WARNING: "
__cpu_online_mask" [drivers/staging/lustre/lustre/ptlrpc/ptlrpc.ko] undefined!
WARNING: "__put_page" [drivers/staging/lustre/lustre/ptlrpc/ptlrpc.ko] undefined!
WARNING: "__put_page" [drivers/staging/lustre/lustre/obdecho/obdecho.ko] undefined!
WARNING: "__cpu_possible_mask" [drivers/staging/lustre/lustre/obdclass/obdclass.ko] undefined!
WARNING: "__page_mapcount" [drivers/staging/lustre/lustre/llite/lustre.ko] undefined!
WARNING: "__put_page" [drivers/staging/lustre/lustre/llite/lustre.ko] undefined!
WARNING: "__cpu_possible_mask" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!
WARNING: "__cpu_online_mask" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!
See if you get the same warnings when you do a whole kernel build, without the "M=drivers/staging". I personally prefer "make drivers/staging/" instead of "make M=drivers/staging", which has slightly different behavior.
Arnd
Thank you Arnd .I am not getting any warnings with "make drivers/staging". Can I know the reason for previous warnings when I used "make M" ?
Thanks,
Bhumika Goyal
Quoted 4 lines · On Tuesday 09 February 2016 01:01:37 Bhumika Goyal wrote:
Thank you Arnd .I am not getting any warnings with "make
drivers/staging". Can I know the reason for previous warnings when I used "make M" ?
The differences are very subtle:
make drivers/staging
always succeeds, does nothing at all because the directory exists
make drivers/staging/
descends into that directory to build all the files in it, but does not try to link the modules
make M=drivers/staging
From the output you get, I think this must try to link the modules against the previously-build vmlinux file, which for some reason fails here. I suggested doing 'make' to rebuild everything including vmlinux, so it is up-to-date with your current configuration.
Arnd
Quoted 17 lines · Arnd Bergmann
Quoted 4 lines · On Tuesday 09 February 2016 01:01:37 Bhumika Goyal wrote:
Thank you Arnd .I am not getting any warnings with "make
drivers/staging". Can I know the reason for previous warnings when I used "make M" ?The differences are very subtle:
make
drivers/stagingalways succeeds, does nothing at all because the directory exists
make
drivers/staging/descends into that directory to build all the files in it, but does not try to link the modules
Quoted 6 lines
make M=drivers/staging
From the output you get, I think this must try to link the modules against the previously-build vmlinux file, which for some reason fails here. I suggested doing 'make' to rebuild everything including vmlinux, so it is up-to-date with your current configuration.
CouldI add this to the wiki?
julia
Quoted 10 lines
Arnd
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/5477208.ntDhW1kj3a%40wuerfel.
For more options, visit https://groups.google.com/d/optout.
Quoted 13 lines · On Tuesday 09 February 2016 12:09:38 Julia Lawall wrote:
Quoted 12 lines · Arnd Bergmann
The differences are very subtle:
make
drivers/stagingalways succeeds, does nothing at all because the directory exists
make
drivers/staging/descends into that directory to build all the files in it, but does not try to link the modules
Quoted 9 lines
Quoted 6 lines
make M=drivers/staging
From the output you get, I think this must try to link the modules against the previously-build vmlinux file, which for some reason fails here. I suggested doing 'make' to rebuild everything including vmlinux, so it is up-to-date with your current configuration.
Could I add this to the wiki?
Sure.
Arnd
Quoted 21 lines · Arnd Bergmann
Quoted 20 lines · On Tuesday 09 February 2016 12:09:38 Julia Lawall wrote:
Quoted 18 lines · Arnd Bergmann
The differences are very subtle:
make
drivers/stagingalways succeeds, does nothing at all because the directory exists
make
drivers/staging/descends into that directory to build all the files in it, but does not try to link the modules
make M=drivers/staging
From the output you get, I think this must try to link the modules against the previously-build vmlinux file, which for some reason fails here. I suggested doing 'make' to rebuild everything including vmlinux, so it is up-to-date with your current configuration.
Quoted 4 lines
Quoted 2 lines
Could I add this to the wiki?
Sure.
I put the following:
Compiling only part of the kernel
There are several ways to compile only part of the kernel:
make path/file.o: This compiles only a single file. It may not be
sufficient to check changes that affect interactions with other files.
make path, e.g. make drivers/staging: This always succeeds. It does
nothing at all because the directory exists.
make path/, e.g. make drivers/staging/: This descends into that
directory to build all the files in it, but does not try to link the modules.
make M=drivers/staging: This seems to try to link the modules in a
previously build vmlinux file.
Make path/ could be a reasonable choice for a localized change within a single driver, or for a change localized to drivers staging. In any case, as a minimum always check that compilation produces a .o file for every file that your patch changes. If there is no .o file, you have not compiled the file, and you need to look for other compiler options.
julia
Quoted 8 lines · On Tuesday 09 February 2016 16:18:55 Julia Lawall wrote:
make M=drivers/staging: This seems to try to link the modules in a
previously build vmlinux file.Make path/ could be a reasonable choice for a localized change within a single driver, or for a change localized to drivers staging. In any case, as a minimum always check that compilation produces a .o file for every file that your patch changes. If there is no .o file, you have not compiled the file, and you need to look for other compiler options.
Ok, sounds good. I've added a little bit more detail now:
http://kernelnewbies.org/FirstKernelPatch?action=diff&rev2=25&rev1=24
Arnd
Quoted 10 lines · Arnd Bergmann
Quoted 8 lines · On Tuesday 09 February 2016 16:18:55 Julia Lawall wrote:
make M=drivers/staging: This seems to try to link the modules in a
previously build vmlinux file.Make path/ could be a reasonable choice for a localized change within a single driver, or for a change localized to drivers staging. In any case, as a minimum always check that compilation produces a .o file for every file that your patch changes. If there is no .o file, you have not compiled the file, and you need to look for other compiler options.
Quoted 3 lines
Ok, sounds good. I've added a little bit more detail now:
http://kernelnewbies.org/FirstKernelPatch?action=diff&rev2=25&rev1=24
Thanks. What is -sj2?
julia
Quoted 12 lines · On Tuesday 09 February 2016 16:49:31 Julia Lawall wrote:
Quoted 10 lines · Arnd Bergmann
Quoted 8 lines · On Tuesday 09 February 2016 16:18:55 Julia Lawall wrote:
make M=drivers/staging: This seems to try to link the modules in a
previously build vmlinux file.Make path/ could be a reasonable choice for a localized change within a single driver, or for a change localized to drivers staging. In any case, as a minimum always check that compilation produces a .o file for every file that your patch changes. If there is no .o file, you have not compiled the file, and you need to look for other compiler options.
Quoted 7 lines
Quoted 3 lines
Ok, sounds good. I've added a little bit more detail now:
http://kernelnewbies.org/FirstKernelPatch?action=diff&rev2=25&rev1=24
Thanks. What is -sj2?
-s is 'silent', -j2 is used to build on two threads in parallel rather than one. On second thought, I'll remove those again, as this prevents you from seeing which files get built.
Arnd
Quoted 17 lines · Arnd Bergmann
Quoted 16 lines · On Tuesday 09 February 2016 16:49:31 Julia Lawall wrote:
Quoted 13 lines · Arnd Bergmann
Quoted 8 lines · On Tuesday 09 February 2016 16:18:55 Julia Lawall wrote:
make M=drivers/staging: This seems to try to link the modules in a
previously build vmlinux file.Make path/ could be a reasonable choice for a localized change within a single driver, or for a change localized to drivers staging. In any case, as a minimum always check that compilation produces a .o file for every file that your patch changes. If there is no .o file, you have not compiled the file, and you need to look for other compiler options.
Ok, sounds good. I've added a little bit more detail now:
http://kernelnewbies.org/FirstKernelPatch?action=diff&rev2=25&rev1=24
Quoted 7 lines
Quoted 3 lines
Thanks. What is -sj2?
-s is 'silent', -j2 is used to build on two threads in parallel rather than one. On second thought, I'll remove those again, as this prevents you from seeing which files get built.
-j2 could be left, but one could also infer it from the rest.
thanks,
julia
Quoted 23 lines · Julia Lawall
Quoted 21 lines · Arnd Bergmann
Quoted 19 lines · On Tuesday 09 February 2016 16:49:31 Julia Lawall wrote:
Quoted 10 lines · Arnd Bergmann
Quoted 8 lines · On Tuesday 09 February 2016 16:18:55 Julia Lawall wrote:
make M=drivers/staging: This seems to try to link the modules in a
previously build vmlinux file.Make path/ could be a reasonable choice for a localized change within a single driver, or for a change localized to drivers staging. In any case, as a minimum always check that compilation produces a .o file for every file that your patch changes. If there is no .o file, you have not compiled the file, and you need to look for other compiler options.
Quoted 3 lines
Ok, sounds good. I've added a little bit more detail now:
http://kernelnewbies.org/FirstKernelPatch?action=diff&rev2=25&rev1=24
Thanks. What is -sj2?
Quoted 5 lines
Quoted 3 lines
-s is 'silent', -j2 is used to build on two threads in parallel rather than one. On second thought, I'll remove those again, as this prevents you from seeing which files get built.
-j2 could be left, but one could also infer it from the rest.
I would also remove -j2, doesn't make any difference for building few modules. It can only confuse things.
Daniel.