[Rcpp-devel] Building RcppBDT fails on Win 7 64-bit

Dirk Eddelbuettel edd at debian.org
Mon Dec 2 19:01:11 CET 2013


Hi Dino,

On 2 December 2013 at 12:13, Dino Veritas wrote:
| Hello Rcpp-devel community,
| 
| I am trying to build the RcppBDT package on Windows 7 64-bit using the

>From SVN, or from CRAN?  I left SVN in a less-than-ideal state which a set of
not-really-finished changes at HEAD.  If you use the CRAN tarball things
should work as that is what CRAN uses.

| latest version of Rtools. This version of Rtools comes with gcc-4.6.3.
| The process fails when building the 64-bit library for RcppBDT,
| complaining about an invalid conversion from 'SEXP' to 'long long int'
| somewhere in the Rcpp headers.

That is a known issue, and somewhat painful to us, as it relates to how CRAN
insists on old C / C++ standards.  If you switch to adding -std=c++11 or even
-std=c++0x you get the long long type which was already added in the 2003
standard.  Google the mailing list archives, this has been hashed out before.
 
| I built Rcpp as well as the RcppExamples package with no problem using
| this toolchain. I am using the latest revisions of Rcpp and RcppBDT
| (rev 4600).

Ah. See above. I hope to get back to RcppBDT "soon" but currently I cannot
recommend SVN head for RcppBDT. Sorry. Help is always welcome -- the guts for
the new version are in, but we need to add a lot of corresponding method
calls at the R level.
 
| Is it possible to build a 64-bit version of RcppBDT on Windows? If so,
| what do I need to do to make this happen? Do I have to look into using
| a separate newer version of gcc to build Rcpp packages? This package
| is for internal use only and will not be published on CRAN or anything
| so I don't care if I fail certain CRAN checks.

CRAN does by default, as does win-builder at http://win-builder.r-project.org.
Here is CRAN's most recent check:

http://www.r-project.org/nosvn/R.check/r-devel-windows-ix86+x86_64/RcppBDT-00check.html

Dirk

 
| Thank you kindly,
| Dino
| 
| ##### Building error below #####
| S:\packages>where g++
| c:\Rtools\gcc-4.6.3\bin\g++.exe
| 
| S:\packages>R CMD INSTALL RcppBDT
| * installing to library 'S:/win-library/3.0'
| * installing *source* package 'RcppBDT' ...
| ** libs
| 
| *** arch - i386
| cygwin warning:
|   MS-DOS style path detected: C:/PROGRA~1/R/R-30~1.2/etc/i386/Makeconf
|   Preferred POSIX equivalent is:
| /cygdrive/c/PROGRA~1/R/R-30~1.2/etc/i386/Makeconf
|   CYGWIN environment variable option "nodosfilewarning" turns off this warning.
|   Consult the user's guide for more details about POSIX paths:
|     http://cygwin.com/cygwin-ug-net/using.html#using-pathnamesg++ -m32
| -I"C:/PROGRA~1/R/R-30~1.2/include" -DNDEBUG -I../inst/include/
| -I"C:/Program Files/boost/boost_1_55_0" -std=c1x
| -I"S:/win-library/3.0/Rcpp/include"
| -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
| -mtune=core2 -c RcppBDTdd.cpp -o RcppBDTdd.o
| cc1plus.exe: warning: command line option '-std=c1x' is valid for
| C/ObjC but not for C++ [enabled by default]
| g++ -m32 -I"C:/PROGRA~1/R/R-30~1.2/include" -DNDEBUG
| -I../inst/include/ -I"C:/Program Files/boost/boost_1_55_0" -std=c1x
| -I"S:/win-library/3.0/Rcpp/include"
| -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
| -mtune=core2 -c RcppBDTdt.cpp -o RcppBDTdt.o
| g++ -m32 -I"C:/PROGRA~1/R/R-30~1.2/include" -DNDEBUG
| -I../inst/include/ -I"C:/Program Files/boost/boost_1_55_0" -std=c1x
| -I"S:/win-library/3.0/Rcpp/include"
| -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
| -mtune=core2 -c RcppBDTdu.cpp -o RcppBDTdu.o
| g++ -m32 -I"C:/PROGRA~1/R/R-30~1.2/include" -DNDEBUG
| -I../inst/include/ -I"C:/Program Files/boost/boost_1_55_0" -std=c1x
| -I"S:/win-library/3.0/Rcpp/include"
| -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
| -mtune=core2 -c RcppBDTpt.cpp -o RcppBDTpt.o
| g++ -m32 -I"C:/PROGRA~1/R/R-30~1.2/include" -DNDEBUG
| -I../inst/include/ -I"C:/Program Files/boost/boost_1_55_0" -std=c1x
| -I"S:/win-library/3.0/Rcpp/include"
| -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
| -mtune=core2 -c RcppBDTtz.cpp -o RcppBDTtz.o
| g++ -m32 -shared -s -static-libgcc -o RcppBDT.dll tmp.def RcppBDTdd.o
| RcppBDTdt.o RcppBDTdu.o RcppBDTpt.o RcppBDTtz.o
| S:/win-library/3.0/Rcpp/lib/i386/libRcpp.a
| -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386
| -Ld:/RCompile/CRANpkg/extralibs64/local/lib
| -LC:/PROGRA~1/R/R-30~1.2/bin/i386 -lR
| installing to S:/win-library/3.0/RcppBDT/libs/i386
| 
| *** arch - x64
| cygwin warning:
|   MS-DOS style path detected: C:/PROGRA~1/R/R-30~1.2/etc/x64/Makeconf
|   Preferred POSIX equivalent is:
| /cygdrive/c/PROGRA~1/R/R-30~1.2/etc/x64/Makeconf
|   CYGWIN environment variable option "nodosfilewarning" turns off this warning.
|   Consult the user's guide for more details about POSIX paths:
|     http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
| g++ -m64 -I"C:/PROGRA~1/R/R-30~1.2/include" -DNDEBUG
| -I../inst/include/ -I"C:/Program Files/boost/boost_1_55_0" -std=c1x
| -I"S:/win-library/3.0/Rcpp/include"-I"d:/RCompile/CRANpkg/extralibs64/local/include"
|     -O2 -Wall  -mtune=core2 -c RcppBDTdd.cpp -o RcppBDTdd.o
| g++ -m64 -I"C:/PROGRA~1/R/R-30~1.2/include" -DNDEBUG
| -I../inst/include/ -I"C:/Program Files/boost/boost_1_55_0" -std=c1x
| -I"S:/win-library/3.0/Rcpp/include"
| -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
| -mtune=core2 -c RcppBDTdt.cpp -o RcppBDTdt.o
| g++ -m64 -I"C:/PROGRA~1/R/R-30~1.2/include" -DNDEBUG
| -I../inst/include/ -I"C:/Program Files/boost/boost_1_55_0" -std=c1x
| -I"S:/win-library/3.0/Rcpp/include"
| -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
| -mtune=core2 -c RcppBDTdu.cpp -o RcppBDTdu.o
| g++ -m64 -I"C:/PROGRA~1/R/R-30~1.2/include" -DNDEBUG
| -I../inst/include/ -I"C:/Program Files/boost/boost_1_55_0" -std=c1x
| -I"S:/win-library/3.0/Rcpp/include"
| -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
| -mtune=core2 -c RcppBDTpt.cpp -o RcppBDTpt.o
| 
| In file included from S:/win-library/3.0/Rcpp/include/Rcpp/as.h:26:0,
|                  from S:/win-library/3.0/Rcpp/include/RcppCommon.h:113,
|                  from ../inst/include/RcppBDT.h:25,
|                  from RcppBDTpt.cpp:22:
| S:/win-library/3.0/Rcpp/include/Rcpp/internal/Exporter.h: In
| constructor 'Rcpp::traits::Exporter<T>::Exporter(SEXP) [with T = long
| long int, SEXP = SEXPREC*]':
| S:/win-library/3.0/Rcpp/include/Rcpp/as.h:81:51:   instantiated from
| 'T Rcpp::internal::as(SEXP, Rcpp::traits::r_type_generic_tag) [with T
| = long long int, SEXP = SEXPREC*]'
| S:/win-library/3.0/Rcpp/include/Rcpp/as.h:145:89:   instantiated from
| 'T Rcpp::as(SEXP) [with T = long long int, SEXP = SEXPREC*]'
| S:/win-library/3.0/Rcpp/include/Rcpp/InputParameter.h:34:45:
| instantiated from 'Rcpp::InputParameter<T>::operator T() [with T =
| long long int]'
| S:/win-library/3.0/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:129:4:
|   instantiated from 'SEXPREC* Rcpp::CppMethod1<Class,void,
| U0>::operator()(Class*, SEXPREC**) [with Class = bdtPt, U0 = long long
| int, SEXP = SEXPREC*]'
| RcppBDTpt.cpp:142:1:   instantiated from here
| S:/win-library/3.0/Rcpp/include/Rcpp/internal/Exporter.h:30:31: error:
| invalid conversion from 'SEXP' to 'long long int' [-fpermissive]
| 
| make: *** [RcppBDTpt.o] Error 1
| ERROR: compilation failed for package 'RcppBDT'
| * removing 'S:/win-library/3.0/RcppBDT'
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list