Created attachment 160248 [details] Avoid calling __builtin_cpu_supports() with clang During the exp-run in bug 201377, it was found that graphics/darktable gives errors with a recent clang 3.7.0 snapshot: http://package18.nyi.freebsd.org/data/headamd64PR201377-default/2015-07-31_13h29m42s/logs/errors/darktable-1.6.7.log This is because the program optionally calls __builtin_cpu_supports() to get some CPU feature flags, and while clang 3.7.0 now supports this builtin, our libgcc/libcompiler-rt does not have the required support yet. To fix this, avoid calling the builtin, if clang is used. Note that I still could not verify whether the port completely builds, since for me, it always fails with: CMake Error at data/cmake_install.cmake:76 (file): file INSTALL cannot find "/usr/work/share/dim/ports/graphics/darktable/work/.build/data/darktable.desktop". Call Stack (most recent call first): cmake_install.cmake:34 (include) This is not a clang-related problem though. It may be due to some of the dozen dependencies, but I cannot figure out which one.
Hello Dimitry! I added a patch to D3247: https://reviews.freebsd.org/D3247 It builds successfully for me with Clang 3.7.0 from ports (including OpenMP support!).
(In reply to Jean-Sebastien Pedron from comment #1) I'm seeing the same issue on DragonFly using the base compiler GCC 5.2: -- Installing: /wrkdirs/graphics/darktable/work/stage/usr/local/share/darktable/luarc CMake Error at data/cmake_install.cmake:76 (file): file INSTALL cannot find "/wrkdirs/graphics/darktable/work/.build/data/darktable.desktop". Call Stack (most recent call first): cmake_install.cmake:34 (include)
A commit references this bug: Author: dumbbell Date: Wed Aug 26 17:01:26 UTC 2015 New revision: 395381 URL: https://svnweb.freebsd.org/changeset/ports/395381 Log: graphics/darktable: Add patch to support LLVM/Clang 3.7.0 PR: 202594 Reviewed by: bapt, kwm Approved by: bapt Differential Revision: https://reviews.freebsd.org/D3247 Changes: head/graphics/darktable/files/patch-src_common_darktable.c
(In reply to John Marino from comment #2) Hi John! The problem you see is related to Ninja 1.6.0. See #202399: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202399
Thanks, it's building now.