Bug 1486

Summary: multilib: duplicated libc-2.13.so when do_rootfs for lib32 build with ipk
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Jiajun Xu <jiajun.xu>
Component: meta-yoctoAssignee: Lianhao Lu <lianhao.lu>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: High CC: dongxiao.xu, ke.yu, poky.bs.watcher, poky.watcher, richard.purdie, sgw
Version: unspecified   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jiajun Xu 2011-09-14 21:00:57 UTC
tree/branch: poky/master
commit: ce66e2c6bd117d1a40b547b10b376524f9276d16

With latest master commit, when I build some lib32 packages(lib32-connman-gnome lib32-task-base-3g lib32-task-base-wifi lib32-task-base-bluetooth) against qemux86-64 with ipk format, core-image-sato do_rootfs will fail with error that there are duplicated libc-2.13.so. Detailed error messages as following:

########
Configuring lib32-wpa-supplicant-cli.
Configuring lib32-wpa-supplicant.
Configuring lib32-connman-plugin-wifi.
Configuring lib32-connman-plugin-ofono.
Configuring lib32-connman-plugin-ethernet.
Configuring lib32-connman-plugin-bluetooth.
Configuring kernel-module-arc4.
Configuring lib32-hostap-utils.
Configuring lib32-task-base-wifi.
Configuring lib32-task-base-3g.
Configuring lib32-hicolor-icon-theme.
Configuring lib32-connman-gnome.
+ multilib_tryout_dirs=' /home/jxu49/osel/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/multilib/lib32'
+ '[' '!' -z /home/jxu49/osel/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/multilib_check.py ']'
+ multilib_sanity_check /home/jxu49/osel/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/rootfs /home/jxu49/osel/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/multilib/lib32
+ multilib_generate_python_file
+ cat
+ echo /home/jxu49/osel/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/rootfs /home/jxu49/osel/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/multilib/lib32
+ python /home/jxu49/osel/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/multilib_check.py
Multilib check error: duplicated files /home/jxu49/osel/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/multilib/lib32/lib64/libc-2.13.so /home/jxu49/osel/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/rootfs/lib64/libc-2.13.so not allowed

+ exit 1
ERROR: Function 'do_rootfs' failed (see /home/jxu49/osel/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/temp/log.do_rootfs.24389 for further information)
########
Comment 1 Lianhao Lu 2011-09-15 21:05:51 UTC
Some 64bit libraries were installed into the lib32 directory. This seems to be caused by the function package_name_hook() in debian.bbclass.

Take lib32-expat for example. Both expat and lib32-expat would generate a package respectively, with the same name libexpat1. In this case, the opkg has some problems to distinguish between the 64bit libexpat1 coming from expat and the 32bit libexpat1 coming from lib32-expat. We should make sure those 2 packages have different package names.
Comment 2 Lianhao Lu 2011-09-16 19:49:00 UTC
Fixed by the following 3 patches:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=27f88685091298fec502cdeb68ae04684ba3d678 Added multilib support for  package_name_hook() so MLPREFIX is kept in the final package name.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=aab71071d73d82ae6301dbd910422a311b5ecf4e Added MLPREFIX to the final package names of some library packages in case of DEBIAN_NAMES.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=99dd3c0b2c0a3b116baa5bbd5e390768d699865b changed the logic of multilib_sanity_check, so duplicated files except those matching to MULTILIBRE_ALLOW_REP are allowed if they're equal. And allow DEBIAN_NOAUTONAMES variable to be automatically mapped in multilib case.
Comment 3 Jiajun Xu 2011-09-26 18:04:21 UTC
verify the bug with edison branch, the bug is fixed.

commit: 41c564fe605fa4685fd27b1721e3424ac8a96db1

commit 41c564fe605fa4685fd27b1721e3424ac8a96db1
Author: Scott Rifenbark <scott.m.rifenbark@intel.com>
Date:   Fri Sep 23 10:20:16 2011 -0700

    documentation/poky-ref-manual/ref-classes.xml: documented useradd.bbclass

    New section per Paul Eggleton's request.

    (From yocto-docs rev: ffedb53e5c706cffb83978f1704a606d29233e36)

    Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>