Bug 2572

Summary: [multilib] failed dependency for util-linux with multilib build
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jiajun Xu <jiajun.xu>
Component: coreAssignee: Bogdan Marinescu <bogdan.a.marinescu>
Status: VERIFIED WORKSFORME QA Contact:
Severity: major    
Priority: Medium CC: alexandru.c.georgescu, hongnax.xu, laurentiu.serban, meta.mr.watcher, meta.watcher, ningx.ma, richard.purdie, yilongx.y.sun
Version: unspecified   
Target Milestone: 1.3 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jiajun Xu 2012-06-11 03:55:46 UTC
tree/branch: poky/master
commit: df8f55a919b3cc602ce1f1c51630c7edf6e36b55

With latest master, multilib build against sato images could not pass do_rootfs. It reports following error:

######
DEBUG: Executing shell function do_rootfs
ERROR: Function failed: do_rootfs (see /home/jxu49/osel/m1-full/lib32-sato-sdk-qemux86-64/tmp/work/qemux86_64-poky-linux/lib32-core-image-sato-sdk-1.0-r0/temp/log.do_rootfs.9788 for further information)
Generating solve db for /home/jxu49/osel/m1-full/lib32-sato-sdk-qemux86-64/tmp/deploy/rpm/qemux86_64...
Generating solve db for /home/jxu49/osel/m1-full/lib32-sato-sdk-qemux86-64/tmp/deploy/rpm/x86_64...
Generating solve db for /home/jxu49/osel/m1-full/lib32-sato-sdk-qemux86-64/tmp/deploy/rpm/all...
Generating solve db for /home/jxu49/osel/m1-full/lib32-sato-sdk-qemux86-64/tmp/deploy/rpm/lib32_qemux86_64...
Generating solve db for /home/jxu49/osel/m1-full/lib32-sato-sdk-qemux86-64/tmp/deploy/rpm/lib32_x86...
Generating solve db for /home/jxu49/osel/m1-full/lib32-sato-sdk-qemux86-64/tmp/deploy/rpm/all...
Generating solve db for /home/jxu49/osel/m1-full/lib32-sato-sdk-qemux86-64/tmp/deploy/rpm/all...
Processing lib32-locale-base-en-us...
Processing lib32-locale-base-en-gb...
Processing lib32-task-core-boot...
Processing lib32-task-core-apps-console...
Processing lib32-task-core-standalone-sdk-target...
Processing lib32-task-core-ssh-dropbear...
Processing lib32-task-core-apps-x11-pimlico...
Processing lib32-zypper...
Processing lib32-task-core-tools-profile...
Processing lib32-task-core-qt-demos...
Processing lib32-task-core-x11-sato...
Processing lib32-task-core-sdk...
Processing lib32-task-core-tools-testapps...
Processing lib32-task-core-tools-debug...
Processing lib32-task-core-apps-x11-games...
Processing lib32-task-core-apps-x11-core...
Processing lib32-task-base-extended...
Processing lib32-rpm...
Processing lib32-task-core-x11-base...
Manifest: /home/jxu49/osel/m1-full/lib32-sato-sdk-qemux86-64/tmp/work/qemux86_64-poky-linux/lib32-core-image-sato-sdk-1.0-r0/rootfs/install/install.manifest
error: Failed dependencies:
        util-linux-swaponoff is needed by util-linux-2.21.1-r1.lib32_x86
        util-linux-umount is needed by util-linux-2.21.1-r1.lib32_x86
        util-linux-losetup is needed by util-linux-2.21.1-r1.lib32_x86
######
Comment 1 Richard Purdie 2012-06-28 14:20:17 UTC
I think we might be abel to fix this with something like:

--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1701,7 +1701,7 @@ python package_depchains() {
 
 # Since bitbake can't determine which variables are accessed during package 
 # iteration, we need to list them here:
-PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME"
+PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME ALTER
 
 def gen_packagevar(d):
     ret = []
Comment 2 Richard Purdie 2012-06-28 14:25:14 UTC
(In reply to comment #1)
> I think we might be abel to fix this with something like:
> 
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1701,7 +1701,7 @@ python package_depchains() {
>  
>  # Since bitbake can't determine which variables are accessed during package 
>  # iteration, we need to list them here:
> -PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS
> RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME
> INITSCRIPT_PARAMS DEBIAN_NOAUTONAME"
> +PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS
> RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME
> INITSCRIPT_PARAMS DEBIAN_NOAUTONAME ALTER
>  
>  def gen_packagevar(d):
>      ret = []

My terminal width truncated this. The change should be:

-PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME"
+PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME ALTERNATIVE"

It should be easy to add this to the file manually, its just adding ALTERNATIVE to PACKAGEVARS.
Comment 3 Bogdan Marinescu 2012-06-28 14:41:00 UTC
I'm pasting below my conversation with Mark Hattle on the subject:

---------- Forwarded message ----------
From: Marinescu, Bogdan A <bogdan.a.marinescu@intel.com>
Date: Fri, Jun 22, 2012 at 5:16 PM
Subject: Re: About your commit on update-alternatives.bbclass
To: Mark Hatle <mark.hatle@windriver.com>


Hi,

On Fri, Jun 22, 2012 at 5:05 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> On 6/22/12 8:31 AM, Marinescu, Bogdan A wrote:
>>
>> Hello again,
>>
>> Looking at the log.do_package file (attached) I can see these lines:
>>
>> NOTE: util-linux: Rename /bin/dmesg -> /bin/dmesg.util-linux
>> NOTE: util-linux: Rename /bin/kill -> /bin/kill.util-linux
>> NOTE: util-linux: Rename /bin/more -> /bin/more.util-linux
>> NOTE: util-linux: Rename /bin/reset -> /bin/reset.util-linux
>> NOTE: util-linux: Rename /sbin/mkswap -> /sbin/mkswap.util-linux
>> NOTE: util-linux: Rename /sbin/blockdev -> /sbin/blockdev.util-linux
>> NOTE: util-linux: Rename /sbin/pivot_root -> /sbin/pivot_root.util-linux
>> NOTE: util-linux: Rename /sbin/mkfs.minix -> /sbin/mkfs.minix.util-linux
>> NOTE: util-linux: Rename /usr/bin/hexdump -> /usr/bin/hexdump.util-linux
>> NOTE: util-linux: Rename /usr/bin/last -> /usr/bin/last.util-linux
>> NOTE: util-linux: Rename /usr/bin/logger -> /usr/bin/logger.util-linux
>> NOTE: util-linux: Rename /usr/bin/mesg -> /usr/bin/mesg.util-linux
>> NOTE: util-linux: Rename /usr/bin/renice -> /usr/bin/renice.util-linux
>> NOTE: util-linux: Rename /usr/bin/wall -> /usr/bin/wall.util-linux
>> NOTE: util-linux: Rename /usr/bin/setsid -> /usr/bin/setsid.util-linux
>> NOTE: util-linux: Rename /usr/bin/chrt -> /usr/bin/chrt.util-linux
>> NOTE: util-linux: Rename /usr/bin/flock -> /usr/bin/flock.util-linux
>> NOTE: util-linux: Rename /sbin/hwclock -> /sbin/hwclock.util-linux
>
>
> The rename happens in the split directory.  If it can't find the file in the
> split, then the rename and related does not occur...
>
>
>> I'm guessing these come from the update-alternatives.class. I can't
>> see any entries for swapon, swapoff and losetup (the missing
>> dependencies) although they have ALTERNATE entries in utli-linux.inc:
>>
>> ALTERNATIVE_util-linux-losetup = "losetup"
>> ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup"
>>
>> ALTERNATIVE_util-linux-swaponoff = "swapoff swapon"
>> ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff"
>> ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon"
>>
>> Any idea why this happens?
>
>
> The above has the swapoff/swapon only in the util-linux-swaponoff package,
> but if the files are not located there then something is going wrong with
> the split/do_install/packaging steps.
>
> Check the order of the PACKAGES variables (use bitbake -e lib32-util-linux),
> the items are precessed in that order..  for each item in PACKAGES, check
> for FILES_<package>,,, my guess is something generic is matching
> swapoff/swapon, before it gets to the util-linux-swaponoff...
>

PACKAGES="lib32-util-linux-agetty lib32-util-linux-fdisk
lib32-util-linux-cfdisk lib32-util-linux-sfdisk
lib32-util-linux-swaponoff lib32-util-linux-losetup
lib32-util-linux-umount lib32-util-linux-mount
lib32-util-linux-readprofile lib32-util-linux-libblkid
lib32-util-linux-libblkid-dev lib32-util-linux-libuuid
lib32-util-linux-libuuid-dev lib32-util-linux-uuidgen
lib32-util-linux-lscpu lib32-util-linux-fsck lib32-util-linux-blkid
lib32-util-linux-chkdupexe lib32-util-linux-mkfs
lib32-util-linux-mcookie lib32-util-linux-dbg
lib32-util-linux-staticdev lib32-util-linux lib32-util-linux-doc
lib32-util-linux-dev lib32-util-linux-locale"

./meta/recipes-core/util-linux/util-linux.inc:45:FILES_util-linux-agetty
= "${base_sbindir}/agetty"
./meta/recipes-core/util-linux/util-linux.inc:46:FILES_util-linux-fdisk
= "${base_sbindir}/fdisk.${BPN}"
./meta/recipes-core/util-linux/util-linux.inc:47:FILES_util-linux-cfdisk
= "${base_sbindir}/cfdisk"
./meta/recipes-core/util-linux/util-linux.inc:48:FILES_util-linux-sfdisk
= "${sbindir}/sfdisk"

After that comes swaponoff and losetup (the missing dependencies). So
they don't seem to be matched by something else.

Thanks,
Bogdan


> --Mark
>
>
>> Thank you,
>> Bogdan Marinescu
>>
>> On Fri, Jun 22, 2012 at 4:16 PM, Marinescu, Bogdan A
>> <bogdan.a.marinescu@intel.com> wrote:
>>>
>>> Hi Mark,
>>>
>>> Thank you very much for your help. I added my comments below.
>>>
>>> On Wed, Jun 20, 2012 at 5:53 PM, Mark Hatle <mark.hatle@windriver.com>
>>> wrote:
>>>>
>>>> On 6/20/12 9:25 AM, Marinescu, Bogdan A wrote:
>>>>>
>>>>>
>>>>> Hi Mark,
>>>>>
>>>>> I'm working on this bug:
>>>>>
>>>>>   https://bugzilla.yoctoproject.org/show_bug.cgi?id=2572
>>>>>
>>>>> I talked to Richard about it and he suggested that it might have
>>>>> something to do with your changes related to
>>>>> update-alternatives.bbclass
>>>>>
>>>>>
>>>>>
>>>>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=6ac7e9b5981872b22dcd07f0f7171e1f7c10e284
>>>>>
>>>>> (since there is no util-linux-* package generated at all in a multilib
>>>>> configuration when building lib32-core-image-sato-sdk).
>>>>>
>>>>> My experience with multilib is still quite limited and I was wondering
>>>>> if you can help with this issue.
>>>>>
>>>>> Thanks,
>>>>> Bogdan
>>>>
>>>>
>>>>
>>>> Looking at the error:
>>>>
>>>> error: Failed dependencies:
>>>>        util-linux-swaponoff is needed by util-linux-2.21.1-r1.lib32_x86
>>>>        util-linux-umount is needed by util-linux-2.21.1-r1.lib32_x86
>>>>        util-linux-losetup is needed by util-linux-2.21.1-r1.lib32_x86
>>>
>>>
>>> The error looks a bit different now (after a 'git pull' on poky
>>> yesterday (21.06.2012)):
>>>
>>> | Collected errors:
>>> |  * satisfy_dependencies_for: Cannot satisfy the following
>>> dependencies for lib32-task-core-sdk:
>>> |  *    lib32-util-linux-losetup *      lib32-util-linux-umount *
>>>        lib32-util-linux-swaponoff *
>>> |  * opkg_install_cmd: Cannot install package lib32-task-core-sdk.
>>> NOTE: package lib32-core-image-sato-sdk-1.0-r0: task do_rootfs: Failed
>>>
>>> The missing dependency error is now reported on task-core-sdk instead
>>> of util-linux.
>>>
>>>>
>>>> and then looking at the package in oe-core..  The util-linux-* packages
>>>> should have been generated when the util-linux recipe was built.  If the
>>>> util-linux recipe was not built in the lib32 case, then that could be
>>>> the
>>>> problem -- however at least the base package was built based on the
>>>> error
>>>> message indicating the base (util-linux) package required the
>>>> util-linux-*
>>>> packages.
>>>
>>>
>>> Yes, I can see the following directory in my work/:
>>>
>>> tmp/work/x86-pokymllib32-linux/lib32-util-linux-2.21.1-r1
>>>
>>>>
>>>> For debugging, I'd suggest start looking at the the generated
>>>> util-linux.spec file in the tmp/work/arch/util-linux-... directory.
>>>
>>>
>>> I can't find any spec file in my util-linux directory unfortunately.
>>>
>>>> Check
>>>> if there is an entry for util-linux-swapoff.  Assuming there is, then
>>>> most
>>>> likely the files section was empty -- so scroll toward the bottom and
>>>> check
>>>> for %files -n util-linux-swapoff (or similar).  Is it empty?
>>>>
>>>> If the entry is missing (or it's there and empty) then the issue is
>>>> nothing
>>>> was copied in the do_install/do_package step(s).
>>>>
>>>> Check out package-split/util-linux-swapoff/*  and see if there is
>>>> anything
>>>> in there... if not then check packages/sbin/ for the swapoff binary....
>>>>  If
>>>> it's there, but not in the split.. then it got shuffled into the wrong
>>>> location -- check the do_package log and see if there are any errors
>>>> related
>>>> to either hte swapoff binary or util-linux-swapoff.
>>>
>>>
>>> This might be the case, as the
>>>
>>> tmp/work/x86-pokymllib32-linux/lib32-util-linux-2.21.1-r1/packages-split/lib32-util-linux-swaponoff
>>> is empty, but I can see both "swapon" and "swapoff" in
>>> tmp/work/x86-pokymllib32-linux/lib32-util-linux-2.21.1-r1/package/sbin/.
>>> I will continue to investigate in this direction.
>>> Again, thank you very much for your help.
>>>
>>> Best,
>>> Bogdan
>>>
>>>>
>>>> --Mark
>
>
>
Comment 4 MaNing 2012-07-06 07:38:45 UTC
There is no such issue in 1.2.1 testing.

Tree/Branch: Poky/denzil
Poky Commit id: 73cdebf60df225ee10f2eb215935be3b61e1b831
Comment 5 Bogdan Marinescu 2012-07-24 12:52:45 UTC
Unable to reproduce on the poky master with commit 0ffb02eec2beaea27ff0ec9d3d31b0a09e675a4c
Comment 6 Laurentiu Serban 2012-07-30 19:52:44 UTC
Verified this in fb53d69d9c726e6a663ea276cc440676e20f8326