[R] Antwort: Re: Antwort: Re: Antwort: Re: Installing from source on Windows 7: tibble [RE OPENED]

Duncan Murdoch murdoch.duncan at gmail.com
Thu Jun 30 11:29:32 CEST 2016


On 30/06/2016 2:35 AM, G.Maubach at weinwolf.de wrote:
> Hi Duncan,
>
> I would not have changed the COMPILED_BY option unless I thought I have
> to.
>
> In my "C:\R-Project\Rtools\mingw_32\bin" I have
>
> c++.exe
> g++.exe
> gcc.exe
> i686-w64-mingw32-c++.exe
> i686-w64-mingw32-g++.exe
> i686-w64-mingw32-gcc-4.9.3.exe
> i686-w64-mingw32-gcc.exe
>
> In my "C:\R-Project\Rtools\mingw_64\bin" I have
>
> c++.exe
> cpp.exe
> g++.exe
> gcc.exe
> x86_64-w64-mingw32-c++.exe
> x86_64-w64-mingw32-g++.exe
> x86_64-w64-mingw32-gcc-4.9.3.exe
> x86_64-w64-mingw32-gcc.exe
>
> Which one should I configure and use?

You don't choose that, the Makefiles in R (or in your package, if you 
have one) chooses.  The COMPILED_BY definition is not involved in that 
decision.

Duncan Murdoch
>
> Kind regards
>
> Georg
>
>
>
>
> Von:    Duncan Murdoch <murdoch.duncan at gmail.com>
> An:     G.Maubach at weinwolf.de,
> Kopie:  r-help at r-project.org
> Datum:  29.06.2016 17:34
> Betreff:        Re: Antwort: Re: Antwort: Re: [R] Installing from source
> on Windows 7: tibble [SOLVED]
>
>
>
> On 29/06/2016 10:48 AM, G.Maubach at weinwolf.de wrote:
>> Hi Duncan,
>>
>> indeed, I did not see the other part of your message.
>>
>> I did
>>
>> BINPREF ?= C:/R-Project/Rtools/mingw_32/bin/
>> COMPILED_BY = g++ # instead of gcc-4.9.3
>
> I wouldn't change the COMPILED_BY; some packages use it to configure
> themselves for gcc-4.9.3, as opposed to the previous version gcc-4.6.3.
>
>>
>> in "C:\R-Project\R-3.3.0\etc\i386\Makeconf"
>>
>> and
>>
>> BINPREF ?= C:/R-Project/Rtools/mingw_64/bin/
>> COMPILED_BY = g++ # instead of gcc-4.9.3
>>
>> in "C:\R-Project\R-3.3.0\etc\x64\Makeconf"
>>
>> Now I could compile the package with no futher errors.
>>
>> Messages are
>>
>> -- cut --
>> * installing *source* package 'tibble' ...
>> ** Paket 'tibble' erfolgreich entpackt und MD5 Summen überprüft
>> ** libs
>>
>> *** arch - i386
>> C:/R-Project/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:/R-Project/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
>> matrixToDataFrame.cpp -o matrixToDataFrame.o
>> C:/R-Project/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o
>> tibble.dll tmp.def RcppExports.o matrixToDataFrame.o
>> -Ld:/Compiler/gcc-4.9.3/local330/lib/i386
>> -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/R-PROJ~1/R-33~1.0/bin/i386 -lR
>> installing to C:/R-Project/R-3.3.0/library/tibble/libs/i386
>>
>> *** arch - x64
>> C:/R-Project/Rtools/mingw_64/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:/R-Project/Rtools/mingw_64/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
>> matrixToDataFrame.cpp -o matrixToDataFrame.o
>> C:/R-Project/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o
>> tibble.dll tmp.def RcppExports.o matrixToDataFrame.o
>> -Ld:/Compiler/gcc-4.9.3/local330/lib/x64
>> -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/R-PROJ~1/R-33~1.0/bin/x64 -lR
>> installing to C:/R-Project/R-3.3.0/library/tibble/libs/x64
>> ** R
>> ** inst
>> ** preparing package for lazy loading
>> ** help
>> *** installing help indices
>> ** building package indices
>> ** installing vignettes
>> ** testing if installed package can be loaded
>> *** arch - i386
>> *** arch - x64
>> * DONE (tibble)
>> -- cut --
>>
>> So - complete success.
>>
>> Many thanks for your help.
>>
>> One last questions: Why did Rtools.exe not create a directory named
>> "gcc-4.9.3" in "C:\R-Project\Rtools" and putting"
>> C:\R-Project\Rtools\mingw_32" and "C:\R-Project\Rtools\mingw_64"
> directly
>> in "C:\R-Project\Rtools\"? gcc-4.6.3 was installed that way.
>
> The 4.6.3 compiler was compiled for "multilib" operation:  the same
> compiler took command line options to distinguish between 32 bit and 64
> bit compiles.  The newer version doesn't support that, so we need two
> separate installs.
>
> Duncan Murdoch
>
>> Kind regards
>>
>> Georg
>>
>>
>>
>>
>>
>> Von:    Duncan Murdoch <murdoch.duncan at gmail.com>
>> An:     G.Maubach at weinwolf.de,
>> Kopie:  r-help at r-project.org
>> Datum:  29.06.2016 16:21
>> Betreff:        Re: Antwort: Re: [R] Installing from source on Windows
> 7:
>> tibble
>>
>>
>>
>> On 29/06/2016 10:17 AM, G.Maubach at weinwolf.de wrote:
>>> Hi Duncan,
>>>
>>> many thanks for your reply.
>>>
>>> I did insert die paths to the g++ compiler because I got the message
>> about
>>> the not existent compiler.
>>>
>>> I took the directories for the compiler out again:
>>>
>>> C:\R-Project\Rtools\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program
>>> Files\Python 3.5\Scripts\;C:\Program Files\Python
>>> 3.5\;C:\Python27\;C:\Python27\Scripts, etc. etc.
>>>
>>> Calling
>>>
>>> install.packages("tibble", type  = "source")
>>>
>>>
>>> gives this message:
>>>
>>> -- cut --
>>> * 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\RtmpGqOlOW/downloaded_packages/tibble_1.0.tar.gz'
>>> had status 1
>>> Warning in install.packages :
>>>    installation of package ‘tibble’ had non-zero exit status
>>> -- cut --
>>>
>>> What else could I do?
>>
>> You seem to have missed the second part of my advice, describing what to
>> do with the two Makeconf files.
>>
>> Duncan Murdoch
>>
>>>
>>> Kind regards
>>>
>>> Georg
>>>
>>>
>>>
>>>
>>>
>>> Von:    Duncan Murdoch <murdoch.duncan at gmail.com>
>>> An:     G.Maubach at weinwolf.de, r-help at r-project.org,
>>> Datum:  29.06.2016 13:07
>>> Betreff:        Re: [R] Installing from source on Windows 7: tibble
>>>
>>>
>>>
>>> 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