[Rcpp-devel] FW: Installation issue for Rcpp_0.8.9 and Rcpp_0.9.0

Dirk Eddelbuettel edd at debian.org
Thu Jan 6 20:37:44 CET 2011


On 6 January 2011 at 13:10, Douglas Bates wrote:
| On Thu, Jan 6, 2011 at 12:57 PM, Steve Moffitt <smoffitt at whtrading.com> wrote:
| > My mail server didn't like the attached installation script - I've resent it with the script header removed.
| > ________________________________________
| > From: rcpp-devel-bounces at lists.r-forge.r-project.org [rcpp-devel-bounces at lists.r-forge.r-project.org] On Behalf Of Steve Moffitt [smoffitt at whtrading.com]
| > Sent: Thursday, January 06, 2011 12:35 PM
| > To: rcpp-devel at lists.r-forge.r-project.org
| > Subject: [Rcpp-devel] Installation issue for Rcpp_0.8.9 and Rcpp_0.9.0
| >
| > First, is this an appropriate way to report issues with Rcpp and RInside?
| >
| > Second, I'd like to commend all developers for your fine work in supporting the R environment, especially through the Rcpp and RInside packages.
| >
| > I've updated both versions on an up-to-date Fedora Core 13 machine and they work quite well.
| >
| > I'm having some trouble, however, installing Rcpp in a production environment over which I have little control.  Here are the particulars.
| >
| > (1) I can build R-2.12.0 successfully on a Redhat 5.0 platform with a bash shell (Linux quant1 2.6.18-194.26.1.el5 #1 SMP Fri Oct 29 14:21:16 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux) using gcc/g++ v.4.1.2.  The build succeeds; R launches successfully and I can installs packages using 'install.packages' or R CMD INSTALL.  An installation script 'installR.ksh'  is attached - it succeeds up to the point when R CMD INSTALL attempts to install Rcpp.  Note that R-2.12.0 is installed in a directory ~/prod/thirdparty/R/R-2,12,0 and that I intended to install packages into ~/prod/thirdparty/R/R-2,12,0/library.
| >
| > (2) I can install packages 'chron', 'dateTime' and 'timeSeries' from gzipped source or from the command line.  (The machine's firewall prevents me from installing via the web.) I haven't tried installing other packages since I don't need them at this time.
| >
| > (3) I've spent several days trying unsuccessfully to install Rcpp_0.8.9 and Rcpp_0.9.0 by reading the 'R Installation and Administration' and 'Writing R Extensions' docs to determine if I've installed incorrectly.   Rcpp build output is attached, generated from a command line invocation of 'install.packages'. I determined that everything works as it should (targets built, etc.) up to the 'dyn.load' test.  There the installation fails when it can't locate the (mangled) symbol '_ZTVN10__cxxabiv120__si_class_type_infoE'.
| >
| > (4) The same error occurs when I attempt to install using 'R CMD INSTALL'.
| >
| > Can you advise?  Thanks in advance.
| 
| I think the problem is in your configuration of R.  You may be able to
| use gcc to compile C++ source code (although it does get confused, as
| exhibited by the error messages from the compilation of Data.cpp) but
| it won't link with the C++ libraries properly.
| 
| On most Linux systems
| 
| R CMD config CXX
| 
| should return g++, not gcc
| 
| I think you will need to do the configuration of R again.  I don't
| know much about the Red Hat family of distributions but is there a
| precompiled binary from CRAN that you could use instead of compiling
| yourself?

Very good, and I totally missed that (and that is as good as gets for an
example of why folks should post to the lists...).  

And yes, your system looks hosed. On your install script:

  # Configure & Compile
  cd R-2.12.0
  ./configure prefix=$BUILDDIR/R
  make
  make install

please do stop for moment after the configure step. Thanks to nice configure
code by Kurt Hornik (I think), R spits out a useful summary.  The Debian
builds I look after for example showed in the 2.12.1 built the following:

R is now configured for i486-pc-linux-gnu

  Source directory:          .
  Installation directory:    /usr

  C compiler:                gcc  -std=gnu99 -O3 -pipe  -g
  Fortran 77 compiler:       gfortran  -O3 -pipe  -g

  C++ compiler:              g++  -O3 -pipe  -g
  Fortran 90/95 compiler:    gfortran -O3 -pipe  -g
  Obj-C compiler:	      

  Interfaces supported:      X11, tcltk
  External libraries:        readline, BLAS(generic), LAPACK(generic), lzma
  Additional capabilities:   PNG, JPEG, TIFF, NLS, cairo
  Options enabled:           shared R library, R profiling, memory profiling, Java

  Recommended packages:      no



Note the C++ compiler. We want to make sure you have one. A lot of the rest
is reflection of the configure choices I make and not all that relevant.

I also double checked with our sources, and g++ 4.1.* may still work as we
test:

#ifdef __GNUC__
	#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
	#ifdef __GXX_EXPERIMENTAL_CXX0X__
		#define HAS_CXX0X
		#if GCC_VERSION >= 40300
			#define HAS_VARIADIC_TEMPLATES
		#endif
		#if GCC_VERSION >= 40400
			#define HAS_INIT_LISTS
		#endif
	#endif
	// FIXME: [romain] I did not actually check, tr1::unordered_map was 
	// probably introduced before GCC 4.2.1
	#if GCC_VERSION >= 40201
		#define HAS_TR1
		#define HAS_TR1_UNORDERED_MAP
		#define HAS_TR1_UNORDERED_SET
	#endif
    // g++ 4.5 does not seem to like some of the fast indexing
    #if GCC_VERSION >= 40500
        #define IS_GCC_450_OR_LATER
    #endif
#endif

So you may have a missing feature or two but it should still work.

Dirk

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


More information about the Rcpp-devel mailing list