[Rcpp-devel] [rinside] compiling e QT + RInside on win7 have some problems

John Buonagurio jbuonagurio at exponent.com
Mon Jun 22 15:44:28 CEST 2015


Su Po,

I just compiled and ran qtdensity using the toolchain I described and R 3.1.2 with no issues. I'm using "mingw-w64-gcc-4.8.2-stable-r10.7z" from files.1f0.de/mingw/

I see a couple issues:

> mingw32-make: *** [Rcpp.dll] Error 255

You should be using make.exe from Rtools here. Make sure your path is set appropriately. Rtools binaries first, then MinGW 4.8.2, then R, e.g. "C:\Rtools\bin;C:\mingw-w64-gcc-4.8.2-stable-r10\bin;C:\R\R-3.1.2\bin;"

> g++ -m32 -I"C:/PROGRA~1/SUPO/R/R-31~1.2/include" -DNDEBUG

Generally good practice to install R in a directory with no spaces.

I understand that only the Rtools MinGW distribution is supported for RInside, but you need to use GCC 4.8.2 to get QT+RInside working on Windows.

John

> -----Original Message-----
> From: PO SU [mailto:rdevelmail at 163.com]
> Sent: Saturday, June 20, 2015 1:40 AM
> To: John Buonagurio
> Cc: rcpp-devel at lists.r-forge.r-project.org
> Subject: Re:RE: [Rcpp-devel] [rinside] compiling e QT + RInside on win7 have
> some problems
> 
> 
> First, I forgot to say, My sys is Win 7 32 bit, and R is 3.1.2.
> As mentioned a lot, Rcpp and RInside and Qt library seems should be built
> with the same compiler, and for i think i will have hudge trouble with
> compiling QT using Rtools GCC-4.6.3, so now, i tried compiling Rcpp and
> RInside with MingW 4.8.2(as my QT is 4.8.6 compiled with it),   and i am pretty
> sure that i am not using Rtools GCC-4.6.3 by setting PATH and inspecting the
> compiling output, but i failed once again, the output is as following which i
> can not figure it out due to my poor knowledge  (SUPO is my chinese name
> and '此时不应有' is chinese  which means 'At this point should not
> be'  or  something like that),:
> 
> 
> ----------- output begin here ------------------------------------
> 
> > install.packages("E:/STATISTICS/Rcpp_0.11.6.tar.gz", repos = NULL,
> > type = "source", INSTALL_opts=c("--no-multiarch"))
> * installing *source* package 'Rcpp' ...
> ** package 'Rcpp' successfully unpacked and MD5 sums checked
> ** libs
> g++ -m32 -I"C:/PROGRA~1/SUPO/R/R-31~1.2/include" -DNDEBUG
> g++ -I../inst/include/
> g++ -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
> g++ -mtune=core2 -c Date.cpp -o Date.o
> g++ -m32 -I"C:/PROGRA~1/SUPO/R/R-31~1.2/include" -DNDEBUG
> g++ -I../inst/include/
> g++ -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
> g++ -mtune=core2 -c Module.cpp -o Module.o
> g++ -m32 -I"C:/PROGRA~1/SUPO/R/R-31~1.2/include" -DNDEBUG
> g++ -I../inst/include/
> g++ -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
> g++ -mtune=core2 -c Rcpp_init.cpp -o Rcpp_init.o
> g++ -m32 -I"C:/PROGRA~1/SUPO/R/R-31~1.2/include" -DNDEBUG
> g++ -I../inst/include/
> g++ -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
> g++ -mtune=core2 -c api.cpp -o api.o
> g++ -m32 -I"C:/PROGRA~1/SUPO/R/R-31~1.2/include" -DNDEBUG
> g++ -I../inst/include/
> g++ -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
> g++ -mtune=core2 -c attributes.cpp -o attributes.o
> g++ -m32 -I"C:/PROGRA~1/SUPO/R/R-31~1.2/include" -DNDEBUG
> g++ -I../inst/include/
> g++ -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
> g++ -mtune=core2 -c barrier.cpp -o barrier.o
> process_begin: CreateProcess(NULL, basename Rcpp.dll .dll, ...) failed.
> mingw32-make: C:/PROGRA~1/SUPO/R/R-
> 31~1.2/share/make/winshlib.mk:11: pipe: No error
> process_begin: CreateProcess(NULL, basename Rcpp.dll .dll, ...) failed.
> mingw32-make: C:/PROGRA~1/SUPO/R/R-
> 31~1.2/share/make/winshlib.mk:11: pipe: No error
> process_begin: CreateProcess(NULL, basename Rcpp.dll .dll, ...) failed.
> mingw32-make: C:/PROGRA~1/SUPO/R/R-
> 31~1.2/share/make/winshlib.mk:11: pipe: No error
> 此时不应有 "zDate.o Module.o Rcpp_init.o api.o attributes.o barrier.o"。
> C:/PROGRA~1/SUPO/R/R-31~1.2/share/make/winshlib.mk:11: recipe for
> target 'Rcpp.dll' failed
> mingw32-make: *** [Rcpp.dll] Error 255
> Warning: running command 'make -f "Makevars.win" -f
> "C:/PROGRA~1/SUPO/R/R-31~1.2/etc/i386/Makeconf" -f
> "C:/PROGRA~1/SUPO/R/R-31~1.2/share/make/winshlib.mk"
> SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
> SHLIB="Rcpp.dll" OBJECTS="Date.o Module.o Rcpp_init.o api.o attributes.o
> barrier.o"' had status 2
> ERROR: compilation failed for package 'Rcpp'
> * removing 'C:/Program Files/SUPO/R/R-3.1.2/library/Rcpp'
> * restoring previous 'C:/Program Files/SUPO/R/R-3.1.2/library/Rcpp'
> Warning in install.packages :
>   running command '"C:/PROGRA~1/SUPO/R/R-31~1.2/bin/i386/R" CMD
> INSTALL --no-multiarch -l "C:\Program Files\SUPO\R\R-3.1.2\library"
> "E:/STATISTICS/Rcpp_0.11.6.tar.gz"' had status 1 Warning in install.packages :
>   installation of package ‘E:/STATISTICS/Rcpp_0.11.6.tar.gz’ had non-zero exit
> status
> ---- output end here------------------------------
> 
> 
> And , i aslo show this:
> 
> Status(RInside) Version 0.2.5 should build, install and run on just about any
> Linux and OS X system, and even on Windows machines that have the Rtools
> compiled by Duncan Murdoch as detailed in the The Windows
> Toolset appendix to the R Installation manual. Do not report an error if you
> fail to build this with another compiler as this is not supported. Note that to
> build the examples on Windows, you need to say make -f Makefile.win to
> explicitly selects its Makefile. RInside works particularly well with
> the Rcpp package for interfacing R and C++ and shown by the examples in
> the RInside distribution. In fact, it now depends on it too.
> 
> with the sentence
>  Do not report an error if you fail to build this with another compiler as this
> is not supported.
> 
> 
> So, with the above sentence, i am worry about even i compiled the Rcpp and
> RInside uing MingW 4.8.2,  i could not still  compile the examples in RInside
> such as  "Hellow world". (As i said before, i run the example using Rcpp and
> RInside compiled by Rtools Gcc-4.6.3), but anyway, i should try using MingW
> 4.8.2 to compile Rcpp and RInside, so PLZ  help me.
> 
> 
> 
> 
> 
> 
> --
> 
> PO SU
> mail: desolator88 at 163.com
> Majored in Statistics from SJTU



More information about the Rcpp-devel mailing list