<div dir="ltr">Hi all, <div><br></div><div>I added to my image: IMAGE_INSTALL_append = " lib32-glibc" and it solved the build problem !</div><div><br></div><div>now I can build a mixed image (64 Bit kernel, 32 Bit) user space using multilib :</div><div><br></div><div>$ MACHINE =mymachine bitbake lib32-my-image</div><div><br></div><div>Thank you all for your inputs.</div><div><br></div><div>best regards</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 27, 2018 at 1:19 PM, Martin Jansa <span dir="ltr"><<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Check with bitbake -g what's pulling gcc-runtime into the image, if your whole userspace should be 32bit, then lib32-gcc-runtime will be enough.<div><br></div><div>My multilib builds contain only following 64bit builds:</div><div>defaultpkgname depmodwrapper-cross linux-yocto lttng-modules make-mod-scripts qemuwrapper-cross vboxguestdrivers<br></div><div>the rest is 32bit</div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 27, 2018 at 12:23 PM Ayoub Zaki <<a href="mailto:ayoub.zaki@googlemail.com" target="_blank">ayoub.zaki@googlemail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>thanks for the suggestions: I tried the multilib concept of yocto but as Martin already wrote is not that simple, my build is breaking during wic image generation as follow:</div><div><br></div><div><div>zaki@xps:/opt/build/poky/<wbr>build$ MACHINE=nx bitbake lib32-my-image</div><div>Loading cache: 100% |#############################<wbr>##############################<wbr>##############################<wbr>##############################<wbr>##############################<wbr>###########################| Time: 0:00:00</div><div>Loaded 4968 entries from dependency cache.</div><div>NOTE: Resolving any missing task queue dependencies</div><div><br></div><div>Build Configuration:</div><div>BB_VERSION      = "1.38.0"</div><div>BUILD_SYS      = "x86_64-linux"</div><div>NATIVELSBSTRING   = "universal"</div><div>TARGET_SYS      = "x86_64-poky-linux"</div><div>MACHINE       = "nx"</div><div>DISTRO        = "poky"</div><div>DISTRO_VERSION    = "V00.00.00.00+20180727100935"</div><div>TUNE_FEATURES    = "m64 core2"</div><div>TARGET_FPU      = ""</div><div>meta         </div><div>meta-poky       </div><div>meta-yocto-bsp    = "sumo:<wbr>90f7edb32ac2500d93bb7ca5045a9d<wbr>048f551223"</div><div>meta-intel      = "sumo:<wbr>2430f73ee06f3315ebebe69899f197<wbr>7f9a09e29f"</div><div>meta-oe        </div><div>meta-networking    </div><div>meta-webserver    </div><div>meta-python     = "sumo:<wbr>b0950aeff5b630256bb5e25ca15f4d<wbr>59c115e7c1"</div><div><br></div><div>Initialising tasks: 100% |#############################<wbr>##############################<wbr>##############################<wbr>##############################<wbr>##############################<wbr>######################| Time: 0:00:02</div><div>NOTE: Executing SetScene Tasks</div><div>NOTE: Executing RunQueue Tasks</div><div>WARNING: lib32-my-image-1.0-r0 do_rootfs: lib32-systemd.postinst returned 1, marking as unpacked only, configuration required on target.</div><div>WARNING: lib32-my-image-1.0-r0 do_rootfs: Intentionally failing postinstall scriptlets of ['lib32-systemd'] to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} ().</div><div>If deferring to first boot wasn't the intent, then scriptlet failure may mean an issue in the recipe, or a regression elsewhere.</div><div>Details of the failure are in /opt/build/poky/build/tmp/<wbr>work/nx-pokymllib32-linux/<wbr>lib32-my-image/1.0-r0/temp/<wbr>log.do_rootfs.</div><div>WARNING: lib32-my-image-1.0-r0 do_rootfs: [log_check] lib32-my-image: found 1 warning message in the logfile:</div><div>[log_check] WARNING: Intentionally failing postinstall scriptlets of ['lib32-systemd'] to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} ().</div><div>ERROR: lib32-my-image-1.0-r0 do_image_wic: The file /usr/share/gcc-7.3.0/python/<wbr>libstdcxx/__init__.py is installed by both lib32-gcc-runtime and gcc-runtime, aborting<br></div><div>ERROR: lib32-my-image-1.0-r0 do_image_wic: Function failed: extend_recipe_sysroot</div><div>ERROR: Logfile of failure stored in: /opt/build/poky/build/tmp/<wbr>work/nx-pokymllib32-linux/<wbr>lib32-my-image/1.0-r0/temp/<wbr>log.do_image_wic.16922</div><div>ERROR: Task (virtual:multilib:lib32:/opt/<wbr>build/poky/meta-poky/recipes-<wbr>core/images/my-image.bb:do_<wbr>image_wic) failed with exit code '1'</div><div>NOTE: Tasks Summary: Attempted 3460 tasks of which 3445 didn't need to be rerun and 1 failed.</div><div><br></div><div>Summary: 1 task failed:</div><div> virtual:multilib:lib32:/opt/<wbr>build/poky/meta-poky/recipes-<wbr>core/images/my-image.bb:do_<wbr>image_wic</div><div>Summary: There were 3 WARNING messages shown.</div><div>Summary: There were 2 ERROR messages shown, returning a non-zero exit code.</div></div><div><br></div><div><br></div><div>The <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ERROR: lib32-my-image-1.0-r0 do_image_wic: The file /usr/share/gcc-7.3.0/python/<wbr>libstdcxx/__init__.py is installed by both lib32-gcc-runtime and gcc-runtime, aborting is not self-explanatory!</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">gcc-runtime is anyway not part of the image ?!</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">any suggestions ?</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">thank you</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Best regards</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 26, 2018 at 8:12 PM, Martin Jansa <span dir="ltr"><<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It's not as simple as that in some cases, there are some components which are pulled in 64bit version even when building lib32-foo-image.<div><br></div><div>Some are easy to override from the config e.g.:</div><div><div>ROOTFS_PKGMANAGE = "${LIB32_PREFIX}opkg"</div><div>SPLASH = "${LIB32_PREFIX}psplash"</div></div><div><br></div><div>but to prevent building e.g. syslinux in 64bit version is a bit more tricky.</div><div><br></div><div>syslinux.bbclass was fixed long time ago:</div><div><div>commit c8dc421ea18bb7a810501ab6d07efa<wbr>9c8f6d6eb9</div><div>Author: Ming Liu <<a href="mailto:ming.liu@windriver.com" target="_blank">ming.liu@windriver.com</a>></div><div>Date:  Thu Jun 19 16:42:58 2014 +0800</div><div><br></div><div>  syslinux.bbclass: Ensure MLPREFIX is applied to depends flag</div><div>   </div><div>  Add MLPREFIX to depends flag to ensure the correct syslinux is</div><div>  dependended upon.</div></div><div><br></div><div><div>-do_bootimg[depends] += "syslinux:do_populate_sysroot \</div><div>+do_bootimg[depends] += "${MLPREFIX}syslinux:do_<wbr>populate_sysroot \</div></div><div><br></div><div>but wic still depends on syslinux without MLPREFIX:</div><div><br></div><div><div>meta/conf/machine/qemux86-64.<wbr>conf:do_image_wic[depends] += "syslinux:do_populate_sysroot syslinux-native:do_populate_<wbr>sysroot mtools-native:do_populate_<wbr>sysroot dosfstools-nat...</div><div>meta/conf/machine/qemux86.<wbr>conf:do_image_wic[depends] += "syslinux:do_populate_sysroot syslinux-native:do_populate_<wbr>sysroot mtools-native:do_populate_<wbr>sysroot dosfstools-native...</div></div><div><br></div><div>similarly opkg-utils and some other components are pulled in the not-prefixed version even when building image with a prefix. I've eventually got it working with morty (that it was really building only couple 64bit recipes, mostly kernel and recipes providing external modules and e.g. depmodwrapper-cross), but it's kind of shaky and error prone, I'll send fixes for some of these issues, but as we're using morty it's more complicated to find out what is still needed and what was resolved in newer OE already.</div><div><br></div><div>And there are the issues with allarch recipes mentioned in the other multilib thread.</div><div><br></div><div>Regards,</div><div><br></div></div><div class="m_4390065292901578377m_3952577102488355007HOEnZb"><div class="m_4390065292901578377m_3952577102488355007h5"><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 26, 2018 at 5:59 PM Mark Hatle <<a href="mailto:mark.hatle@windriver.com" target="_blank">mark.hatle@windriver.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 7/26/18 10:19 AM, Alexander Kanavin wrote:<br>
> 2018-07-26 14:56 GMT+02:00 Ayoub Zaki <<a href="mailto:ayoub.zaki@googlemail.com" target="_blank">ayoub.zaki@googlemail.com</a>>:<br>
>> Is it possible to define a MACHINE configuration with a 64 Bit kernel and 32<br>
>> Bit user space ?<br>
>><br>
>> The user space should not be using a x32 ABI.<br>
> <br>
> I think (but I am not sure), that you can do it with multilib. Define<br>
> a configuration like this:<br>
> <a href="https://github.com/openembedded/openembedded-core/blob/master/meta-skeleton/conf/multilib-example.conf" rel="noreferrer" target="_blank">https://github.com/<wbr>openembedded/openembedded-<wbr>core/blob/master/meta-<wbr>skeleton/conf/multilib-<wbr>example.conf</a><br>
> <br>
> Then build lib32-core-image-minimal. That image should include only 32<br>
> bit user space, but the kernel will be 64 bit.<br>
<br>
Yes this is the typical approach. Enable multilibs, and then build the image<br>
you you want with the approach multilib prefix.<br>
<br>
This works in any multilib configurations, 64-bit, 32-bit, x32, etc..<br>
<br>
--Mark<br>
<br>
> Alex<br>
> <br>
<br>
-- <br>
______________________________<wbr>_________________<br>
yocto mailing list<br>
<a href="mailto:yocto@yoctoproject.org" target="_blank">yocto@yoctoproject.org</a><br>
<a href="https://lists.yoctoproject.org/listinfo/yocto" rel="noreferrer" target="_blank">https://lists.yoctoproject.<wbr>org/listinfo/yocto</a><br>
</blockquote></div>
</div></div><br>-- <br>
______________________________<wbr>_________________<br>
yocto mailing list<br>
<a href="mailto:yocto@yoctoproject.org" target="_blank">yocto@yoctoproject.org</a><br>
<a href="https://lists.yoctoproject.org/listinfo/yocto" rel="noreferrer" target="_blank">https://lists.yoctoproject.<wbr>org/listinfo/yocto</a><br>
<br></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>