Tree/Branch: poky/master commit: 786033f53cad2a196ae6f3a05574148578ea3894 With latest master branch, when I build a lib32 core-image-sato with qemux86-64, it fails with error when compile linux-yocto. Error message as below: ###### ERROR: Function 'do_compile' failed (see /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/temp/log.do_compile.8803 for further information) ERROR: Logfile of failure stored in: /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/temp/log.do_compile.8803 Log data follows: | ERROR: Function 'do_compile' failed (see /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/temp/log.do_compile.8803 for further information) | NOTE: make -j 9 include/linux/version.h CC=i586-pokymllib32-linux-gcc --sysroot=/home/jxu49/osel/poky/build/tmp/sysroots/qemux86-64 LD=i586-pokymllib32-linux-ld --sysroot=/home/jxu49/osel/poky/build/tmp/sysroots/qemux86-64 | make -C /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/linux O=/home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/linux-qemux86-64-standard-build/. include/linux/version.h | CHK include/linux/version.h | NOTE: make -j 9 bzImage CC=i586-pokymllib32-linux-gcc --sysroot=/home/jxu49/osel/poky/build/tmp/sysroots/qemux86-64 LD=i586-pokymllib32-linux-ld --sysroot=/home/jxu49/osel/poky/build/tmp/sysroots/qemux86-64 | make -C /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/linux O=/home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/linux-qemux86-64-standard-build/. bzImage | GEN /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/linux-qemux86-64-standard-build/Makefile | CHK include/linux/version.h | Using /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/linux as source for kernel | CHK include/generated/utsrelease.h | CC scripts/mod/empty.o | /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/linux/scripts/mod/empty.c:1:0: error: code model â~@~Xkernelâ~@~Y not supported in the 32 bit mode | /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/linux/scripts/mod/empty.c:1:0: sorry, unimplemented: 64-bit mode not compiled in | make[4]: *** [scripts/mod/empty.o] Error 1 | make[3]: *** [scripts/mod] Error 2 | make[2]: *** [scripts] Error 2 | make[2]: *** Waiting for unfinished jobs.... | CC kernel/bounds.s | /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/linux/kernel/bounds.c:1:0: error: code model â~@~Xkernelâ~@~Y not supported in the 32 bit mode | /home/jxu49/osel/poky/build/tmp/work/qemux86_64-pokymllib32-linux/lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20/linux/kernel/bounds.c:1:0: sorry, unimplemented: 64-bit mode not compiled in | make[3]: *** [kernel/bounds.s] Error 1 | make[2]: *** [prepare0] Error 2 | make[1]: *** [sub-make] Error 2 | make: *** [all] Error 2 | ERROR: oe_runmake failed NOTE: package lib32-linux-yocto-2.6.37+git1+84f1a422d7e21fbc23a687035bdf9d42471f19e0_1+be49445d1504c3d4021c01471223208cd3cc9c4f-r20: task do_compile: Failed ERROR: Task 548 (virtual:multilib:lib32:/home/jxu49/osel/poky/meta/recipes-kernel/linux/linux-yocto_2.6.37.bb, do_compile) failed with exit code '1' Waiting for 1 active tasks to finish: 0: lib32-gcc-runtime-4.6.1+svnr175454-r4 do_compile (pid 8802) Waiting for 2 active tasks to finish: 0: lib32-gcc-runtime-4.6.1+svnr175454-r4 do_compile (pid 8802) 1: lib32-eglibc-locale-2.13-r16 do_package_write_rpm (pid 9218) NOTE: package lib32-eglibc-locale-2.13-r16: task do_package_write_rpm: Started Waiting for 1 active tasks to finish: 0: lib32-eglibc-locale-2.13-r16 do_package_write_rpm (pid 9218) NOTE: package lib32-gcc-runtime-4.6.1+svnr175454-r4: task do_compile: Succeeded NOTE: package lib32-eglibc-locale-2.13-r16: task do_package_write_rpm: Succeeded ERROR: 'virtual:multilib:lib32:/home/jxu49/osel/poky/meta/recipes-kernel/linux/linux-yocto_2.6.37.bb' failed ######
There are some parts of the system we shouldn't extend to different multilibs, the kernel is one of them...
This isn't a bug in the multilib system. The linux kernel can only be built with the "largest" endian available to the system. I.e. on x86_64, it must be built as x86_64. The remaining bug, if any, is simply a way to prevent certain packages from working in a multilib config.
Simply raising SkipPackage in appropriate cases is likely the best solution. The kernel is specific enough that I'm happy for it to be coded against testing for inherit kernel or module-base and then picking the "larger" one. We'd probably have to code that 64 bit wins over 32 bit.
I've done a POC patch as below. then the bitbake lib32-core-image-sato will fail in parsing as expected, since virtual/lib32-kernel is not available. so i wonder if it is acceptable? If so, how should we test the lib32-core-image-sato? " diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 7dc9cc6..fbd567d 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -9,6 +9,7 @@ INHIBIT_DEFAULT_DEPS = "1" KERNEL_IMAGETYPE ?= "zImage" INITRAMFS_IMAGE ?= "" INITRAMFS_TASK ?= "" +NO_MULTILIB ?= "1" python __anonymous () { kerneltype = bb.data.getVar('KERNEL_IMAGETYPE', d, 1) or '' diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass index 6e1669f..34744cd 100644 --- a/meta/classes/multilib.bbclass +++ b/meta/classes/multilib.bbclass @@ -6,6 +6,9 @@ python multilib_virtclass_handler () { variant = e.data.getVar("BBEXTENDVARIANT", True) if cls != "multilib" or not variant: return + + if e.data.getVar("NO_MULTILIB", True) == "1": + raise bb.parse.SkipPackage("NO_MULTILIB is set") override = ":virtclass-multilib-" + variant "
I'm thinking we need something more along the lines of: http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/ml4&id=7198e9962235b2d144c63c02823f9b46211c997a which raises the SkipParse error in the multilib cases and manipulates PROVIDES in the non-multilib case to include the multilib variants. The patch above is a work in progress though and I was only half way through writing it before travel interrupted the work.
Fixed in master, http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f9c3639238c2a9f1072e39ba26d0e521c5951b95