From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jan 7 18:20:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0DC2129 for ; Tue, 7 Jan 2014 18:20:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 79FA610EF for ; Tue, 7 Jan 2014 18:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s07IK0AY098709 for ; Tue, 7 Jan 2014 18:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s07IK0kC098708; Tue, 7 Jan 2014 18:20:00 GMT (envelope-from gnats) Resent-Date: Tue, 7 Jan 2014 18:20:00 GMT Resent-Message-Id: <201401071820.s07IK0kC098708@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Rainer Hurling Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF8EB111 for ; Tue, 7 Jan 2014 18:18:04 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9EDC010DF for ; Tue, 7 Jan 2014 18:18:04 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s07II4nC088316 for ; Tue, 7 Jan 2014 18:18:04 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s07II4Ne088291; Tue, 7 Jan 2014 18:18:04 GMT (envelope-from nobody) Message-Id: <201401071818.s07II4Ne088291@oldred.freebsd.org> Date: Tue, 7 Jan 2014 18:18:04 GMT From: Rainer Hurling To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/185559: [maintainer update] math/saga: unbreak build on 10.0 and higher X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2014 18:20:00 -0000 >Number: 185559 >Category: ports >Synopsis: [maintainer update] math/saga: unbreak build on 10.0 and higher >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Jan 07 18:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Rainer Hurling >Release: 11.0-CURRENT amd64 (clang) >Organization: >Environment: FreeBSD xxx.xxx.xxx 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r260318: Sun Jan 5 16:39:32 CET 2014 xxx@xxx.xxx.xxx:/usr/obj/usr/src/sys/XXX amd64 >Description: Errors with math/saga have been reported from cluster builds for several weeks now, for example http://beefy2.isc.freebsd.org/bulk/10-release-amd64-RELENG10_0/latest/logs/errors/saga-2.1.0_3.log While SAGA GIS does build on 8.x and 9.x, it fails on 10.0 and above. The main problems seem to be related to the new linker behaviour and libstdc++/libc++ changes, both in 10.0 and HEAD. Because of the upcoming 10.0 release, I decided to submit a (somewhat ugly) workaround. With the appended patch, SAGA GIS should be able to build on all OS versions again (proofed with 9.2 and 11.0-CURRENT). With OS versions 10.0 and HEAD I tried to use combinations of gcc46+ and CXXFLAGS+=-std=gnu++0x, as suggested by the cluster report. This overcomes the errors reported by the cluster, but fails with new errors, related to wxgtk. I was not able to find a solution, so I decided to waive the OpenMP option for 10.0 and above :( ------- With clang build on 10.0 and higher, one big problem remains: the SAGA GIS module 'libio_gdal.so' (at /usr/local/lib/saga/) is corrupted and because of this, the usage of 'saga_cmd' core dumps. You can easily try this by running 'saga_cmd' in a terminal. I would be very happy, if someone could have a deeper look into this GDAL related problem. Perhaps something is wrong in graphics/gdal itself? ------- While here, I did - support STAGEDIR - correct usage of , thanks to John Marino, http://www.freebsd.org/cgi/query-pr.cgi?pr=185166 - USES=dos2unix - different builds, depending on OSVERSION (gcc/clang) - OpenMP only on FreeBSD 8.x and 9.x (before 10.0) If this PR will be committed, it would be nice to close PR 185166, see above. It would be nice also, if someone could have a look at PR 181329 with latest contribution from December 2013, thanks. There is a patch for an update of x11-toolkits/wxgtk29 to x11-toolkits/wxgtk30, which is the better choice for SAGA GIS. http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/181329 >How-To-Repeat: >Fix: Patch attached with submission follows: diff -u saga.orig/Makefile saga/Makefile --- saga.orig/Makefile 2014-01-04 08:35:30.000000000 +0100 +++ saga/Makefile 2014-01-07 16:56:15.000000000 +0100 @@ -3,7 +3,7 @@ PORTNAME= saga PORTVERSION= 2.1.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= math MASTER_SITES= SF/saga-gis/SAGA%20-%20${PORTVERSION:C/\.[[:digit:]]*$//}/SAGA%20${PORTVERSION} DISTNAME= ${PORTNAME}_${PORTVERSION}_src @@ -21,34 +21,38 @@ liblas.so:${PORTSDIR}/devel/liblas \ libopencv_core.so:${PORTSDIR}/graphics/opencv-core +USES= dos2unix +DOS2UNIX_GLOB= dlg_about.cpp USE_ZIP= yes -USE_WX= 2.9 +USE_WX= 2.9-3.0 WX_UNICODE= yes USE_LDCONFIG= yes GNU_CONFIGURE= yes USE_AUTOTOOLS= autoconf autoheader automake aclocal libtoolize AUTOMAKE_ARGS= --add-missing -# CLANG is not able to handle neither Fortran nor OpenMP -USE_GCC= any -CFLAGS+= -I${LOCALBASE}/include -USE_DOS2UNIX= dlg_about.cpp - -MAN1= saga_cmd.1 saga_gui.1 - DESKTOP_ENTRIES= "SAGA GIS" "${COMMENT}" "${DATADIR}/saga.png" \ "saga_gui" "Science;Geoscience;Math;" true OPTIONS_DEFINE= PYTHON OPENMP HARU VIGRA OPTIONS_DEFAULT= OPENMP HARU VIGRA NO_OPTIONS_SORT= yes -OPENMP_DESC= Enable Multiprocessing +OPENMP_DESC= Enable Multiprocessing (FreeBSD before 10.0 ONLY) HARU_DESC= Enable Haru Free PDF Library VIGRA_DESC= Enable 'Vision with Generic Algorithms' Library -NO_STAGE= yes .include +# CLANG is not able to handle neither Fortran nor OpenMP +.if ${OSVERSION} < 1000054 +USE_GCC= any +#USES+= compiler:openmp +#CXXFLAGS+= -std=gnu++0x +.else +USES+= compiler:c++11-lib +.endif +CFLAGS+= -I${LOCALBASE}/include + LDFLAGS+= -L${LOCALBASE}/lib -lopencv_core CONFIGURE_ARGS+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" @@ -57,14 +61,14 @@ BUILD_DEPENDS+= swig2.0:${PORTSDIR}/devel/swig20 RUN_DEPENDS+= swig2.0:${PORTSDIR}/devel/swig20 CONFIGURE_ENV+= SWIG="${LOCALBASE}/bin/swig2.0" -USE_PYTHON= 2.6-2.7 +USE_PYTHON= 2.7 PLIST_SUB+= SAGA_PYTHON="" .else CONFIGURE_ARGS+= --disable-python PLIST_SUB+= SAGA_PYTHON="@comment " .endif -.if ${PORT_OPTIONS:MOPENMP} +.if ${PORT_OPTIONS:MOPENMP} && (${OSVERSION} < 1000054) LDFLAGS+= ${PTHREAD_LIBS} CONFIGURE_ARGS+= --enable-openmp .else @@ -88,8 +92,6 @@ PLIST_SUB+= VIGRA="@comment " .endif -.include - post-extract: @${REINPLACE_CMD} -e's|wx-config |${WX_CONFIG} |g' \ ${WRKSRC}/configure.in \ @@ -119,12 +121,12 @@ .endif post-install: - @${MKDIR} ${DATADIR} - ${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga_tip.txt ${DATADIR} - ${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga.png ${DATADIR} + @${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga_tip.txt ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga.png ${STAGEDIR}${DATADIR} # library helper files are not needed and cripple some math/qgis extensions - @${RM} ${PREFIX}/lib/saga/*.la - @${RM} ${PREFIX}/lib/saga/*.a + @${RM} ${STAGEDIR}${PREFIX}/lib/saga/*.la + @${RM} ${STAGEDIR}${PREFIX}/lib/saga/*.a @${CAT} ${PKGMESSAGE} -.include +.include Common subdirectories: saga.orig/files and saga/files diff -u saga.orig/pkg-plist saga/pkg-plist --- saga.orig/pkg-plist 2013-01-17 11:53:41.000000000 +0100 +++ saga/pkg-plist 2014-01-05 18:15:15.000000000 +0100 @@ -82,6 +82,8 @@ lib/saga/libtin_tools.so lib/saga/libtin_viewer.so lib/saga/libtransect.so +man/man1/saga_cmd.1.gz +man/man1/saga_gui.1.gz %%VIGRA%%lib/saga/libvigra.so %%DATADIR%%/saga.png %%DATADIR%%/saga_tip.txt >Release-Note: >Audit-Trail: >Unformatted: