From pleydell at supagro.inra.fr  Wed Aug 26 16:43:58 2009
From: pleydell at supagro.inra.fr (pleydell at supagro.inra.fr)
Date: Wed, 26 Aug 2009 16:43:58 +0200
Subject: [Rd] Cannot make 3 different R installations for 3
	different	valgrind-instrumentation levels
In-Reply-To: <1AC73CC3-67A9-4800-9B9C-E65525D35152@r-project.org>
References: <20090825183131.19kjcomatupco0wg@web.supagro.inra.fr>
	<D30ADD33-3339-409D-B2E2-9090B4E14CD8@r-project.org>
	<20090826124729.ad1ilt691u880w0w@web.supagro.inra.fr>
	<1AC73CC3-67A9-4800-9B9C-E65525D35152@r-project.org>
Message-ID: <20090826164358.sxwe3xawyw00ow4k@web.supagro.inra.fr>


> ^^-- this is really bad form - you should never build/compile 
> software  as root. The location of the build directory is irrelevant 
> so use /tmp  or you home or something like that ... (usualy the 
> fastest disk ;))

OK, thanks for the tip, although I don't understand the configure - make -
install cycle enough to see how compiling as non-root and installing as 
root is
any safer than just doing both as root.

> Why would you do all that?

Well, when you've been trying for hours to get something to work and it 
doesn't
and there are no workable examples on the net... is it too much to ask that a
workable example be placed in the documentation? Finally I have a script that
has worked for me (writen before I saw Simon's comment about root)

cd /usr/local/lib
umask 022
mkdir R-2.9.2
mkdir build_vg0
mkdir build_vg1
mkdir build_vg2
cd /usr/local/lib/build_vg2
sudo /usr/local/src/R-2.9.2/configure --enable-memory-profiling
--with-valgrind-instrumentation=2 r_arch=vg2
sudo make
sudo make prefix=/usr/local/lib/R-2.9.2 install
cd /usr/local/lib/build_vg1
sudo /usr/local/src/R-2.9.2/configure --enable-memory-profiling
--with-valgrind-instrumentation=1 r_arch=vg1
sudo make
sudo make prefix=/usr/local/lib/R-2.9.2 install
cd /usr/local/lib/build_vg0
sudo /usr/local/src/R-2.9.2/configure --enable-memory-profiling
--with-valgrind-instrumentation=0 r_arch=vg0
sudo make
sudo make latex
sudo make dvi
sudo make pdf
sudo make info
sudo make help
sudo make html
sudo make prefix=/usr/local/lib/R-2.9.2 install
sudo cp /usr/local/lib/R-2.9.2/bin/R /usr/local/bin/R

IMHO, if the surpless newbie chaff was whittled off this example might 
be useful
to others in the official documentation.

David



[Rd] Cannot make 3 different R installations for 3 different valgrind-instrumentation levels
pleydell at supagro.inra.fr