[GRASS-dev] r.viewshed does not compile in GRASS 7 either

William Kyngesburye woklist at kyngchaos.com
Mon Sep 3 15:08:01 PDT 2012


On Sep 3, 2012, at 4:53 PM, Michael Barton wrote:

> On Sep 3, 2012, at 2:42 PM, William Kyngesburye <woklist at 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




More information about the grass-dev mailing list