Summary: | graphics/lensfun: fails to build on armv6 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Mikael Urankar <mikael> | ||||||
Component: | Individual Port(s) | Assignee: | Alexey Dokuchaev <danfe> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | freebsd-arm, jbeich, mmoll, sbruno | ||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(danfe) |
||||||
Version: | Latest | ||||||||
Hardware: | arm | ||||||||
OS: | Any | ||||||||
URL: | http://chips.ysv.freebsd.org/data/11armv6-default/2015-05-04_04h43m53s/logs/errors/lensfun-0.3.0.log | ||||||||
Bug Depends on: | 205006 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Mikael Urankar
2015-05-07 16:05:16 UTC
I think the proper check is to do something along the lines of: .if empty(MACHINE_CPU:Msse2) CMAKE_ARGS+= -DBUILD_FOR_SSE2:BOOL=OFF -DBUILD_FOR_SSE:BOOL=OFF .endif Does this work for you? Created attachment 156510 [details] fix arm build I've updated the patch, build logs for amd64, i386 and armv6: http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/lensfun-0.3.0_101amd64.log http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/lensfun-0.3.0_101i386.log http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/lensfun-0.3.0_armv6.log Looks good to me. I'll commit if danfe has no objections. LGTM. I would've probably changed "empty(...)" into "! ${...}" but that's up to you. Just make sure there are no whitespace bugs when committing, thanks! A commit references this bug: Author: mmoll Date: Sat Nov 28 02:50:41 UTC 2015 New revision: 402504 URL: https://svnweb.freebsd.org/changeset/ports/402504 Log: graphics/lensfun: fix build on arm PR: 200028 Submitted by: Mikael Urankar <mikael.urankar@gmail.com> Approved by: danfe (maintainer) Changes: head/graphics/lensfun/Makefile committed, thanks! Comment on attachment 156510 [details] fix arm build >+.if empty(MACHINE_CPU:Msse2) >+CMAKE_ARGS+= -DBUILD_FOR_SSE2:BOOL=OFF Don't forget to bump PORTREVISION as you're pessimizing i386 build by default (no CPUTYPE -> no SSE). I've sent upstream better version: IF(CMAKE_SYSTEM_PROCESSOR MATCHES "[XxIi][0-9]?86|[Aa][Mm][Dd]64") SET(X86_ON ON) else() SET(X86_ON OFF) ENDIF() ... OPTION(BUILD_FOR_SSE "Build with support for SSE" ${X86_ON}) OPTION(BUILD_FOR_SSE2 "Build with support for SSE2" ${X86_ON}) http://sourceforge.net/p/lensfun/mailman/message/34654903/ A commit references this bug: Author: mmoll Date: Sat Nov 28 17:53:18 UTC 2015 New revision: 402552 URL: https://svnweb.freebsd.org/changeset/ports/402552 Log: graphics/lensfun: bump PORTREVISION r402504 did effectively change the resulting binary for default i386 builds PR: 200028 Submitted by: jbeich Changes: head/graphics/lensfun/Makefile thanks Jan! > Don't forget to bump PORTREVISION as you're pessimizing i386 build by default (no CPUTYPE -> no SSE). PORTREVISION bump was pointless, and there's no pessimization; users expecting any SSE code in their binaries should have set CPUTYPE in their /etc/make.conf long type ago. We (correctly) produce 32-bit packages for i486 by default. > I've sent upstream better version: [...] I don't see much value in this code. Even if it will be accepted, checking CPUTYPE would have to stay since not all i386 CPUs support SSE. (In reply to Alexey Dokuchaev from comment #10) > users expecting any SSE code in their binaries should have set CPUTYPE in their /etc/make.conf long type ago. Did you check the source? lensfun uses CPUID, or was until it was broken by cmake conversion which forced -msse for all files, not just those using SSE intrinsics. Don't forget package-only users often cannot rebuild ports either because they have old hardware (that may still support SSE), bandwidth restrictions, broken environment, etc. In such cases runtime CPU detection often helps to satisfy wider range of users. > We (correctly) produce 32-bit packages for i486 by default. Why do you assume I disagree? ;) > Even if it will be accepted, checking CPUTYPE would have to stay since not all i386 CPUs support SSE. That wasn't the only fix I've sent upstream. While CPU may not support SSE, the toolchain must. Let's move to bug 205006. |