Bug 13276

Summary: Building images fails on non-x86/x86_64 hosts
Product: [Build System, Metadata & Runtime] Other YP Layers Reporter: Anders Montonen <Anders.Montonen>
Component: layersAssignee: Naveen Saini <naveen.kumar.saini>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: naveen.kumar.saini, poky.bs.watcher, poky.watcher, randy.macleod, richard.purdie
Version: 2.8   
Target Milestone: Future   
Hardware: All   
OS: Multiple   
Whiteboard: Backport to 2.7
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
proposed solution none

Description Anders Montonen 2019-04-11 21:41:14 UTC
image_types_wic.bbclass adds an unconditional dependency on syslinux-native, but syslinux is only compatible with x86/x86_64 hosts.

This issue was noticed when trying to build core-image-sato for the BeagleBone on an AArch64 host, but isn't dependent on the particular image or target. Any recipe that includes image.bbclass should trigger the failure.
Comment 1 Richard Purdie 2019-04-18 14:34:13 UTC
I'm not sure its entirely unconditional. The dependency seems to come from:

WKS_FILE_DEPENDS_DEFAULT = "syslinux-native bmap-tools-native cdrtools-native btrfs-tools-native squashfs-tools-native e2fsprogs-native"

which led to:

meta/classes/image_types_wic.bbclass:WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT} ${WKS_FILE_DEPENDS_BOOTLOADERS}"

which leads to:

meta/classes/image_types_wic.bbclass:DEPENDS += "${@ '${WKS_FILE_DEPENDS}' if d.getVar('USING_WIC') else '' }

and then:

meta/classes/image_types_wic.bbclass:USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"

So it does look like you have to be using wic as an output file format.

The dependency would still seem inaccurate and should probably only be added if the target machine is x86?
Comment 2 Naveen Saini 2019-07-23 06:30:14 UTC
Created attachment 4542 [details]
proposed solution

Hi Anders,

I have attached a patch with proposed solution. I can not verify the patch. Could you please apply this patch and try to reproduce the issue on your non x86 build machine.

Regards,
Naveen
Comment 3 Anders Montonen 2019-07-27 15:12:42 UTC
Hello Naveen,

With your patch applied, the build finishes successfully.
Comment 4 Naveen Saini 2019-07-29 02:33:19 UTC
Fix is merged in master branch. 

https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b8cbefb3fdb4b62a8a536c717359fd6314335cb7