<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11240</bug_id>
          
          <creation_ts>2017-03-24 15:47:48 +0000</creation_ts>
          <short_desc>libjpeg-turbo fails to build for aarch64/arm targets on aarch64 host</short_desc>
          <delta_ts>2017-04-03 14:10:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>graphics</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tristan Van Berkom">tristan.vanberkom</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71701</commentid>
    <comment_count>0</comment_count>
      <attachid>3670</attachid>
    <who name="Tristan Van Berkom">tristan.vanberkom</who>
    <bug_when>2017-03-24 15:47:48 +0000</bug_when>
    <thetext>Created attachment 3670
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 &apos;nasm-native&apos; (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 &apos;bitbake &lt;target&gt;&apos;

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 &apos;runqemu qemux86&apos;
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 &apos;nasm-native&apos; (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 &apos;lcms-dbg&apos; is unbuildable, removing...
Missing or unbuildable dependency chain was: [&apos;lcms-dbg&apos;, &apos;tiff&apos;, &apos;jpeg&apos;, &apos;nasm-native&apos;]
ERROR: Required build target &apos;freedesktop-contents-sdk&apos; has no buildable providers.
Missing or unbuildable dependency chain was: [&apos;freedesktop-contents-sdk&apos;, &apos;task-freedesktop-contents-sdk&apos;, &apos;lcms-dbg&apos;, &apos;tiff&apos;, &apos;jpeg&apos;, &apos;nasm-native&apos;]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72026</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-04-03 14:10:21 +0000</bug_when>
    <thetext>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&apos;s building for x86 is under review but that is basically an optimisation, this bug is now fixed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>3670</attachid>
            <date>2017-03-24 15:47:48 +0000</date>
            <delta_ts>2017-03-24 15:47:48 +0000</delta_ts>
            <desc>Patch to only require nasm-native on intel target architectures</desc>
            <filename>0001-libjpeg-turbo-Support-building-on-non-intel-targets.patch</filename>
            <type>text/plain</type>
            <size>1549</size>
            <attacher name="Tristan Van Berkom">tristan.vanberkom</attacher>
            
              <data encoding="base64">RnJvbSAyOWE4MmJhMjVhOWMzOTVmNTIxNDY5OWNhMGFmYjViZDQ2NWViZGYxIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBUcmlzdGFuIFZhbiBCZXJrb20gPHRyaXN0YW4udmFuYmVya29t
QGNvZGV0aGluay5jby51az4KRGF0ZTogRnJpLCAyNCBNYXIgMjAxNyAxNTozNzozNiArMDAwMApT
dWJqZWN0OiBbUEFUQ0h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