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.
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 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).
https://talos.anongoth.pl/data/powerpc64-default/2019-04-06_01h45m28s/logs/errors/rawtherapee-5.5_1.log
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.
(Please provide a log of the succeeded or ongoing build with OPENMP disabled.)
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
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.