Bug 11240

Summary: libjpeg-turbo fails to build for aarch64/arm targets on aarch64 host
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Tristan Van Berkom <tristan.vanberkom>
Component: graphicsAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher
Version: unspecified   
Target Milestone: 2.3 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Patch to only require nasm-native on intel target architectures none

Description Tristan Van Berkom 2017-03-24 15:47:48 UTC
Created attachment 3670 [details]
Patch to only require nasm-native on intel target architectures

As the title says, libjpeg-turbo in recipes-graphics has an unconditional dependency on nasm-native, which is intel specific and wont be provided on non intel arches.

Attaching a patch which fixes this by only requiring nasm-native when targeting intel architectures.

Here is some output from our build, the key error messages are:

ERROR: Nothing PROVIDES 'nasm-native' (but /home/builder/flatpak-build-scripts/work/build/aarch64/freedesktop-sdk-base-1-6//yocto/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb DEPENDS on or otherwise requires it)
ERROR: nasm-native was skipped: incompatible with host aarch64-linux (not in COMPATIBLE_HOST)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./freedesktop-sdk-build-yocto /home/builder/flatpak-build-scripts/work/build/aarch64/freedesktop-sdk-base-1-6/ /home/builder/flatpak-build-scripts/work/build/aarch64/freedesktop-sdk-base-1-6/build/ aarch64 a1c64844ddd0d5d64de35b0437eaf4db197c931b 1.6

### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'
WARNING: Invalid protocol (svk) in PREMIRRORS: svk://.*/.*   http://autobuilder.yoctoproject.org/sources/
Loading cache: 100% |########################################################################################################################################################################| Time: 0:00:00
Loaded 1336 entries from dependency cache.
NOTE: /home/builder/flatpak-build-scripts/work/build/aarch64/freedesktop-sdk-base-1-6//meta-freedesktop/recipes-core/krb5/krb5_1.13.2.bb: base_contains is deprecated, please use bb.utils.contains instead.
Parsing recipes: 100% |######################################################################################################################################################################| Time: 0:00:51
Parsing of 877 .bb files complete (3 cached, 874 parsed). 1336 targets, 229 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'nasm-native' (but /home/builder/flatpak-build-scripts/work/build/aarch64/freedesktop-sdk-base-1-6//yocto/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb DEPENDS on or otherwise requires it)
ERROR: nasm-native was skipped: incompatible with host aarch64-linux (not in COMPATIBLE_HOST)
NOTE: Runtime target 'lcms-dbg' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['lcms-dbg', 'tiff', 'jpeg', 'nasm-native']
ERROR: Required build target 'freedesktop-contents-sdk' has no buildable providers.
Missing or unbuildable dependency chain was: ['freedesktop-contents-sdk', 'task-freedesktop-contents-sdk', 'lcms-dbg', 'tiff', 'jpeg', 'nasm-native']
Comment 1 Ross Burton 2017-04-03 14:10:21 UTC
The core problem was that nasm had a bad COMPATIBLE_HOST assignment, this has been removed in oe-core 41d6e5bb295e952de6e1a3e36b313caa58e935bf.

The fix to libjpeg-turbo to only depend on nasm-native when it's building for x86 is under review but that is basically an optimisation, this bug is now fixed.