Bug 237285 - graphics/rawtherapee: incompatible compiler options on powerpc64
Summary: graphics/rawtherapee: incompatible compiler options on powerpc64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Matthias Andree
Depends on:
Reported: 2019-04-14 20:06 UTC by Piotr Kubaj
Modified: 2019-04-21 01:23 UTC (History)
2 users (show)

See Also:
mandree: maintainer-feedback+

patch (599 bytes, patch)
2019-04-14 20:06 UTC, Piotr Kubaj
mandree: maintainer-approval-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2019-04-14 20:06:13 UTC
Created attachment 203675 [details]

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]

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

  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]

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.