Skip to contentSkip to conversation

libjpeg-turbo: fix build on aarch64 or non-intel build hosts

PATCH Superseded Tristan Van Berkom 5 participants 7 messages Mar 29, 2017 – Mar 31, 2017

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libjpeg-turbo: fix build on aarch64 or non-intel build hosts

This is already filed in the appropriate bugzilla:
   https://bugzilla.yoctoproject.org/show_bug.cgi?id=11240

Just notifying the list as the custom goes...

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.

Cheers,
    -Tristan

From d76d57a148dd372ff26b9b902b7b79a4ddb5e7a2 Mon Sep 17 00:00:00 2001
From: Tristan Van Berkom <[email protected]>
Date: Fri, 24 Mar 2017 15:37:36 +0000
Subject: [PATCH] libjpeg-turbo: Support building on non intel targets.

nasm is intel specific, however libjpeg-turbo is still desirable on other architectures.

Without this patch, it would seem that nasm is built on an intel host and then ignored when compiling libjpeg-turbo for an arm target, however it has libjpeg-turbo requiring nasm be built when building on an arm/aarch64 host.

This fixes the issue so that nasm-native is not required on the host when building for an aarch64 target.

---
 meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.1.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.1.bb +2 -1
index 70d38f4a1a..a650d6af2d 100644
@@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=13;md5=05bab7c7ad899d85bfba60da1a127
                     file://jpeglib.h;endline=16;md5=f67d70e547a2662c079781c72f877f72 \
                     file://djpeg.c;endline=11;md5=b90b6d2b4119f9e5807cd273f525d2af \
 "
-DEPENDS = "nasm-native"
+DEPENDS_append_x86-64 = " nasm-native"
+DEPENDS_append_x86    = " nasm-native"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
            file://fix-mips.patch"
Signature · 1 line
2.11.0
#1 lore raw

✗ patchtest: failure for libjpeg-turbo: fix build on aarch64 or non-intel build hosts

== Series Details ==

Series: libjpeg-turbo: fix build on aarch64 or non-intel build hosts
Revision: 1
URL : https://patchwork.openembedded.org/series/6049/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Patch            libjpeg-turbo: fix build on aarch64 or non-intel build hosts
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
#2 lore raw
In reply to Tristan Van Berkom
Quoted 11 lines · Tristan Van Berkom

This is already filed in the appropriate bugzilla:

   https://bugzilla.yoctoproject.org/show_bug.cgi?id=11240

Just notifying the list as the custom goes...

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.

Even with this patch, trying to build for an x86 target on an aarch64 host will still fail, right?

Quoted 9 lines

Cheers,
-Tristan

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw

Hi Tristan,

Quoted 10 lines · Andre McCurdy
Quoted 8 lines · Tristan Van Berkom

This is already filed in the appropriate bugzilla:

   https://bugzilla.yoctoproject.org/show_bug.cgi?id=11240

Just notifying the list as the custom goes...

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

Yes, nasm is intel specific. However, we should be able to run nasm on other archs like arm/aarch64 as it claims to be a portable 80x86 assembler.

Quoted 5 lines
Quoted 2 lines

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

Even with this patch, trying to build for an x86 target on an aarch64 host will still fail, right?

Agree with Andre here. I would suggest to update nasm recipe to support build for other archs as well (tested on arm and it works as expected. Will require more testing on other archs).

Quoted 2 lines
Quoted 2 lines

Cheers,
-Tristan

Best Regards,
Maxin

#4 lore raw
Quoted 5 lines · Maxin B. John

Agree with Andre here. I would suggest to update nasm recipe to support build for other archs as well (tested on arm and it works as expected. Will require more testing on other archs).

Yes. Simply deleting the COMPATIBLE_HOST in nasm.bb should be sufficient, Debian builds nasm for every architecture so that demonstrates that it builds just fine.

Ross

#5 lore raw
Quoted 11 lines · Ross
Quoted 6 lines

Agree with Andre here. I would suggest to update nasm recipe to support
build for other archs as well (tested on arm and it works as expected. Will
require more testing on other archs).

Yes.  Simply deleting the COMPATIBLE_HOST in nasm.bb should be sufficient, Debian builds nasm for every architecture so that demonstrates that it builds just fine.

Ok, I had this concern too when originally discussing the approach in #yocto, this sounds better.

So just to get things straight, does this mean we no longer need the patch to remove nasm-native from the jpeg turbo dependencies on non- intel targets ?

I think "-native" here only means "build an nasm that I can run on the host architecture" then I think this is fine, as jpeg-turbo will just ignore the needlessly built nasm when targetting non-intel platforms.

Cheers,
    -Tristan

#6 lore raw
Quoted 8 lines · Tristan Van Berkom

So just to get things straight, does this mean we no longer need the patch to remove nasm-native from the jpeg turbo dependencies on non- intel targets ?

I think "-native" here only means "build an nasm that I can run on the host architecture" then I think this is fine, as jpeg-turbo will just ignore the needlessly built nasm when targetting non-intel platforms.

Both have been merged, as nasm-native is only required on x86 targets so there's no point building it needlessly.

Ross