r.viewshed and r.terraflow problems in compiling seem to have the same cause
Michael
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
Begin forwarded message:
From: William Kyngesburye <kyngchaos@kyngchaos.com>
Subject: Re: r.viewshed does not compile in GRASS 7 either
Date: September 3, 2012 2:10:02 PM MST
To: Michael Barton <michael.barton@asu.edu>
same error as the r.terraflow error you found a few days ago
On Sep 3, 2012, at 4:02 PM, Michael Barton wrote:
So r.viewshed doesn’t compile either now (probably didn’t a few days ago, but I didn’t see it because of all the temporal module errors. I just did a ticket.
Michael
Here is the error:
Last login: Mon Sep 3 13:55:06 on ttys000
Michaels-MacBook-Air:~ cmbarton$ cd /Users/Shared/grass_dev/grass70_dev/raster/r.viewshed
Michaels-MacBook-Air:r.viewshed cmbarton$ make
c++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -I/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include -D_FILE_OFFSET_BITS=64 -DUSER="cmbarton" -Wno-sign-compare -DPACKAGE="“grassmods”" -I/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include -o OBJ.x86_64-apple-darwin12.1.0/distribute.o -c distribute.cpp
In file included from distribute.cpp:52:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/ami.h:56:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/empq_impl.h:43:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/empq.h:51:
/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/embuffer.h:1140:56: error:
default arguments cannot be added to an out-of-line definition of a member
of a class template
long em_buffer<T,Key>::insert(AMI_STREAM* str, long bos=0) {
^ ~
In file included from distribute.cpp:52:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/ami.h:56:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/empq_impl.h:43:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/empq.h:53:
/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/minmaxheap.h:512:7: error:
reference to non-static member function must be called; did you mean to
call it with no arguments?
if (size) {
^~~~
()
distribute.cpp:89:15: warning: format string is not a string literal
(potentially insecure) [-Wformat-security]
G_message((“Start distributed sweeping.”));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/glocale.h:10:16: note:
expanded from macro '’
#define (str) G_gettext(PACKAGE,(str))
^~~~~~~~~~~~~~~~~~~~~~~~
distribute.cpp:149:15: warning: format string is not a string literal
(potentially insecure) [-Wformat-security]
G_message((“Distribution sweeping done.”));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/glocale.h:10:16: note:
expanded from macro ‘_’
#define _(str) G_gettext(PACKAGE,(str))
^~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 2 errors generated.
make: *** [OBJ.x86_64-apple-darwin12.1.0/distribute.o] Error 1
Michaels-MacBook-Air:r.viewshed cmbarton$
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
William Kyngesburye <kyngchaosatkyngchaosdotcom>
http://www.kyngchaos.com/
“Time is an illusion - lunchtime doubly so.”
Just tried something - it's definitely a clang problem. Probably more strict, as I thought, about some C++ stuff by default.
It was working for me because of how Apple has the dev tools set up and how GRASS configure detects cc/c++. For me, on Lion/Xcode 4.3, I have a bunch of symlinks:
/usr/bin/cc -> /usr/bin/clang
/usr/bin/c++ -> /usr/bin/clang
/usr/bin/gcc -> /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
/usr/bin/g++ -> /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
And it appears that GRASS is preferring gcc/g++ in configuration. llvm, as I understand, is more of an intermediate compiler made to closely emulate gcc behavior.
Maybe on Mt Lion, those symlinks are different so that GRASS uses clang instead of llvm. It's possible I have leftovers from a previous Xcode.
What did GRASS find for CC and CXX? (see include/make/platform.make)
What do you have for the /usr/bin compilers?
On Sep 3, 2012, at 4:15 PM, Michael Barton wrote:
r.viewshed and r.terraflow problems in compiling seem to have the same cause
Michael
Begin forwarded message:
From: William Kyngesburye <kyngchaos@kyngchaos.com>
Subject: Re: r.viewshed does not compile in GRASS 7 either
Date: September 3, 2012 2:10:02 PM MST
To: Michael Barton <michael.barton@asu.edu>
same error as the r.terraflow error you found a few days ago
On Sep 3, 2012, at 4:02 PM, Michael Barton wrote:
So r.viewshed doesn't compile either now (probably didn't a few days ago, but I didn't see it because of all the temporal module errors. I just did a ticket.
Michael
Here is the error:
Last login: Mon Sep 3 13:55:06 on ttys000
Michaels-MacBook-Air:~ cmbarton$ cd /Users/Shared/grass_dev/grass70_dev/raster/r.viewshed
Michaels-MacBook-Air:r.viewshed cmbarton$ make
c++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -I/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include -D_FILE_OFFSET_BITS=64 -DUSER=\"cmbarton\" -Wno-sign-compare -DPACKAGE=\""grassmods"\" -I/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include -o OBJ.x86_64-apple-darwin12.1.0/distribute.o -c distribute.cpp
In file included from distribute.cpp:52:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/ami.h:56:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/empq_impl.h:43:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/empq.h:51:
/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/embuffer.h:1140:56: error:
default arguments cannot be added to an out-of-line definition of a member
of a class template
long em_buffer<T,Key>::insert(AMI_STREAM<T>* str, long bos=0) {
^ ~
In file included from distribute.cpp:52:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/ami.h:56:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/empq_impl.h:43:
In file included from /Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/empq.h:53:
/Users/Shared/grass_dev/grass70_dev/dist.x86_64-apple-darwin12.1.0/include/grass/iostream/minmaxheap.h:512:7: error:
reference to non-static member function must be called; did you mean to
call it with no arguments?
if (size) {
^~~~
()
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"I ache, therefore I am. Or in my case - I am, therefore I ache."
- Marvin
On Sep 3, 2012, at 2:42 PM, William Kyngesburye <woklist@kyngchaos.com>
wrote:
Just tried something - it's definitely a clang problem. Probably more strict, as I thought, about some C++ stuff by default.
It was working for me because of how Apple has the dev tools set up and how GRASS configure detects cc/c++. For me, on Lion/Xcode 4.3, I have a bunch of symlinks:
/usr/bin/cc -> /usr/bin/clang
/usr/bin/c++ -> /usr/bin/clang
/usr/bin/gcc -> /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
/usr/bin/g++ -> /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
And it appears that GRASS is preferring gcc/g++ in configuration. llvm, as I understand, is more of an intermediate compiler made to closely emulate gcc behavior.
Maybe on Mt Lion, those symlinks are different so that GRASS uses clang instead of llvm. It's possible I have leftovers from a previous Xcode.
What did GRASS find for CC and CXX? (see include/make/platform.make)
CC = gcc [could this be a problem???]
CXX = c++
Here's my Platform.make in case you want to check other things
(attachments)
Platform.make (9.15 KB)
ATT00001.txt (3.89 KB)
On Sep 3, 2012, at 4:53 PM, Michael Barton wrote:
On Sep 3, 2012, at 2:42 PM, William Kyngesburye <woklist@kyngchaos.com>
wrote:
Just tried something - it's definitely a clang problem. Probably more strict, as I thought, about some C++ stuff by default.
It was working for me because of how Apple has the dev tools set up and how GRASS configure detects cc/c++. For me, on Lion/Xcode 4.3, I have a bunch of symlinks:
/usr/bin/cc -> /usr/bin/clang
/usr/bin/c++ -> /usr/bin/clang
/usr/bin/gcc -> /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
/usr/bin/g++ -> /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
And it appears that GRASS is preferring gcc/g++ in configuration. llvm, as I understand, is more of an intermediate compiler made to closely emulate gcc behavior.
Maybe on Mt Lion, those symlinks are different so that GRASS uses clang instead of llvm. It's possible I have leftovers from a previous Xcode.
What did GRASS find for CC and CXX? (see include/make/platform.make)
CC = gcc [could this be a problem???]
CXX = c++
no, CXX is the problem (r.terraform and r.viewshed are C++). It should be g++ so it's using llvm. If GRASS is finding c++ by default, force it to what you want - add to your configure:
CXX=g++
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"Time is an illusion - lunchtime doubly so."
- Ford Prefect
Got it. I'll do that. Thanks. Maybe we are close with temporal too.
Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
On Sep 3, 2012, at 3:08 PM, William Kyngesburye <woklist@kyngchaos.com>
wrote:
On Sep 3, 2012, at 4:53 PM, Michael Barton wrote:
On Sep 3, 2012, at 2:42 PM, William Kyngesburye <woklist@kyngchaos.com>
wrote:
Just tried something - it's definitely a clang problem. Probably more strict, as I thought, about some C++ stuff by default.
It was working for me because of how Apple has the dev tools set up and how GRASS configure detects cc/c++. For me, on Lion/Xcode 4.3, I have a bunch of symlinks:
/usr/bin/cc -> /usr/bin/clang
/usr/bin/c++ -> /usr/bin/clang
/usr/bin/gcc -> /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
/usr/bin/g++ -> /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
And it appears that GRASS is preferring gcc/g++ in configuration. llvm, as I understand, is more of an intermediate compiler made to closely emulate gcc behavior.
Maybe on Mt Lion, those symlinks are different so that GRASS uses clang instead of llvm. It's possible I have leftovers from a previous Xcode.
What did GRASS find for CC and CXX? (see include/make/platform.make)
CC = gcc [could this be a problem???]
CXX = c++
no, CXX is the problem (r.terraform and r.viewshed are C++). It should be g++ so it's using llvm. If GRASS is finding c++ by default, force it to what you want - add to your configure:
CXX=g++
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"Time is an illusion - lunchtime doubly so."
- Ford Prefect