[Rcpp-devel] package install problem

Dirk Eddelbuettel edd at debian.org
Tue Feb 21 18:59:15 CET 2012


On 21 February 2012 at 17:35, Carslaw, David wrote:
| Hi
|  
| I have been happily using Rcpp 0.9.9 to deal with a couple of simple bits of
| C++ code in my package.  It passed R CMD check fine and installed OK.  However,
| I have just updated to 0.9.10 and I have trouble with package installation. 

We didn't touch anything pertaining to builds and how the flags for the
compiler, linker, ... are constructed.

| The error message is below.
|  
| I can confirm it works if I use 0.9.9 with the same set up. Any suggestions or
| further information needed from me to help?  I'm new to Rcpp so I hope I'm not
| missing something obvious...
|  
| Thanks
|  
| David
|  
| 
| g++ -I"C:/ProgramFiles/R-2.14.1/include" -I"C:/ProgramFiles/R-2.14.1/library/
| Rcpp/include" -I"d: /RCompile/CRANpkg/extralibs/local/include" -O2 -Wall -mtune
| =core2 -c cluster.cpp -o cluster.o
| 
| g++ -I"C:/ProgramFiles/R-2.14.1/include" -I"C:/ProgramFiles/R-2.14.1/library/
| Rcpp/include" -I"d: /RCompile/CRANpkg/extralibs/local/include" -O2 -Wall -mtune
| =core2 -c rolling.cpp -o rolling.o
| 
| g++ -shared -s -static-libgcc -o openair.dll tmp.def cluster.o rolling.o -Ld:/
| RCompile/CRANpkg/extra libs/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs/
| local/lib C:/ProgramFiles/R-2.14.1/library/Rcpp/ lib/i386/libRcpp.a -LC:/
| ProgramFiles/R-2.14.1/bin/i386 -lRlapack -LC:/ProgramFiles/R-2.14.1/bin/i386
| -lRblas -lgfortran -LC:/ProgramFiles/R-2.14.1/bin/i386 -lR
| 
| c:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../lib/
| libstdc++.a(stdexcept.o):( .text$_ZNSt11range_errorD0Ev+0x0): multiple
| definition of `std::range_error::~range_error()'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (RcppCommon.o):RcppCommon.cpp:(.text$_ZNSt11 range_errorD0Ev
| [std::range_error::~range_error()]+0x0): first defined here

So RcppCommon is said to define the destructir std::range_error::~range_error
| 
| c:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../lib/
| libstdc++.a(stdexcept.o):( .text$_ZNSt11range_errorD2Ev+0x0): multiple
| definition of `std::range_error::~range_error()'

as is libstdc++.a.  That is a bit odd. Especially as src/RcppCommon.cpp does
not have std::range_error at all.


| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (RcppCommon.o):RcppCommon.cpp:(.text$_ZNSt11 range_errorD1Ev
| [std::range_error::~range_error()]+0x0): first defined here
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (exceptions.o):exceptions.cpp:(.text+0x392): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (exceptions.o):exceptions.cpp:(.text+0x44e): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (exceptions.o):exceptions.cpp:(.text+0x519): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (exceptions.o):exceptions.cpp:(.text+0x6f1): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (exceptions.o):exceptions.cpp:(.eh_frame+0x1 2): undefined reference to
| `__gxx_personality_v0'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (RcppCommon.o):RcppCommon.cpp:(.text+0x72b): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (RcppCommon.o):RcppCommon.cpp:(.text+0x777): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (RcppCommon.o):RcppCommon.cpp:(.eh_frame+0x1 2): undefined reference to
| `__gxx_personality_v0'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (RObject.o):RObject.cpp:(.text+0x409): undef ined reference to `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (RObject.o):RObject.cpp:(.text+0x7c0): undef ined reference to `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (RObject.o):RObject.cpp:(.text$_ZNSt6vectorI
| SsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPSsS1_EERKSs
| [std::vector<std::basic_string<c har, std::char_traits<char>, std::allocator
| <char> >, std::allocator<std::basic_string<char, std::cha r_traits<char>,
| std::allocator<char> > > >::_M_insert_aux(__gnu_cxx::__normal_iterator
| <std::basic_st ring<char, std::char_traits<char>, std::allocator<char> >*,
| std::vector<std::basic_string<char, std: :char_traits<char>, std::allocator
| <char> >, std::allocator<std::basic_string<char, std::char_traits< char>,
| std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>,
| std::allocator< char> > const&)]+0x361): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (RObject.o):RObject.cpp:(.text$_ZNSt6vectorI
| SsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPSsS1_EERKSs
| [std::vector<std::basic_string<c har, std::char_traits<char>, std::allocator
| <char> >, std::allocator<std::basic_string<char, std::cha r_traits<char>,
| std::allocator<char> > > >::_M_insert_aux(__gnu_cxx::__normal_iterator
| <std::basic_st ring<char, std::char_traits<char>, std::allocator<char> >*,
| std::vector<std::basic_string<char, std: :char_traits<char>, std::allocator
| <char> >, std::allocator<std::basic_string<char, std::char_traits< char>,
| std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>,
| std::allocator< char> > const&)]+0x370): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (RObject.o):RObject.cpp:(.eh_frame+0x12): un defined reference to
| `__gxx_personality_v0'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a(r_cast.o):r_cast.cpp:
| (.text+0x4b9): undefin ed reference to `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a(r_cast.o):r_cast.cpp:
| (.eh_frame+0x12): unde fined reference to `__gxx_personality_v0'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (debugging.o):debugging.cpp:(.text+0x6b4): u ndefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (debugging.o):debugging.cpp:(.text+0x6d7): u ndefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (debugging.o):debugging.cpp:(.eh_frame+0x12) : undefined reference to
| `__gxx_personality_v0'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Evaluator.o):Evaluator.cpp:(.text+0x21f): u ndefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Evaluator.o):Evaluator.cpp:(.text+0x23c): u ndefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Evaluator.o):Evaluator.cpp:(.text+0x2d3): u ndefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Evaluator.o):Evaluator.cpp:(.text+0x35a): u ndefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Evaluator.o):Evaluator.cpp:(.text$_ZStplIcS
| t11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_PKS3_[std::basic_string<char,
| std::char_traits<char>, std::a llocator<char> > std::operator+<char,
| std::char_traits<char>, std::allocator<char> >(std::basic_stri ng<char,
| std::char_traits<char>, std::allocator<char> > const&, char const*)]+0x53):
| undefined refer ence to `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Evaluator.o):Evaluator.cpp:(.eh_frame+0x12) : undefined reference to
| `__gxx_personality_v0'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Environment.o):Environment.cpp:(.text+0x147 ): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Environment.o):Environment.cpp:(.text+0x204 ): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Environment.o):Environment.cpp:(.text+0x693 ): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Environment.o):Environment.cpp:(.text+0x6dc ): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Environment.o):Environment.cpp:(.text+0xd4f ): undefined reference to
| `_Unwind_Resume'
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Environment.o):Environment.cpp:(.text+0xe31 ): more undefined references to
| `_Unwind_Resume' follow
| 
| C:/ProgramFiles/R-2.14.1/library/Rcpp/lib/i386/libRcpp.a
| (Environment.o):Environment.cpp:(.eh_frame+0 x12): undefined reference to
| `__gxx_personality_v0'

Weird. And a lot of other stuff missing, which should be coming from g++.

Is anybody else errors with Rcpp 0.9.10 on Windows?


David, I just looked into openair_0.5-18 but that version does not use Rcpp.
Can you let me have a look at your current code snapshot?

Another good trick in almost all cases involving Windows is to submit to
http://win-builder.r-project.org which built the most recent RcppArmadillo
just fine.  We would have heard from CRAN if Rcpp has broken other packages.

Dirk

 
| collect2: ld returned 1 exit status
| 
| ERROR: compilation failed for package 'openair'
| 
| * removing 'C:/ProgramFiles/R-2.14.1/library/openair'
| 
| * restoring previous 'C:/ProgramFiles/R-2.14.1/library/openair'
| 
| 
| ----------------------------------------------------------------------
| _______________________________________________
| 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
-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx


More information about the Rcpp-devel mailing list