[Rd] Build from Source fails on Loading required package Matrix
chiefmurphy at gmail.com
Thu Aug 16 17:52:14 CEST 2012
Thanks to your gentle nudge I reread the manual and learned that your
preferred version of tar is installed by Rtools. After a little glitch
and a July 2 R-help post about a missing file in the tarball, I was
able to build the patched version of 2.15.1. The work y'all do is
beyond words. In case anyone is interested in the steps I took, here
Building R-2.15.1 64-bit from Source on Windows
“R_Admin” will refer to the R Installation and Administration manual.
Getting the Tools
Per Appendix D of R_Admin I downloaded and installed Rtools215.exe
from the link at the beginning of that appendix, MiKTeX, and Inno. The
installation of RTools automatically set the system version of the
PATH variable so that the necessary folders for building R are given
in the preferred order. On my machine the RTools were placed in the
C:\RTools folder. Per section 3.1.1 of R_Admin, RTools also installed
“extra files” in C:\R and C:\R64 –- more below.
Getting the Source
The 2.15.1 tarball on CRAN’s home has an issue with a missing file
(per R-help post on 2012-07-02) so I got the most recent patched
version per the instructions of section 1.2 of R_Admin by clicking on
last night’s “R-patched…” link at the indicated ftp site. I made a
directory in C:\Program Files called R-2.15.1 –- my Windows id has
Administrator privileges –- and placed the tarball into that folder.
I used Rtools' tar to unpack the tarball by opening a command window
with Administrator privileges (right click, Run as Administrator),
navigating to C:\Program Files\R-2.15.1, and then running tar on the
tarball with the “--no-same-owner” option per section 3.1.2 of
R_Admin. tar automatically created an R-patched subdirectory within
C:\Program Files\R-2.15.1 and placed all the files there. Thus, R_HOME
in R_Admin was equivalent to C:\Program Files\R 2.15.1\R patched for
Getting the Tools (continued): “the extra files”
Per the last two bullets of R_Admin section 3.1.2, I copied the \Tcl
subdirectory from C:\R64 (because I’m building the 64-bit version) to
C:\Program Files\R-2.15.1\R-patched and copied the three folders in
C:\R64\src\gnuwin32\bitmap to the directory C:\Program
Per R_Admin 3.1.3, I made a copy of MkRules.dist and made the following changes
MULTI = MULTI = 64
# JPEGDIR JPEGDIR
# PNGDIR PNGDIR
# TIFFDIR TIFFDIR
Building the core files
My C:\Temp directory can be written to by almost everyone, so, per
section 3.1.3, in the still open command window I set the TMPDIR
variable to that folder by SET TMPDIR=C:\Temp. Then “make all
recommended” ran without error. C:\Program
On Wed, Aug 15, 2012 at 9:06 AM, Uwe Ligges
<ligges at statistik.tu-dortmund.de> wrote:
> On 15.08.2012 17:53, Dan Murphy wrote:
>> On Wed, Aug 15, 2012 at 8:04 AM, Simon Urbanek
>> <simon.urbanek at r-project.org> wrote:
>>> On Aug 15, 2012, at 10:54 AM, Dan Murphy <chiefmurphy at gmail.com> wrote:
>>>> I am building R 2.15.1 from source on a Windows 7 machine with the x64
>>>> toolset, MixTeX, and InnoSetup per
>>>> http://cran.r-project.org/bin/windows/Rtools/. I obtained the source for
>>>> 2.15.1 via svn from https://svn.r-project.org/R/branches/R-2-15-branch/.
>>> Did you also rsync the recommended packages? They are not in the SVN. If
>>> in doubt, use released source tar balls.
>> Thanks, Simon. I should have mentioned that as well. Yes, I did "make
>> rsync-recommended" per Chapter 3 of the manual and that worked without
>> I first inadvertently had tried to build the 2.16 version in /trunk
>> and got that "undefined exports" error, then switched to the
>> /R-2-15-branch when I realized /trunk held the development version.
>> In between the two svn checkouts, I had tried the source tar ball at
>> the link R-2.15.1.tar.gz. That terminated much sooner in the build,
>> which I thought could have resulted from me using 7-Zip on the tar
>> ball (lacking a windows version of your tar), so I went back to the
>> subversion checkout method.
> Please read the R Installation and Administration manual that explains how
> to set up your environment under Windows to build R yourself and what tools
> are needed. Note that a binary is available from CRAN.
> Uwe Ligges
>>>> This is my first try building R from source. The build seems to go far,
>>>> then terminates with "undefined exports: .M.classEnv" from the Matrix
>>>> package, I believe. Here are the last few lines of the build session
>>>> Creating a generic function for 'qr.resid' from package 'base' in
>>>> Creating a generic function for 'qr.fitted' from package 'base' in
>>>> ** help
>>>> *** installing help indices
>>>> ** building package indices
>>>> Loading required package: Matrix
>>>> Error in namespaceExport(ns, exports) : undefined exports: .M.classEnv
>>>> Error : require(Matrix) is not TRUE
>>>> ERROR: installing package indices failed
>>>> * removing 'C:/Users/Dan/Documents/R-2.15.1/library/Matrix'
>>>> make: *** [Matrix.ts] Error 1
>>>> make: *** [recommended] Error 2
>>>> Perhaps there are special settings I should be making in MkRules.local?
>>>> only modification was MULTI = 64.
>>>> Thanks in advance for your help.
>>>> Dan Murphy
>>>> [[alternative HTML version deleted]]
>>>> R-devel at r-project.org mailing list
>> R-devel at r-project.org mailing list
More information about the R-devel