[R] Installing from source on Windows 7: tibble
Duncan Murdoch
murdoch.duncan at gmail.com
Wed Jun 29 13:08:29 CEST 2016
On 29/06/2016 5:49 AM, G.Maubach at weinwolf.de wrote:
> Hi All,
>
> I would like to install R packages from source on Windows 7 64-Bit.
> Currently my settings are:
>
> -- cut --
>> sessionInfo()
> R version 3.3.0 (2016-05-03)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Running under: Windows 7 x64 (build 7601) Service Pack 1
>
> locale:
> [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
> [3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
> [5] LC_TIME=German_Germany.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> loaded via a namespace (and not attached):
> [1] tools_3.3.0
> -- cut --
>
> The environment variable PATH on Windows 7 is set to:
>
> C:\R-Project\Rtools\mingw_32\bin;C:\R-Project\Rtools\mingw_64\bin;C:\R-Project\Rtools\bin;C:\R-Project\Rtools\gcc-4.6.3\bin;C:\Program
> Files\Python 3.5\Scripts\;C:\Program Files\Python
> 3.5\;C:\Python27\;C:\Python27\Scripts; etc. etc.
Take the mingw_32, mingw_64 and gcc-4.6.3 directories off your path.
They aren't needed; the first two could conceivably be harmful.
>
> RTools is installed in C:\R-Project\RTools
>
> The call of
>
> C:\R-Project\Rtools\mingw_64\bin\g++.exe --version
>
> results in
>
> g++ (x86_64-posix-seh, Built by MinGW-W64 project) 4.9.3
>
> If I do
>
>
>> install.packages("tibble", type = "source")
>
> I get
>
> -- cut --
> trying URL 'https://cran.uni-muenster.de/src/contrib/tibble_1.0.tar.gz'
> Content type 'application/x-gzip' length 38038 bytes (37 KB)
> downloaded 37 KB
>
> * installing *source* package 'tibble' ...
> ** Paket 'tibble' erfolgreich entpackt und MD5 Summen überprüft
> ** libs
>
> *** arch - i386
> c:/Rtools/mingw_32/bin/g++ -I"C:/R-PROJ~1/R-33~1.0/include" -DNDEBUG
> -I"C:/R-Project/R-3.3.0/library/Rcpp/include"
> -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -mtune=core2 -c
> RcppExports.cpp -o RcppExports.o
> c:/Rtools/mingw_32/bin/g++: not found
> make: *** [RcppExports.o] Error 127
> Warnung: Ausführung von Kommando 'make -f
> "C:/R-PROJ~1/R-33~1.0/etc/i386/Makeconf" -f
> "C:/R-PROJ~1/R-33~1.0/share/make/winshlib.mk"
> SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
> SHLIB="tibble.dll" OBJECTS="RcppExports.o matrixToDataFrame.o"' ergab
> Status 2
> ERROR: compilation failed for package 'tibble'
> * removing 'C:/R-Project/R-3.3.0/library/tibble'
> * restoring previous 'C:/R-Project/R-3.3.0/library/tibble'
> Warning in install.packages :
> running command '"C:/R-PROJ~1/R-33~1.0/bin/x64/R" CMD INSTALL -l
> "C:\R-Project\R-3.3.0\library"
> C:\Users\MAUBAC~1.WEI\AppData\Local\Temp\Rtmp23SQxM/downloaded_packages/tibble_1.0.tar.gz'
> had status 1
> Warning in install.packages :
> installation of package ‘tibble’ had non-zero exit status
> -- cut --
>
> There is no make.conf in "C:\R-Project\Rtools\mingw_64\etc". I found "
> Makeconf" in "C:\R-Project\R-3.3.0\etc\x64". Do I need it? How do I need
> to configure the settings in this file?
Yes, since you haven't installed Rtools in the default location, you
should edit two Makeconf files. In
C:\R-Project\R-3.3.0\etc\x64\Makeconf, you want
BINPREF ?= c:/R-project/Rtools/gcc-4.9.3/mingw_64/bin/
and in C:\R-Project\R-3.3.0\etc\i386\Makeconf you want
BINPREF ?= c:/R-project/Rtools/gcc-4.9.3/mingw_32/bin/
You need to make sure you don't have an environment variable named
BINPREF defined, or it will override these settings. (If you were
building just one architecture, you could do the setting by environment
variable, but not if you are trying to build both archs in one call.)
Duncan Murdoch
>
> I searched old aunt Google but did not understand what to do and how to
> configure R environment variables correctly.
>
> What do I need to do to install packages from source?
>
> Kind regards
>
> Georg
>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list