[Rcpp-devel] Strange compiler error when using boost uBLAS on Ubuntu 11.04

Douglas Bates bates at stat.wisc.edu
Sat Jun 4 18:52:55 CEST 2011


> sessionInfo()
R version 2.14.0 Under development (unstable) (2011-05-26 r55995)
Platform: x86_64-unknown-linux-gnu (64-bit)

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [7] LC_PAPER=C                 LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] Rcpp_0.9.4.1 inline_0.3.8

loaded via a namespace (and not attached):
[1] tools_2.14.0


$ g++ --version
g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
$ wajig list libboost-dev
ii  libboost-dev         
Boost C++ Libraries development files (default version)

I get a strange compiler error when trying to compile the "Hello
World" example of the coordinate_matrix representation from Boost's
uBLAS, as shown in the enclosed.  The first two examples (the
mapped_matrix and the compressed_matrix) compile for me but the third
and the fourth don't.  The error I get is

Error in compileCode(f, code, language = language, verbose = verbose) :
  Compilation ERROR, function(s)/method(s) not created! In file
included from /usr/include/c++/4.5/bits/stl_algo.h:63:0,
                 from /usr/include/c++/4.5/algorithm:63,
                 from file6b444b24.cpp:4:
/usr/include/c++/4.5/bits/stl_tempbuf.h: In constructor
_Tp>::_Temporary_buffer(_ForwardIterator, _ForwardIterator) [with
_ForwardIterator =
unsigned int>, std::vector<long unsigned int>, std::vector<double> >,
std::random_access_iterator_tag>, _Tp =
unsigned int>, std::vector<long unsigned int>, std::vector<double> >
In addition: Warning message:
running command '/home/bates/build/R-devel/bin/R CMD SHLIB
file6b444b24.cpp 2> file6b444b24.cpp.err.txt' had status 1

Do others get this error for other versions of boost or other compilers?
Can anyone decide what that error means?  I'm perplexed about how
"/usr" ended up in the error message unless it was the name of a file
that somehow got truncated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RcppUblas.R
Type: application/octet-stream
Size: 2622 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110604/6279faa0/attachment.obj>

More information about the Rcpp-devel mailing list