Bug 229129 - math/saga: 'make describe' results in warning messages after commit of r472649
Summary: math/saga: 'make describe' results in warning messages after commit of r472649
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rainer Hurling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-19 00:39 UTC by Yasuhiro Kimura
Modified: 2018-07-03 07:08 UTC (History)
4 users (show)

See Also:
rhurlin: maintainer-feedback+


Attachments
build.log-saga (57.53 KB, application/zip)
2018-06-19 10:47 UTC, Walter Schwarzenfeld
no flags Details
patch file (513 bytes, patch)
2018-06-21 02:15 UTC, Yasuhiro Kimura
no flags Details | Diff
Try to fix 'make describe' for different platforms and versions; simplify OpenMP usage (1.03 KB, patch)
2018-06-21 06:04 UTC, Rainer Hurling
rhurlin: maintainer-approval+
Details | Diff
updated patch file (1.05 KB, patch)
2018-06-22 19:08 UTC, Yasuhiro Kimura
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer freebsd_triage 2018-06-19 00:39:26 UTC
After commit of ports r472649 'make describe' results in warning
messages as following.

yasu@rolling-vm-freebsd1[2010]% svn info /usr0/freebsd/ports/head
Path: /usr0/freebsd/ports/head
Working Copy Root Path: /usr0/freebsd/ports/head
URL: https://svn.freebsd.org/ports/head
Relative URL: ^/head
Repository Root: https://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5                                                                       
Revision: 472722
Node Kind: directory
Schedule: normal
Last Changed Author: yuri
Last Changed Rev: 472722
Last Changed Date: 2018-06-19 09:10:16 +0900 (Tue, 19 Jun 2018)

yasu@rolling-vm-freebsd1[2011]% svn status /usr0/freebsd/ports/head
yasu@rolling-vm-freebsd1[2012]% make -C /usr0/freebsd/ports/head/math/saga describe
sh: clang50: not found
make: "/usr0/freebsd/ports/head/Mk/Uses/compiler.mk" line 78: warning: "clang50 --version" returned non-zero status
make: "/usr0/freebsd/ports/head/Mk/Uses/compiler.mk" line 133: warning: "clang++50 -### /dev/null 2>&1" returned non-zero status
saga-6.3.0|/usr0/freebsd/ports/head/math/saga|/usr/local|System for Automated Geoscientific Analyses|/usr0/freebsd/ports/head/math/saga/pkg-descr|rhurlin@gwdg.de|math||||/usr0/freebsd/ports/head/accessibility/atk /usr0/freebsd/ports/head/converters/libiconv /usr0/freebsd/ports/head/databases/postgresql95-client /usr0/freebsd/ports/head/databases/unixODBC /usr0/freebsd/ports/head/devel/autoconf /usr0/freebsd/ports/head/devel/automake /usr0/freebsd/ports/head/devel/desktop-file-utils /usr0/freebsd/ports/head/devel/gettext-runtime /usr0/freebsd/ports/head/devel/glib20 /usr0/freebsd/ports/head/devel/liblas12 /usr0/freebsd/ports/head/devel/libtool /usr0/freebsd/ports/head/devel/llvm50 /usr0/freebsd/ports/head/devel/openmp /usr0/freebsd/ports/head/devel/pkgconf /usr0/freebsd/ports/head/devel/swig30 /usr0/freebsd/ports/head/devel/tbb /usr0/freebsd/ports/head/graphics/gdal /usr0/freebsd/ports/head/graphics/gdk-pixbuf2 /usr0/freebsd/ports/head/graphics/gtk-update-icon-cache /usr0/freebsd/ports/head/graphics/jasper /usr0/freebsd/ports/head/graphics/opencv /usr0/freebsd/ports/head/graphics/opencv-core /usr0/freebsd/ports/head/graphics/proj /usr0/freebsd/ports/head/graphics/tiff /usr0/freebsd/ports/head/graphics/vigra /usr0/freebsd/ports/head/lang/python27 /usr0/freebsd/ports/head/math/fftw3 /usr0/freebsd/ports/head/print/libharu /usr0/freebsd/ports/head/science/libsvm /usr0/freebsd/ports/head/x11-toolkits/pango /usr0/freebsd/ports/head/x11-toolkits/wxgtk30|/usr0/freebsd/ports/head/accessibility/atk /usr0/freebsd/ports/head/converters/libiconv /usr0/freebsd/ports/head/databases/postgresql95-client /usr0/freebsd/ports/head/databases/unixODBC /usr0/freebsd/ports/head/devel/desktop-file-utils /usr0/freebsd/ports/head/devel/gettext-runtime /usr0/freebsd/ports/head/devel/glib20 /usr0/freebsd/ports/head/devel/liblas12 /usr0/freebsd/ports/head/devel/openmp /usr0/freebsd/ports/head/devel/swig30 /usr0/freebsd/ports/head/devel/tbb /usr0/freebsd/ports/head/graphics/gdal /usr0/freebsd/ports/head/graphics/gdk-pixbuf2 /usr0/freebsd/ports/head/graphics/gtk-update-icon-cache /usr0/freebsd/ports/head/graphics/jasper /usr0/freebsd/ports/head/graphics/opencv /usr0/freebsd/ports/head/graphics/opencv-core /usr0/freebsd/ports/head/graphics/proj /usr0/freebsd/ports/head/graphics/tiff /usr0/freebsd/ports/head/graphics/vigra /usr0/freebsd/ports/head/lang/python27 /usr0/freebsd/ports/head/math/fftw3 /usr0/freebsd/ports/head/print/libharu /usr0/freebsd/ports/head/science/libsvm /usr0/freebsd/ports/head/x11-toolkits/pango /usr0/freebsd/ports/head/x11-toolkits/wxgtk30|http://www.saga-gis.org/en/index.html
yasu@rolling-vm-freebsd1[2014]%
Comment 1 Rainer Hurling freebsd_committer freebsd_triage 2018-06-19 05:26:33 UTC
Thanks for the report.

On my 12.0-CURRENT amd64 boxes (r335284M) all seems to be ok:

#make -C /usr/ports/math/saga describe
saga-6.3.0|/usr/ports/math/saga|/usr/local|System for Automated Geoscientific Analyses|/usr/ports/math/saga/pkg-descr|rhurlin@gwdg.de|math||||/usr/ports/accessibility/atk /usr/ports/converters/libiconv /usr/ports/databases/postgresql95-client /usr/ports/databases/unixODBC /usr/ports/devel/autoconf /usr/ports/devel/automake /usr/ports/devel/desktop-file-utils /usr/ports/devel/gettext-runtime /usr/ports/devel/glib20 /usr/ports/devel/liblas12 /usr/ports/devel/libtool /usr/ports/devel/llvm50 /usr/ports/devel/openmp /usr/ports/devel/pkgconf /usr/ports/devel/swig30 /usr/ports/devel/tbb /usr/ports/graphics/gdal /usr/ports/graphics/gdk-pixbuf2 /usr/ports/graphics/gtk-update-icon-cache /usr/ports/graphics/jasper /usr/ports/graphics/opencv /usr/ports/graphics/opencv-core /usr/ports/graphics/proj /usr/ports/graphics/tiff /usr/ports/graphics/vigra /usr/ports/lang/python27 /usr/ports/math/fftw3 /usr/ports/print/libharu /usr/ports/science/libsvm /usr/ports/x11-toolkits/pango /usr/ports/x11-toolkits/wxgtk30|/usr/ports/accessibility/atk /usr/ports/converters/libiconv /usr/ports/databases/postgresql95-client /usr/ports/databases/unixODBC /usr/ports/devel/desktop-file-utils /usr/ports/devel/gettext-runtime /usr/ports/devel/glib20 /usr/ports/devel/liblas12 /usr/ports/devel/openmp /usr/ports/devel/swig30 /usr/ports/devel/tbb /usr/ports/graphics/gdal /usr/ports/graphics/gdk-pixbuf2 /usr/ports/graphics/gtk-update-icon-cache /usr/ports/graphics/jasper /usr/ports/graphics/opencv /usr/ports/graphics/opencv-core /usr/ports/graphics/proj /usr/ports/graphics/tiff /usr/ports/graphics/vigra /usr/ports/lang/python27 /usr/ports/math/fftw3 /usr/ports/print/libharu /usr/ports/science/libsvm /usr/ports/x11-toolkits/pango /usr/ports/x11-toolkits/wxgtk30|http://www.saga-gis.org/en/index.html


What is your FreeBSD version and platform?
Comment 2 Yasuhiro Kimura freebsd_committer freebsd_triage 2018-06-19 07:09:06 UTC
(In reply to Rainer Hurling from comment #1)

> What is your FreeBSD version and platform?

It is 11.1-RELEASE amd64.

But I found warning messages are displayed only when devel/llvm50 is not installed.

root@rolling-vm-freebsd1[2008]# uname -a
FreeBSD rolling-vm-freebsd1.home.utahime.org 11.1-RELEASE-p10 FreeBSD 11.1-RELEASE-p10 #0 r333388: Fri Jun  1 12:49:15 JST 2018     rootz@rolling-vm-freebsd1.home.utahime.org:/usr0/freebsd/base/obj/net/freebsd/base/releng/11.1/sys/ROLLING-VM-FREEBSD1  amd64
root@rolling-vm-freebsd1[2009]# pkg info -aq | grep llvm50
llvm50-5.0.2
root@rolling-vm-freebsd1[2010]# type clang50
clang50 is /usr/local/bin/clang50
root@rolling-vm-freebsd1[2011]# make -C /usr/ports/math/saga describe
saga-6.3.0|/net/freebsd/ports/head/math/saga|/usr/local|System for Automated Geoscientific Analyses|/net/freebsd/ports/head/math/saga/pkg-descr|rhurlin@gwdg.de|math||||/net/freebsd/ports/head/accessibility/atk /net/freebsd/ports/head/converters/libiconv /net/freebsd/ports/head/databases/postgresql95-client /net/freebsd/ports/head/databases/unixODBC /net/freebsd/ports/head/devel/autoconf /net/freebsd/ports/head/devel/automake /net/freebsd/ports/head/devel/desktop-file-utils /net/freebsd/ports/head/devel/gettext-runtime /net/freebsd/ports/head/devel/glib20 /net/freebsd/ports/head/devel/liblas12 /net/freebsd/ports/head/devel/libtool /net/freebsd/ports/head/devel/llvm50 /net/freebsd/ports/head/devel/openmp /net/freebsd/ports/head/devel/pkgconf /net/freebsd/ports/head/devel/swig30 /net/freebsd/ports/head/devel/tbb /net/freebsd/ports/head/graphics/gdal /net/freebsd/ports/head/graphics/gdk-pixbuf2 /net/freebsd/ports/head/graphics/gtk-update-icon-cache /net/freebsd/ports/head/graphics/jasper /net/freebsd/ports/head/graphics/opencv /net/freebsd/ports/head/graphics/opencv-core /net/freebsd/ports/head/graphics/proj /net/freebsd/ports/head/graphics/tiff /net/freebsd/ports/head/graphics/vigra /net/freebsd/ports/head/lang/python27 /net/freebsd/ports/head/math/fftw3 /net/freebsd/ports/head/print/libharu /net/freebsd/ports/head/science/libsvm /net/freebsd/ports/head/x11-toolkits/pango /net/freebsd/ports/head/x11-toolkits/wxgtk30|/net/freebsd/ports/head/accessibility/atk /net/freebsd/ports/head/converters/libiconv /net/freebsd/ports/head/databases/postgresql95-client /net/freebsd/ports/head/databases/unixODBC /net/freebsd/ports/head/devel/desktop-file-utils /net/freebsd/ports/head/devel/gettext-runtime /net/freebsd/ports/head/devel/glib20 /net/freebsd/ports/head/devel/liblas12 /net/freebsd/ports/head/devel/openmp /net/freebsd/ports/head/devel/swig30 /net/freebsd/ports/head/devel/tbb /net/freebsd/ports/head/graphics/gdal /net/freebsd/ports/head/graphics/gdk-pixbuf2 /net/freebsd/ports/head/graphics/gtk-update-icon-cache /net/freebsd/ports/head/graphics/jasper /net/freebsd/ports/head/graphics/opencv /net/freebsd/ports/head/graphics/opencv-core /net/freebsd/ports/head/graphics/proj /net/freebsd/ports/head/graphics/tiff /net/freebsd/ports/head/graphics/vigra /net/freebsd/ports/head/lang/python27 /net/freebsd/ports/head/math/fftw3 /net/freebsd/ports/head/print/libharu /net/freebsd/ports/head/science/libsvm /net/freebsd/ports/head/x11-toolkits/pango /net/freebsd/ports/head/x11-toolkits/wxgtk30|http://www.saga-gis.org/en/index.html
root@rolling-vm-freebsd1[2012]# pkg delete -y llvm50-5.0.2
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):                             

Installed packages to be REMOVED:
        llvm50-5.0.2

Number of packages to be removed: 1

The operation will free 724 MiB.
[1/1] Deinstalling llvm50-5.0.2...
[1/1] Deleting files for llvm50-5.0.2: 100%
root@rolling-vm-freebsd1[2013]# type clang50
clang50 not found
root@rolling-vm-freebsd1[2014]# make -C /usr/ports/math/saga describe
sh: clang50: not found
make: "/net/freebsd/ports/head/Mk/Uses/compiler.mk" line 78: warning: "clang50 --version" returned non-zero status          
make: "/net/freebsd/ports/head/Mk/Uses/compiler.mk" line 133: warning: "clang++50 -### /dev/null 2>&1" returned non-zero status
saga-6.3.0|/net/freebsd/ports/head/math/saga|/usr/local|System for Automated Geoscientific Analyses|/net/freebsd/ports/head/math/saga/pkg-descr|rhurlin@gwdg.de|math||||/net/freebsd/ports/head/accessibility/atk /net/freebsd/ports/head/converters/libiconv /net/freebsd/ports/head/databases/postgresql95-client /net/freebsd/ports/head/databases/unixODBC /net/freebsd/ports/head/devel/autoconf /net/freebsd/ports/head/devel/automake /net/freebsd/ports/head/devel/desktop-file-utils /net/freebsd/ports/head/devel/gettext-runtime /net/freebsd/ports/head/devel/glib20 /net/freebsd/ports/head/devel/liblas12 /net/freebsd/ports/head/devel/libtool /net/freebsd/ports/head/devel/llvm50 /net/freebsd/ports/head/devel/openmp /net/freebsd/ports/head/devel/pkgconf
/net/freebsd/ports/head/devel/swig30 /net/freebsd/ports/head/devel/tbb /net/freebsd/ports/head/graphics/gdal /net/freebsd/ports/head/graphics/gdk-pixbuf2 /net/freebsd/ports/head/graphics/gtk-update-icon-cache /net/freebsd/ports/head/graphics/jasper /net/freebsd/ports/head/graphics/opencv /net/freebsd/ports/head/graphics/opencv-core /net/freebsd/ports/head/graphics/proj /net/freebsd/ports/head/graphics/tiff /net/freebsd/ports/head/graphics/vigra /net/freebsd/ports/head/lang/python27 /net/freebsd/ports/head/math/fftw3 /net/freebsd/ports/head/print/libharu /net/freebsd/ports/head/science/libsvm /net/freebsd/ports/head/x11-toolkits/pango /net/freebsd/ports/head/x11-toolkits/wxgtk30|/net/freebsd/ports/head/accessibility/atk /net/freebsd/ports/head/converters/libiconv /net/freebsd/ports/head/databases/postgresql95-client /net/freebsd/ports/head/databases/unixODBC /net/freebsd/ports/head/devel/desktop-file-utils /net/freebsd/ports/head/devel/gettext-runtime /net/freebsd/ports/head/devel/glib20 /net/freebsd/ports/head/devel/liblas12 /net/freebsd/ports/head/devel/openmp /net/freebsd/ports/head/devel/swig30 /net/freebsd/ports/head/devel/tbb /net/freebsd/ports/head/graphics/gdal /net/freebsd/ports/head/graphics/gdk-pixbuf2 /net/freebsd/ports/head/graphics/gtk-update-icon-cache /net/freebsd/ports/head/graphics/jasper /net/freebsd/ports/head/graphics/opencv /net/freebsd/ports/head/graphics/opencv-core /net/freebsd/ports/head/graphics/proj /net/freebsd/ports/head/graphics/tiff /net/freebsd/ports/head/graphics/vigra /net/freebsd/ports/head/lang/python27 /net/freebsd/ports/head/math/fftw3 /net/freebsd/ports/head/print/libharu /net/freebsd/ports/head/science/libsvm /net/freebsd/ports/head/x11-toolkits/pango /net/freebsd/ports/head/x11-toolkits/wxgtk30|http://www.saga-gis.org/en/index.html
root@rolling-vm-freebsd1[2015]# 

So I think you get same result on 12.0-CURRENT if you uninstall llvm50.
Comment 3 Rainer Hurling freebsd_committer freebsd_triage 2018-06-19 09:32:10 UTC
Ok, thanks for clarification.

The usage of clang50 in lang/llvm50 is needed, because the port fails with clang version 6.x

If both clang versions 5.x and 6.x are installed, CPP=, CC=, and CXX= will use the default version, which is 6.x version from base on some systems.

After trying several changes, it turns out, that the 'CPP=, CC=, and CXX=' part has to be after the OPTIONS part. Could you please check, if the following change of math/saga Makefile works for you:

--- Makefile.orig	2018-06-18 10:43:20.070689000 +0200
+++ Makefile	2018-06-19 11:28:58.324697000 +0200
@@ -38,9 +38,6 @@
 GNU_CONFIGURE=	yes
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
-CPP=		clang-cpp50
-CC=		clang50
-CXX=		clang++50
 INSTALLS_ICONS=	yes
 DOS2UNIX_GLOB=	*.cpp *.h
 PLIST_SUB=	PORTVERSION=${PORTVERSION}
@@ -64,6 +61,11 @@
 PGSQL_USES=		pgsql
 VIGRA_BUILD_DEPENDS=	${LOCALBASE}/lib/libvigraimpex.so:graphics/vigra
 VIGRA_RUN_DEPENDS=	${LOCALBASE}/lib/libvigraimpex.so:graphics/vigra
+
+# Has to be after OPTIONS, otherwise 'make describe' complains
+CPP=		clang-cpp50
+CC=		clang50
+CXX=		clang++50
 
 INSTALL_TARGET=	install-strip
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-06-19 10:43:41 UTC
This also caused a link error on 10.4. amd.
I tried your change, ended up with:

Assertion failed: (I->second && I->first == I->second->getValPtr() && "List invariant broken!"), function AddToUseList, file /wrkdirs/usr/ports/devel/llvm50/work/llvm-5.0.2.src/lib/IR/Value.cpp, line 793.
#0 0x0000000802c7f7d8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/local/llvm50/lib/libLLVM-5.0.so+0x87f7d8)
#1 0x0000000802c7dc86 llvm::sys::RunSignalHandlers(void) (/usr/local/llvm50/lib/libLLVM-5.0.so+0x87dc86)
#2 0x0000000802c7fe84 (/usr/local/llvm50/lib/libLLVM-5.0.so+0x87fe84)
#3 0x0000000802124a4a (/lib/libthr.so.3+0xda4a)
#4 0x000000080212412c (/lib/libthr.so.3+0xd12c)
Stack dump:
0.	Program arguments: /usr/local/llvm50/bin/clang-5.0 -cc1 -triple x86_64-portbld-freebsd10.4 -emit-obj -disable-free -main-file-name saga_api_wrap.cxx -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /ram/usr/ports/math/saga/work/saga-6.3.0/src/saga_core/saga_api/.libs/_saga_api_la-saga_api_wrap.gcno -resource-dir /usr/local/llvm50/lib/clang/5.0.2 -isystem /usr/local/include -isystem /usr/local/include -isystem /usr/local/include -D HAVE_CONFIG_H -I . -I ../../.. -I /usr/local/include/python2.7 -D _SWIG_WCHAR -D _SAGA_UNICODE -I /usr/local/include -I /usr/local/lib/wx/include/gtk2-unicode-3.0 -I /usr/local/include/wx-3.0 -D _FILE_OFFSET_BITS=64 -D WXUSINGDLL -D __WXGTK__ -D wxUSE_GUI=0 -D _THREAD_SAFE -D _SAGA_LINUX -D _SAGA_UNICODE -D _TYPEDEF_BYTE -D _TYPEDEF_WORD -D _SAGA_API_EXPORTS -D _SAGA_PYTHON -D PIC -internal-isystem /usr/include/c++/v1 -O2 -Wall -fdeprecated-macro -fdebug-compilation-dir /ram/usr/ports/math/saga/work/saga-6.3.0/src/saga_core/saga_api -ferror-limit 19 -fmessage-length 0 -pthread -stack-protector 1 -fobjc-runtime=gnustep -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o .libs/_saga_api_la-saga_api_wrap.o -x c++ saga_api_wrap.cxx 
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'CallGraph Pass Manager' on module 'saga_api_wrap.cxx'.
4.	Running pass 'Reassociate expressions' on function '@_ZL26_wrap_CSG_Colors_SerializeP7_objectS0_'
clang-5.0: error: unable to execute command: Abort trap (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 5.0.2 (tags/RELEASE_502/final)
Target: x86_64-portbld-freebsd10.4
Thread model: posix
InstalledDir: /usr/local/llvm50/bin
clang-5.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-5.0: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-5.0: note: diagnostic msg: /tmp/saga_api_wrap-2a44f0.cpp
clang-5.0: note: diagnostic msg: /tmp/saga_api_wrap-2a44f0.sh
clang-5.0: note: diagnostic msg: 

********************
*** [_saga_api_la-saga_api_wrap.lo] Error code 1




Before I try it with
#CPP=           ${LOCALBASE}/bin/clang-cpp50
#CC=            ${LOCALBASE}/bin/clang50
#CXX=           ${LOCALBASE}/bin/clang++50

with it builds, but make describe is not solved.

MAKE_ARGS+=    cc="${LOCALBASE}/bin/clang50" cxx="${LOCALBASE}/bin/clang++50" cpp=${LOCALBASE}/bi
n/clang-cpp50

solved both.
Comment 5 Walter Schwarzenfeld freebsd_triage 2018-06-19 10:47:16 UTC
Created attachment 194401 [details]
build.log-saga

This is the build.log only with your changes.
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-06-19 11:01:39 UTC
But still fails to compile on 10.4 amd64 with
OPENMP=on

/usr/bin/ld: cannot find -lomp
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-06-19 11:04:55 UTC
I think the real error (I mean only the make describe problem) is somewhere in compiler.mk.
The problem exists (in the past in some other ports) if CC,CXX,CPP is set to an other version as
clang60.

So is the question if this should fixed in compiler.mk?
Comment 8 Walter Schwarzenfeld freebsd_triage 2018-06-19 12:36:34 UTC
(In reply to w.schwarzenfeld from comment #6)
make configure
===>   saga-6.3.0 depends on shared library: libomp.so - found (/usr/local/llvm40/lib/libomp.so)
                                                                                                                        ^^^^^^^
Comment 9 Yasuhiro Kimura freebsd_committer freebsd_triage 2018-06-21 01:36:31 UTC
(In reply to Rainer Hurling from comment #3)

I tried your patch but warning messages are still displayed as following.

yasu@rolling-vm-freebsd1[2038]% uname -a
FreeBSD rolling-vm-freebsd1.home.utahime.org 11.1-RELEASE-p10 FreeBSD 11.1-RELEASE-p10 #0 r333388: Fri Jun  1 12:49:15 JST 2018     rootz@rolling-vm-freebsd1.home.utahime.org:/usr0/freebsd/base/obj/net/freebsd/base/releng/11.1/sys/ROLLING-VM-FREEBSD1  amd64
yasu@rolling-vm-freebsd1[2039]% LANG=C svn info /usr0/freebsd/ports/head
Path: /usr0/freebsd/ports/head
Working Copy Root Path: /usr0/freebsd/ports/head
URL: https://svn.freebsd.org/ports/head
Relative URL: ^/head
Repository Root: https://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 472947
Node Kind: directory
Schedule: normal
Last Changed Author: jbeich
Last Changed Rev: 472945
Last Changed Date: 2018-06-21 09:18:27 +0900 (Thu, 21 Jun 2018)

yasu@rolling-vm-freebsd1[2040]% LANG=C svn diff /usr0/freebsd/ports/head/math/saga
Index: /usr0/freebsd/ports/head/math/saga/Makefile
===================================================================
--- /usr0/freebsd/ports/head/math/saga/Makefile (revision 472947)
+++ /usr0/freebsd/ports/head/math/saga/Makefile (working copy)
@@ -38,9 +38,6 @@
 GNU_CONFIGURE= yes
 WRKSRC=                ${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
-CPP=           clang-cpp50
-CC=            clang50
-CXX=           clang++50
 INSTALLS_ICONS=        yes
 DOS2UNIX_GLOB= *.cpp *.h
 PLIST_SUB=     PORTVERSION=${PORTVERSION}
@@ -65,6 +62,11 @@
 VIGRA_BUILD_DEPENDS=   ${LOCALBASE}/lib/libvigraimpex.so:graphics/vigra
 VIGRA_RUN_DEPENDS=     ${LOCALBASE}/lib/libvigraimpex.so:graphics/vigra
 
+# Has to be after OPTIONS, otherwise 'make describe' complains
+CPP=           clang-cpp50
+CC=            clang50
+CXX=           clang++50
+
 INSTALL_TARGET=        install-strip
 
 .include <bsd.port.pre.mk>
yasu@rolling-vm-freebsd1[2041]% make -C /usr0/freebsd/ports/head/math/saga PORTSDIR=/usr0/freebsd/ports/head describe
sh: clang50: not found
make: "/usr0/freebsd/ports/head/Mk/Uses/compiler.mk" line 78: warning: "clang50 --version" returned non-zero status
make: "/usr0/freebsd/ports/head/Mk/Uses/compiler.mk" line 133: warning: "clang++50 -### /dev/null 2>&1" returned non-zero status
saga-6.3.0|/usr0/freebsd/ports/head/math/saga|/usr/local|System for Automated Geoscientific Analyses|/usr0/freebsd/ports/head/math/saga/pkg-descr|rhurlin@gwdg.de|math||||/usr0/freebsd/ports/head/accessibility/atk /usr0/freebsd/ports/head/converters/libiconv /usr0/freebsd/ports/head/databases/postgresql95-client /usr0/freebsd/ports/head/databases/unixODBC /usr0/freebsd/ports/head/devel/autoconf /usr0/freebsd/ports/head/devel/automake /usr0/freebsd/ports/head/devel/desktop-file-utils /usr0/freebsd/ports/head/devel/gettext-runtime /usr0/freebsd/ports/head/devel/glib20 /usr0/freebsd/ports/head/devel/liblas12 /usr0/freebsd/ports/head/devel/libtool /usr0/freebsd/ports/head/devel/llvm50 /usr0/freebsd/ports/head/devel/openmp /usr0/freebsd/ports/head/devel/pkgconf /usr0/freebsd/ports/head/devel/swig30 /usr0/freebsd/ports/head/devel/tbb /usr0/freebsd/ports/head/graphics/gdal /usr0/freebsd/ports/head/graphics/gdk-pixbuf2 /usr0/freebsd/ports/head/graphics/gtk-update-icon-cache /usr0/freebsd/ports/head/graphics/jasper /usr0/freebsd/ports/head/graphics/opencv /usr0/freebsd/ports/head/graphics/opencv-core /usr0/freebsd/ports/head/graphics/proj /usr0/freebsd/ports/head/graphics/tiff /usr0/freebsd/ports/head/graphics/vigra /usr0/freebsd/ports/head/lang/python27 /usr0/freebsd/ports/head/math/fftw3 /usr0/freebsd/ports/head/print/libharu /usr0/freebsd/ports/head/science/libsvm /usr0/freebsd/ports/head/x11-toolkits/pango /usr0/freebsd/ports/head/x11-toolkits/wxgtk30|/usr0/freebsd/ports/head/accessibility/atk /usr0/freebsd/ports/head/converters/libiconv /usr0/freebsd/ports/head/databases/postgresql95-client /usr0/freebsd/ports/head/databases/unixODBC /usr0/freebsd/ports/head/devel/desktop-file-utils /usr0/freebsd/ports/head/devel/gettext-runtime /usr0/freebsd/ports/head/devel/glib20 /usr0/freebsd/ports/head/devel/liblas12 /usr0/freebsd/ports/head/devel/openmp /usr0/freebsd/ports/head/devel/swig30 /usr0/freebsd/ports/head/devel/tbb /usr0/freebsd/ports/head/graphics/gdal /usr0/freebsd/ports/head/graphics/gdk-pixbuf2 /usr0/freebsd/ports/head/graphics/gtk-update-icon-cache /usr0/freebsd/ports/head/graphics/jasper /usr0/freebsd/ports/head/graphics/opencv /usr0/freebsd/ports/head/graphics/opencv-core /usr0/freebsd/ports/head/graphics/proj /usr0/freebsd/ports/head/graphics/tiff /usr0/freebsd/ports/head/graphics/vigra /usr0/freebsd/ports/head/lang/python27 /usr0/freebsd/ports/head/math/fftw3 /usr0/freebsd/ports/head/print/libharu /usr0/freebsd/ports/head/science/libsvm /usr0/freebsd/ports/head/x11-toolkits/pango /usr0/freebsd/ports/head/x11-toolkits/wxgtk30|http://www.saga-gis.org/en/index.html
yasu@rolling-vm-freebsd1[2042]%
Comment 10 Walter Schwarzenfeld freebsd_triage 2018-06-21 01:49:10 UTC
After port.pre.mk

.include <bsd.port.pre.mk>

CC=    clang50
CXX=   clang++50
CPP=   clang-cpp50
Comment 11 Yasuhiro Kimura freebsd_committer freebsd_triage 2018-06-21 02:15:11 UTC
Created attachment 194444 [details]
patch file

(In reply to w.schwarzenfeld from comment #10)

Thank you. Warning messages are disappeared. 

To Rainer:

I attached patch for this change. So please commit it.
Comment 12 Rainer Hurling freebsd_committer freebsd_triage 2018-06-21 06:04:25 UTC
Created attachment 194445 [details]
Try to fix 'make describe' for different platforms and versions; simplify OpenMP usage

Kimura-san, Thanks for your patch. 

The solution, Walter suggested, was tested by him and me on some combinations of i368/amd64, and FreeBSD versions HEAD and 10.4. Many thanks to Walter for his detailed tests, trials, and suggestions yesterday in private mails. Very helpful!

I submitted a slightly more extensive patch, which also changes OpenMP from the usage of extra port devel/openmp to the version, lang/llvm50 brings with it.

It would be nice, if you could confirm, that this new patch works fine for you and contains no regressions. Many thanks in advance. If this patch works ok, attachment #194444 [details] is obsolete.
Comment 13 Yasuhiro Kimura freebsd_committer freebsd_triage 2018-06-22 09:48:11 UTC
(In reply to Rainer Hurling from comment #12)

I confirmed your patch works fine on 11.2-RELEASE amd64 as follwing.

yasu@rolling-vm-freebsd1[2081]% uname -a
FreeBSD rolling-vm-freebsd1.home.utahime.org 11.2-RELEASE FreeBSD 11.2-RELEASE #0 r335513: Fri Jun 22 10:10:20 JST 2018     rootz@rolling-vm-freebsd1.home.utahime.org:/usr0/freebsd/base/obj/net/freebsd/base/releng/11.2/sys/ROLLING-VM-FREEBSD1  amd64
yasu@rolling-vm-freebsd1[2082]% pwd
/usr0/freebsd/ports/head/math/saga
yasu@rolling-vm-freebsd1[2083]% LANG=C svn info
Path: .
Working Copy Root Path: /usr0/freebsd/ports/head
URL: https://svn.freebsd.org/ports/head/math/saga
Relative URL: ^/head/math/saga
Repository Root: https://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 473025
Node Kind: directory
Schedule: normal
Last Changed Author: wen
Last Changed Rev: 472649
Last Changed Date: 2018-06-18 07:56:19 +0900 (Mon, 18 Jun 2018)

yasu@rolling-vm-freebsd1[2084]% LANG=C svn diff --ignore-properties
Index: Makefile
===================================================================
--- Makefile    (revision 473025)
+++ Makefile    (working copy)
@@ -38,9 +38,6 @@
 GNU_CONFIGURE= yes
 WRKSRC=                ${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
-CPP=           clang-cpp50
-CC=            clang50
-CXX=           clang++50
 INSTALLS_ICONS=        yes
 DOS2UNIX_GLOB= *.cpp *.h
 PLIST_SUB=     PORTVERSION=${PORTVERSION}
@@ -56,9 +53,10 @@
 
 ## TODO: OPENMP_?= Only for archs amd64 and i386
 OPENMP_CONFIGURE_ENABLE=       openmp
-OPENMP_LIB_DEPENDS=    libomp.so:devel/openmp
-OPENMP_LDFLAGS=                -L${LOCALBASE}/lib -lm -pthread
-#OPENMP_EXTRA_PATCHES= ${PATCHDIR}/
+#OPENMP_LIB_DEPENDS=   libomp.so.0:devel/openmp
+OPENMP_LDFLAGS=                -L${LOCALBASE}/lib -lm
+# Use OpenMP from lang/llvm50
+OPENMP_LDFLAGS+=       -L${LOCALBASE}/llvm50/lib -lomp
 PGSQL_CONFIGURE_OFF=   --with-postgresql=no
 PGSQL_CONFIGURE_ON=    --with-postgresql=${LOCALBASE}/bin/pg_config
 PGSQL_USES=            pgsql
@@ -69,6 +67,11 @@
 
 .include <bsd.port.pre.mk>
 
+# make describe needs them here
+CPP=           clang-cpp50
+CC=            clang50
+CXX=           clang++50
+                
 SUB_FILES=     pkg-message
 
 post-extract:
yasu@rolling-vm-freebsd1[2085]% make PORTSDIR=/usr0/freebsd/ports/head describe
saga-6.3.0|/usr0/freebsd/ports/head/math/saga|/usr/local|System for Automated Geoscientific Analyses|/usr0/freebsd/ports/head/math/saga/pkg-descr|rhurlin@gwdg.de|math||||/usr0/freebsd/ports/head/accessibility/atk /usr0/freebsd/ports/head/converters/libiconv /usr0/freebsd/ports/head/databases/postgresql95-client /usr0/freebsd/ports/head/databases/unixODBC /usr0/freebsd/ports/head/devel/autoconf /usr0/freebsd/ports/head/devel/automake /usr0/freebsd/ports/head/devel/desktop-file-utils /usr0/freebsd/ports/head/devel/gettext-runtime /usr0/freebsd/ports/head/devel/glib20 /usr0/freebsd/ports/head/devel/liblas12 /usr0/freebsd/ports/head/devel/libtool /usr0/freebsd/ports/head/devel/llvm50 /usr0/freebsd/ports/head/devel/pkgconf /usr0/freebsd/ports/head/devel/swig30 /usr0/freebsd/ports/head/devel/tbb /usr0/freebsd/ports/head/graphics/gdal /usr0/freebsd/ports/head/graphics/gdk-pixbuf2 /usr0/freebsd/ports/head/graphics/gtk-update-icon-cache /usr0/freebsd/ports/head/graphics/jasper /usr0/freebsd/ports/head/graphics/opencv /usr0/freebsd/ports/head/graphics/opencv-core /usr0/freebsd/ports/head/graphics/proj /usr0/freebsd/ports/head/graphics/tiff /usr0/freebsd/ports/head/graphics/vigra /usr0/freebsd/ports/head/lang/python27 /usr0/freebsd/ports/head/math/fftw3 /usr0/freebsd/ports/head/print/libharu /usr0/freebsd/ports/head/science/libsvm /usr0/freebsd/ports/head/x11-toolkits/pango /usr0/freebsd/ports/head/x11-toolkits/wxgtk30|/usr0/freebsd/ports/head/accessibility/atk /usr0/freebsd/ports/head/converters/libiconv /usr0/freebsd/ports/head/databases/postgresql95-client /usr0/freebsd/ports/head/databases/unixODBC /usr0/freebsd/ports/head/devel/desktop-file-utils /usr0/freebsd/ports/head/devel/gettext-runtime /usr0/freebsd/ports/head/devel/glib20 /usr0/freebsd/ports/head/devel/liblas12 /usr0/freebsd/ports/head/devel/swig30 /usr0/freebsd/ports/head/devel/tbb /usr0/freebsd/ports/head/graphics/gdal /usr0/freebsd/ports/head/graphics/gdk-pixbuf2 /usr0/freebsd/ports/head/graphics/gtk-update-ico
n-cache /usr0/freebsd/ports/head/graphics/jasper /usr0/freebsd/ports/head/graphics/opencv /usr0/freebsd/ports/head/graphics/opencv-core /usr0/freebsd/ports/head/graphics/proj /usr0/freebsd/ports/head/graphics/tiff /usr0/freebsd/ports/head/graphics/vigra /usr0/freebsd/ports/head/lang/python27 /usr0/freebsd/ports/head/math/fftw3 /usr0/freebsd/ports/head/print/libharu /usr0/freebsd/ports/head/science/libsvm /usr0/freebsd/ports/head/x11-toolkits/pango /usr0/freebsd/ports/head/x11-toolkits/wxgtk30|ht
tp://www.saga-gis.org/en/index.html
yasu@rolling-vm-freebsd1[2086]%
Comment 14 Rainer Hurling freebsd_committer freebsd_triage 2018-06-22 10:59:47 UTC
Thanks for the confirmation.

So this patch (attachment #194445 [details]) seems to be ready for a commit.
Comment 15 Kurt Jaeger freebsd_committer freebsd_triage 2018-06-22 17:07:46 UTC
testbuilds@work
Comment 16 Yasuhiro Kimura freebsd_committer freebsd_triage 2018-06-22 19:08:34 UTC
Created attachment 194509 [details]
updated patch file

(In reply to Rainer Hurling from comment #14)

I found portlint warns as following.

yasu@rolling-vm-freebsd1[2111]% pwd
/usr0/freebsd/ports/head/math/saga
yasu@rolling-vm-freebsd1[2112]% LANG=C svn diff --ignore-properties
Index: Makefile
===================================================================
--- Makefile    (revision 473057)
+++ Makefile    (working copy)
@@ -38,9 +38,6 @@
 GNU_CONFIGURE= yes
 WRKSRC=                ${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
-CPP=           clang-cpp50
-CC=            clang50
-CXX=           clang++50
 INSTALLS_ICONS=        yes
 DOS2UNIX_GLOB= *.cpp *.h
 PLIST_SUB=     PORTVERSION=${PORTVERSION}
@@ -56,9 +53,10 @@
 
 ## TODO: OPENMP_?= Only for archs amd64 and i386
 OPENMP_CONFIGURE_ENABLE=       openmp
-OPENMP_LIB_DEPENDS=    libomp.so:devel/openmp
-OPENMP_LDFLAGS=                -L${LOCALBASE}/lib -lm -pthread
-#OPENMP_EXTRA_PATCHES= ${PATCHDIR}/
+#OPENMP_LIB_DEPENDS=   libomp.so.0:devel/openmp
+OPENMP_LDFLAGS=                -L${LOCALBASE}/lib -lm
+# Use OpenMP from lang/llvm50
+OPENMP_LDFLAGS+=       -L${LOCALBASE}/llvm50/lib -lomp
 PGSQL_CONFIGURE_OFF=   --with-postgresql=no
 PGSQL_CONFIGURE_ON=    --with-postgresql=${LOCALBASE}/bin/pg_config
 PGSQL_USES=            pgsql
@@ -69,6 +67,11 @@
 
 .include <bsd.port.pre.mk>
 
+# make describe needs them here
+CPP=           clang-cpp50
+CC=            clang50
+CXX=           clang++50
+                
 SUB_FILES=     pkg-message
 
 post-extract:
yasu@rolling-vm-freebsd1[2113]% PORTSDIR=/usr0/freebsd/ports/head portlint -C
WARN: Makefile: [74]: whitespace before end of line.
WARN: Makefile: [74]: use tab (not space) to make indentation
WARN: Consider to set DEVELOPER=yes in /etc/make.conf
0 fatal errors and 3 warnings found.
yasu@rolling-vm-freebsd1[2114]% 

Attached patch is modified version of your patch and fixes warnings.
Comment 17 Yasuhiro Kimura freebsd_committer freebsd_triage 2018-06-22 19:14:22 UTC
(In reply to Kurt Jaeger from comment #15)

As explained in comment #14, attachment #194509 [details] is tiny modification of  attachment #194445 [details] which removes unnecessary white spaces. So please commit it if possible.

Best Regards.
Comment 18 Kurt Jaeger freebsd_committer freebsd_triage 2018-06-22 19:26:17 UTC
(In reply to Yasuhiro KIMURA from comment #17)
Thanks for the fix. testbuilds will take a while, and I'll be traveling
tomorrow, so it will take until tomorrow evening. if nothing else
shows up.
Comment 19 Kurt Jaeger freebsd_committer freebsd_triage 2018-06-24 03:45:40 UTC
Testbuilds on 12a, 11.1a and 11.2a are OK, but fail on 10.4i:

http://people.freebsd.org/~pi/logs/math__saga-104i-1529685954.txt

Any ideas ?
Comment 20 Rainer Hurling freebsd_committer freebsd_triage 2018-06-24 13:25:46 UTC
(In reply to Kurt Jaeger from comment #19)

Hi Kurt, Thanks for your effort.

First, I can confirm, that this also happens on my Poudriere run with 10.4 i386:

checking whether the C++ compiler works... no
configure: error: in `/wrkdirs/usr/ports/math/saga/work/saga-6.3.0':
configure: error: C++ compiler cannot create executables


It tooks me some time to understand, what's going on here. After some trials it turns out, that the change for OpenMP is the culprit. When using "OPENMP_LDFLAGS+=-L${LOCALBASE}/llvm50/lib -lomp", 10.4i fails, with "OPENMP_LIB_DEPENDS=libomp.so:devel/openmp" it builds fine.

So, a new patch is needed, which asks for the FreeBSD version and platform before choosing the right option. And, these lines have to be relocated _after_ .include <bsd.port.pre.mk> :


# if FreeBSD 10.x i386, use devel/openmp, otherwise from lang/llvm50
.if ${OPSYS} == FreeBSD && ${OSVERSION} <= 1100000 && ${ARCH} == i386
OPENMP_LIB_DEPENDS=	libomp.so:devel/openmp
.else
OPENMP_LDFLAGS+=	-L${LOCALBASE}/llvm50/lib -lomp
.endif


Before preparing a new patch, I will try these changes with 10.4a and 11.1i.
Comment 21 Rainer Hurling freebsd_committer freebsd_triage 2018-07-02 07:33:31 UTC
Sorry for the long delay.

Trying to solve the recent problems with math/saga, required more time than planned. In the meantime, another update from SAGA GIS 6.3.0 to 6.4.0 occured and I decided to also update the port.

For this, I opened a new PR bug #229470. It includes the update and the necessary patches for the recent problems.

@Kurt, Could you please have a look at the new PR, if it works with your test environment? Many thanks in advance.
Comment 22 commit-hook freebsd_committer freebsd_triage 2018-07-03 07:08:25 UTC
A commit references this bug:

Author: pi
Date: Tue Jul  3 07:07:52 UTC 2018
New revision: 473802
URL: https://svnweb.freebsd.org/changeset/ports/473802

Log:
  math/saga: update 6.3.0 -> 6.4.0, fix describe

  - Change from llvm50 to llvm60
  - Use OpenMP from within llvm60 instead of devel/openmp
  - disable OpenMP, if i386 is detected

  PR:		229470, 229129
  Submitted by:	Rainer Hurling <rhurlin@gwdg.de> (maintainer)
  Reported by:	Uasyhiro KIMURA <yasu@utahime.org>
  Reviewed by:	w.schwarzenfeld@utanet.at
  Relnotes:	https://sourceforge.net/p/saga-gis/news/2018/06/saga-640-released/

Changes:
  head/math/saga/Makefile
  head/math/saga/distinfo
  head/math/saga/files/patch-configure.ac
  head/math/saga/files/patch-src_tools_io_io__grid__image_grid__to__kml.cpp
  head/math/saga/files/patch-src_tools_io_io__shapes__las_las__export.cpp
  head/math/saga/pkg-plist
Comment 23 Kurt Jaeger freebsd_committer freebsd_triage 2018-07-03 07:08:33 UTC
Committed, thanks!