Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jan 2013 07:51:25 GMT
From:      Rainer Hurling <rhurlin@gwdg.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/175427: [patch] graphics/hugin: fix build with clang
Message-ID:  <201301190751.r0J7pPxO064195@red.freebsd.org>
Resent-Message-ID: <201301190800.r0J800pv052355@freefall.freebsd.org>

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

>Number:         175427
>Category:       ports
>Synopsis:       [patch] graphics/hugin: fix build with clang
>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:   Sat Jan 19 08:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Rainer Hurling
>Release:        10.0-CURRENT (amd64)
>Organization:
>Environment:
FreeBSD xxx.xxx.xxx 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r245605: Fri Jan 18 17:40:59 CET 2013     xxx@xxx.xxx.:/usr/obj/usr/src/sys/XXX  amd64
>Description:
graphics/hugin does not build with clang.

This is because of some minor issues in zthreads Guard.h and can be fixed with a small patch, as glarkin@ suggested on ports@.

Another patch from vd@, also suggested on ports@, fixes a small bug in logger.h.

>How-To-Repeat:
Try to build graphics/hugin with clang.
>Fix:
All I did is making an updated patch of both issues mentioned above, and now hugin should be able to build with clang.

Patch attached with submission follows:

diff -Naur hugin.orig/files/patch-src__foreign__flann__util__logger.h hugin/files/patch-src__foreign__flann__util__logger.h
--- hugin.orig/files/patch-src__foreign__flann__util__logger.h	1970-01-01 01:00:00.000000000 +0100
+++ hugin/files/patch-src__foreign__flann__util__logger.h	2013-01-18 19:05:12.000000000 +0100
@@ -0,0 +1,10 @@
+--- src/foreign/flann/util/logger.h.orig	2011-12-02 18:02:36.925022000 +0100
++++ src/foreign/flann/util/logger.h	2013-01-18 19:04:18.000000000 +0100
+@@ -32,6 +32,7 @@
+ #define LOGGER_H
+ 
+ #include <cstdio>
++#include <stdarg.h>
+ #include "flann/general.h"
+ 
+ 
diff -Naur hugin.orig/files/patch-src__foreign__zthread__include__zthread__Guard.h hugin/files/patch-src__foreign__zthread__include__zthread__Guard.h
--- hugin.orig/files/patch-src__foreign__zthread__include__zthread__Guard.h	1970-01-01 01:00:00.000000000 +0100
+++ hugin/files/patch-src__foreign__zthread__include__zthread__Guard.h	2013-01-18 19:10:18.000000000 +0100
@@ -0,0 +1,31 @@
+--- src/foreign/zthread/include/zthread/Guard.h.orig	2011-12-02 18:02:37.253022000 +0100
++++ src/foreign/zthread/include/zthread/Guard.h	2013-01-18 19:08:14.000000000 +0100
+@@ -108,7 +108,7 @@
+   }
+ 
+   template <class LockType>
+-  static void createScope(LockHolder<LockType>& l, unsigned long ms) {
++  static bool createScope(LockHolder<LockType>& l, unsigned long ms) {
+ 
+     if(Scope1::createScope(l, ms))
+       if(!Scope2::createScope(l, ms)) {
+@@ -428,8 +428,8 @@
+   template <class U, class V>
+   Guard(Guard<U, V>& g) : LockHolder<LockType>(g) {
+ 
+-    LockingPolicy::shareScope(*this, extract(g));
+-    
++    LockingPolicy::shareScope(*this, this->extract(g));
++
+   }
+ 
+   /**
+@@ -458,7 +458,7 @@
+   template <class U, class V>
+   Guard(Guard<U, V>& g, LockType& lock) : LockHolder<LockType>(lock) {
+ 
+-    LockingPolicy::transferScope(*this, extract(g));
++    LockingPolicy::transferScope(*this, this->extract(g));
+ 
+   }
+ 


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



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