Bug 237285

Summary: graphics/rawtherapee: incompatible compiler options on powerpc64
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Matthias Andree <mandree>
Status: Closed FIXED    
Severity: Affects Some People CC: linimon, mandree
Priority: --- Flags: mandree: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch mandree: maintainer-approval-

Description Piotr Kubaj freebsd_committer 2019-04-14 20:06:13 UTC
Created attachment 203675 [details]
patch

OPENMP is only for i386/amd64 (per option description), but it's enabled by default on all architectures.

Enable OPENMP only on amd64 and i386 to fix build.

Tested on powerpc64.
Comment 1 Matthias Andree freebsd_committer 2019-04-15 20:19:19 UTC
Hi Piotr, would you happen to have a log of a failing build?

I seem to recall that I can build ARM64 just fine, so I'm loathe to go for your proposed patch.
Comment 2 Matthias Andree freebsd_committer 2019-04-17 23:36:48 UTC
Comment on attachment 203675 [details]
patch

This isn't the right fix. Please show a log how the build is failing on powerpc64. Aarch64 (ARM64) doesn't have OpenMP either, the Makefile avoids libomp, and the configure phase just won't find OpenMP and disable it, the package build in poudriere succeeds (at least with 5.6-rc2).
Comment 4 Matthias Andree freebsd_committer 2019-04-18 15:39:57 UTC
And what changes in compiler options if we avoid the OPENMP option? You can abort a potential test build without OPENMP option after a few compiled files, all the options should have been visible.

Reason I am asking is that the fix appears to be a side effect, and in particular, that your compiler rejects -march=generic.
Comment 5 Matthias Andree freebsd_committer 2019-04-18 15:42:08 UTC
(Please provide a log of the succeeded or ongoing build with OPENMP disabled.)
Comment 6 commit-hook freebsd_committer 2019-04-21 01:22:12 UTC
A commit references this bug:

Author: mandree
Date: Sun Apr 21 01:21:29 UTC 2019
New revision: 499524
URL: https://svnweb.freebsd.org/changeset/ports/499524

Log:
  Update RawTherapee to 5.6 release.

  Announcement: <https://rawtherapee.com/blog/rawtherapee-5.6-released>

  Only offer OPENMP option on x86/amd64 for now.

  While here, avoid -mtune=generic on anything but x86/amd64/aarch64. [1]

  PR:		237285 [1]
  Submitted by:	pkubaj [1]

Changes:
  head/graphics/rawtherapee/Makefile
  head/graphics/rawtherapee/distinfo
  head/graphics/rawtherapee/files/patch-proper-cleanup-to-avoid-SIGABRT
  head/graphics/rawtherapee/files/patch-rtengine_previewimage.cc
  head/graphics/rawtherapee/files/patch-rtgui_CMakeLists.txt
  head/graphics/rawtherapee/pkg-plist
Comment 7 Matthias Andree freebsd_committer 2019-04-21 01:23:00 UTC
Looks like the culprit is the CMAKE_ARGS+=    -DPROC_TARGET_NUMBER="1". 
I will now limit this to i386, amd64, aarch64, it appears that the other architectures (ARM (32 bit), MIPS, PowerPC, RISC-V, SPARC64) would not support it.

Please check if the upgrade rawtherapee 5.6 (ports r499524) fixes your powerpc64 build and reopen this PR if it does not.