From nobody@FreeBSD.org  Sun Oct 28 08:15:03 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 1B11679D
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 28 Oct 2012 08:15:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 028468FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 28 Oct 2012 08:15:03 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9S8F28W028574
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 28 Oct 2012 08:15:02 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q9S8F2xr028553;
	Sun, 28 Oct 2012 08:15:02 GMT
	(envelope-from nobody)
Message-Id: <201210280815.q9S8F2xr028553@red.freebsd.org>
Date: Sun, 28 Oct 2012 08:15:02 GMT
From: Rainer Hurling <rhurlin@gwdg.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [maintainer][patch] math/saga: workaround for CLANG build problem
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         173148
>Category:       ports
>Synopsis:       [maintainer][patch] math/saga: workaround for CLANG build problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bdrewery
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 28 08:20:01 UTC 2012
>Closed-Date:    Thu Nov 01 09:43:04 CDT 2012
>Last-Modified:  Thu Nov 01 09:43:04 CDT 2012
>Originator:     Rainer Hurling
>Release:        10.0-CURRENT (amd64)
>Organization:
>Environment:
FreeBSD xxx.xxx.xxx 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r242173: Sat Oct 27 11:31:10 CEST 2012     xxx@xxx.xxx.xx:/usr/obj/usr/src/sys/XXX  amd64
>Description:
Found on Pointyhat West CLANG exp run from 2012-10-20 that math/saga does not buid due to an error found by clang:

table.cpp:128:17: error: taking the address of a temporary object of type 'CSG_Table' [-Waddress-of-temporary]
        pTable->Assign(&Get_Connection()->Get_Field_Desc(pTables->asString()));
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(see http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp-clang.20121020001711.pointyhat-west/saga-2.0.8_3.log)

This error does not happen with gcc.

The SAGA GIS core team is working on a new release version. In the meantime this workaround should be enough to make CLANG systems happy, I hope.
>How-To-Repeat:
Building math/saga on a CLANG based system.

>Fix:
Force the build to use gcc instead of clang should do it for now.

Patch attached with submission follows:

--- saga.orig/Makefile	2012-08-03 14:33:55.000000000 +0200
+++ saga/Makefile	2012-10-27 21:33:47.000000000 +0200
@@ -28,6 +28,7 @@
 USE_WX=		2.8
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
+USE_GCC=	any
 USE_AUTOTOOLS=	libtool
 CFLAGS+=	-I${LOCALBASE}/include
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}


>Release-Note:
>Audit-Trail:
Class-Changed-From-To: sw-bug->maintainer-update 
Class-Changed-By: edwin 
Class-Changed-When: Sun Oct 28 08:20:10 UTC 2012 
Class-Changed-Why:  
Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173148 
Responsible-Changed-From-To: freebsd-ports-bugs->bdrewery 
Responsible-Changed-By: bdrewery 
Responsible-Changed-When: Wed Oct 31 15:45:13 CDT 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173148 
State-Changed-From-To: open->closed 
State-Changed-By: bdrewery 
State-Changed-When: Thu Nov 1 09:43:03 CDT 2012 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173148 
>Unformatted:
