From peter.ruckdeschel at web.de  Mon Feb  1 17:28:28 2010
From: peter.ruckdeschel at web.de (Peter Ruckdeschel)
Date: Mon, 01 Feb 2010 17:28:28 +0100
Subject: [Rd] questions as to building R from source under Windows
In-Reply-To: <4B66CB12.6@statistik.tu-dortmund.de>
References: <4B66B63B.1030506@web.de> <4B66CB12.6@statistik.tu-dortmund.de>
Message-ID: <hk6vfb$r8q$1@ger.gmane.org>

Hi Uwe,

thanks for your quick reply.

[... and sorry for not setting you to the CC explicitely,
but I am mailing to this list through gmane ...]

>> yesterday, on a new computer, in order to check my installation
>> of "The Windows Toolset", I tried building R from source under
>> Windows (in fact under Windows 7) --- and in the end succeeded.
>>
>> Some minor issues though (which I think should not be Windows 7
>>   issues) which might be of more general interest:
>>
>> (1) TMPDIR on a different drive:
>> --- not sure whether this was my fault or you could do anything
>> about it: On my system, I have a separate drive for temp (i.e. E:),
>> and had this set in a corresponding TMPDIR environment variable.
>> During the build process of R, I had difficulties with this,
>> which were only resolved when I created a tmp folder on the same
>> drive (i.e. C:) and set environment variable TMPDIR to this new
>> folder. Is this a known issue /can you reproduce this?
>> If this is a more general issue, you might want to mention this
>> in R-admin / or the documentation to Rtools.
>
> If your setup is correct according to the manuals, it may be a
> problem in one of the cygwin tools. A more detailed description
> to analyse it would be appreciated.
>
Yes, I guess, it was a cygwin problem; it claimed it could not access
/tmp at
one instance; so I concluded that environment variable TMPDIR was not
set and hence set it to E:\ in the console and re-ran   make all
but got the same error message; when I changed this environment variable
to C:\<somedir>\tmp however it ran through well.

Unfortunately I did not write the output / messages to files, so cannot
be much more precise at this point (I may also have missed something...);
I will try and do so in the next days.
>> (2) TCL:
>> Although I set the path to TCL in MkRules, line 26 to
>>     C:\Program Files\R\Tcl   , in step    make rinstaller
>> I ran into problems, because the build process was assuming
>> (hard-coded, it seems) the Tcl files to reside in
>> ../../../Tcl (from gnuwin32 folder, which is not the above
>> set path). Did I miss something? Everything worked fine
>> after I had copied the /Tcl folder to ../../../Tcl ...
>
>
> Citing the "R Installation and Administration" manual:
> The Tcl/Tk support files are in a zip file at
http://www.stats.ox.ac.uk/pub/Rtools/:
> unzip this in R HOME, and it will add directory tree ?R_HOME/Tcl?.
>
Yes, but I thought, as there was an entry in MkRules, that you
could have a common Tcl folder for several, possibly different R builds
/R HOME's...

--- Would it be too hard to change the corresponding
step in     make  rinstaller        to use the reference given
in MkRules instead of ../../../Tcl?
>
>> (3) JPEG
>> Meanwhile the most recent version of jpeg sources is v8,
>> which is what I downloaded; I succeeded in building R with
>> this version after a little manual change in bitmap/Makefile .
>> ->  Could you change line 10 in bitmap/Makefile so that it
>> would branch not only according to whether version was v7 or
>> not but rather according to whether version was larger or equal
>> to v7 or not / or set up a v8 alternative?

> Well tested patches for the Makefile, MkRules and documentation
(including manuals) are welcome.


For documentation for the new jpeg version, see  http://www.ijg.org/

The modification I used in bitmap/Makefile.jpeg was in fact an
alternative where I simply replaced jpeg-7 by jpeg-8, but
certainly a more sophisticated one (with something like ">=7")
would be preferrable:

ifeq ($(strip $(JPEGDIR)),jpeg-8)
LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
        jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
        jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
        jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
        jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
        jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
        jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
        jquant2.c jutils.c jmemmgr.c

>> (4) Did not work for me: build R on D:
>>              --- a Vista / Windows 7 issue?
>> In the end I succeeded with my build on drive C: (NTFS formatted)
>> giving the current user full access privileges to the installation
>> folders; before, in order to circumvent these privilege issues,
>> I tried building R on a different drive (D:) which in my case is
>> formatted as FAT32; somehow I got stuck with this, though;
>> (my Rtools are on C:). Is this a known issue /can you reproduce this?
>
> I build R and packages on d:/ without any problems. I do not think
> that the drive letter is the issues here. It may be some new MS
> security policy on FAT drives - or whatever. I have not used FAT
> formatted drives for serious work for at least a decade now.
>
Then I guess it is a FAT32 issue --- so let us drop this...

Best, Peter



[Rd] questions as to building R from source under Windows
Peter Ruckdeschel