[Rcpp-devel] trying installing RcppCNPy with -std=c++11 (or c++0x) and failed due to incompatible number of arguments
Gong-Yi Liao
gongyi.liao at gmail.com
Tue Feb 19 17:47:40 CET 2013
Dear list,
I tried to load integer data from a Python .npy file by using RcppCNPy,
while I tried to install RcppCNPy, I got the following error messages:
-----------------------------------------
R> install.packages('RcppCNPy')
Installing package(s) into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'http://ftp.ussg.iu.edu/CRAN/src/contrib/RcppCNPy_0.2.0.tar.gz'
Content type 'application/x-gzip' length 224174 bytes (218 Kb)
opened URL
==================================================
downloaded 218 Kb
* installing *source* package ‘RcppCNPy’ ...
** package ‘RcppCNPy’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG
-I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -std=c++11 -O2
-pipe -g -c cnpy.cpp -o cnpy.o
In file included from
/usr/include/c++/4.7/bits/locale_facets_nonio.h:1901:0,
from /usr/include/c++/4.7/locale:43,
from /usr/include/c++/4.7/iomanip:45,
from cnpy.cpp:10:
/usr/include/c++/4.7/bits/codecvt.h:216:45: error: macro "length" passed
4 arguments, but takes just 1
/usr/include/c++/4.7/bits/codecvt.h:215:7: error: expected ‘;’ at end of
member declaration
/usr/include/c++/4.7/bits/codecvt.h:217:7: error: expected
unqualified-id before ‘{’ token
make: *** [cnpy.o] Error 1
ERROR: compilation failed for package ‘RcppCNPy’
* removing ‘/usr/local/lib/R/site-library/RcppCNPy’
* restoring previous ‘/usr/local/lib/R/site-library/RcppCNPy’
The downloaded source packages are in
‘/tmp/RtmpXp4c3k/downloaded_packages’
Warning message:
In install.packages("RcppCNPy") :
installation of package ‘RcppCNPy’ had non-zero exit status
---------------------------------------------------------
My system specification:
Platform: x86-64
OS: Linux kernel 3.8.0-6-generic (Ubuntu Raring amd64)
GCC: 4.7.2 (Ubuntu package version: 4.7.2-21ubuntu3)
glibc: 2.17 (Ubuntu package version: 2.17-0ubuntu4)
libstdc++6-4.7-dev (Ubuntu package version: 4.7.2-21ubuntu3)
It seems that this problem is caused by some function defined
in"codecvt.h".
Does anyone have encountered similar problem ?
Thanks!
Gong.
--
Gong-Yi Liao
Department of Statistics
University of Connecticut
More information about the Rcpp-devel
mailing list