Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Sep 2013 21:59:50 GMT
From:      Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/182425: [PATCH] graphics/darktable: Fix build with Clang on FreeBSD 10
Message-ID:  <201309262159.r8QLxoX2024440@oldred.freebsd.org>
Resent-Message-ID: <201309262200.r8QM00mr055021@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         182425
>Category:       ports
>Synopsis:       [PATCH] graphics/darktable: Fix build with Clang on FreeBSD 10
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 26 22:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Jean-Sébastien Pédron
>Release:        FreeBSD 10.0-ALPHA1
>Organization:
>Environment:
FreeBSD magellan.dumbbell.fr 10.0-ALPHA1 FreeBSD 10.0-ALPHA1 #0 64ee5df7: Mon Sep 16 20:29:01 CEST 2013     root@magellan.dumbbell.fr:/usr/obj/home/dumbbell/Projects/freebsd/src/GIT/sys/GENERIC  amd64
>Description:
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.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- src/common/imageio_exr.hh
+++ 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
 };
 
 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309262159.r8QLxoX2024440>