[GRASSLIST:7375] Re: r.terraflow fails to build
Hamish
hamish_nospam at yahoo.com
Wed Jun 29 10:11:32 EDT 2005
> > > [root at localhost r.terraflow]# make
As a general rule it's probably a bad idea to run "make" as root..
if something goes nuts during the build process you can do all sorts of
damage. Only need to be root for "make install".
...
> > > ./IOStream/include/replacementHeap.h:155: error: invalid use of
> > > constructor as a tem plate
> > > ./IOStream/include/replacementHeap.h:155: note: use _ReplacementHeap<T,
> > > Compare>::Re placementHeap_ instead of _ReplacementHeap<T,
> > > Compare>::ReplacementHeap<T, Compare>_ to name the constructor in a
> > > qualified name
...
> > I see 64 bitness; is this GCC 4.0?
> >
> > a patch was already posted:
> >
> > http://grass.itc.it/pipermail/grass5/2005-June/018638.html
..
> How does one apply this (and other) patches?
>
> [root at localhost r.terraflow]# patch IOStream/include/replacementHeap.h
> r.terraflow.pat
> patching file IOStream/include/replacementHeap.h
> Hunk #1 FAILED at 152.
> 1 out of 1 hunk FAILED -- saving rejects to file
> IOStream/include/replacementHeap.h.rej
> can't find file to patch at input line 34
> Perhaps you should have used the -p or --strip option?
> The text leading up to this was:
> --------------------------
Method 1:
If it is small and you are an accurate type, just make the change by
hand in a text editor. Negative lines are what's removed, positive
is what needs to be added.
Method 2:
You need to get the -p level correct. Study the "patch" man page or if
you are an experimentalist just try -p levels 0-5 and see if one works.
general method:
patch -p0 < r.terraflow.patch
It gets the files to patch from inside the patch itself so you only have
to pipe in the "from" diff file.
bonus hint 1:
You make patches with the "diff -u" command, e.g.:
diff -u oldfile.txt newfile.txt > patch.diff
or if it's from a CVS snapshot & you've already logged in (anonymously),
cvs diff changed_file.txt > patch.diff
bonus hint 2:
make a ~/.cvsrc file containing the following:
-z3
diff -u
update -dP
This will take care of adding the -u when you do a cvs diff and other
helpful things.
Hamish
More information about the grass-user
mailing list