[GRASS-dev] r.terraflow on Mac OS X 10.4.9

Glynn Clements glynn at gclements.plus.com
Thu Jul 26 17:29:06 EDT 2007


Jeshua Lacock wrote:

> I just built 6.2.2 with one failed module here on Mac OS X:
> 
> make[2]: *** No rule to make target `/usr/include/gcc/darwin/4.0/c++/ 
> iostream', needed by `ami_stream.d'.  Stop.
> make[1]: *** [build] Error 2
> make: *** [/usr/src/openosx-grass-autobuild/src/grass-6.2.1/ 
> dist.powerpc-apple-darwin8.9.0/bin/r.terraflow] Error 2
> 
> On my machine "/usr/include/gcc/darwin/4.0/c++/iostream" is "/usr/ 
> include//c++/4.0.0/iostream".

It appears that either the compiler has changed since it was last
built, or a partially-built code tree has been copied to a different
machine.

> After replacing about 20 lines in `ami_stream.d' it started having  
> similar problems with `mm_utils.d'.

Just delete all of the .d files.

> Can anyone advise how were those ".d" files generated?

With the following rule:

%.d: %.cc
	$(SHELL) -ec '$(CXX) -M $(CPPFLAGS) $< | sed '\''s/$*.o/& $@/g'\'' > $@'

> Or do I have to fix one line at a time?

The .d files aren't necessary. They will be built automatically, and
they should be removed automatically by "make clean".

In general, auto-generating dependency files is a bad idea, as it can
lead to this sort of problem when changes occur. Even if the Makefile
has rules which to clean and/or re-build the dependencies, stale
dependencies can prevent the Makefile from working.

Personally, I would just remove all references to .d files from
r.terraflow.

[Well, personally I would just remove r.terraflow, having been written
without any consideration for GRASS' build system or coding
conventions, or portability in general. But that's just me.]

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list