Bug 182425 - [PATCH] graphics/darktable: Fix build with Clang on FreeBSD 10
Summary: [PATCH] graphics/darktable: Fix build with Clang on FreeBSD 10
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-26 23:00 UTC by Jean-Sébastien Pédron
Modified: 2014-01-10 22:01 UTC (History)
0 users

See Also:


Attachments
file.txt (515 bytes, text/plain)
2013-09-26 23:00 UTC, Jean-Sébastien Pédron
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Sébastien Pédron freebsd_committer freebsd_triage 2013-09-26 23:00:00 UTC
With Clang and libc++ being the default in HEAD, starting with 1000054, darktable fails to build.

First, gcc can't be used anymore, until we find a solution to make it use libc++ instead of libstdc++. Otherwise both libraries are loaded at runtime (libstdc++ is used by libdarktable.so and libc++ is used by dependencies) and darktable crashes. For now, until this is fixed, I think the "GCC" option should not be presented to the user for OSVERSION >= 1000054.

Then, to build with Clang, a minor patch is required (attached). This patch is already committed upstream and will make it to 1.3.x.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-26 23:00:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->danfe

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-10-10 14:46:47 UTC
Author: danfe
Date: Thu Oct 10 13:46:39 2013
New Revision: 330000
URL: http://svnweb.freebsd.org/changeset/ports/330000

Log:
  Fix one build problem with Clang on FreeBSD 10.  There is another problem
  due to conflict between libstdc++ and libc++, it will be fixed separately.
  
  PR:		ports/182425
  Submitted by:	dumbbell

Added:
  head/graphics/darktable/files/
  head/graphics/darktable/files/patch-src-common-imageio_exr.hh   (contents, props changed)

Added: head/graphics/darktable/files/patch-src-common-imageio_exr.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/darktable/files/patch-src-common-imageio_exr.hh	Thu Oct 10 13:46:39 2013	(r330000)
@@ -0,0 +1,24 @@
+--- src/common/imageio_exr.hh.orig
++++ src/common/imageio_exr.hh
+@@ -21,7 +21,11 @@
+ #include "common/image.h"
+ #include "common/mipmap_cache.h"
+ 
++#if __cplusplus >= 201103L || defined(__clang__)
++#include <memory>
++#else
+ #include <tr1/memory>
++#endif
+ 
+ #include <OpenEXR/ImfFrameBuffer.h>
+ #include <OpenEXR/ImfTestFile.h>
+@@ -56,7 +60,11 @@ public:
+   }
+ 
+   uint32_t size;
++#if __cplusplus >= 201103L || defined(__clang__)
++  std::shared_ptr<uint8_t> data;
++#else
+   std::tr1::shared_ptr<uint8_t> data;
++#endif
+ };
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2014-01-10 22:00:27 UTC
State Changed
From-To: open->closed

Superseded by ports/185647.