<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#3333FF">
    Thanks, Dirk, Romain, for your insights.<br>
    <br>
    The problem was the following line in my .bashrc<br>
    export PKG_CPPFLAGS='-I/TL/opt/R-2.13.2/library/Rcpp/include'<br>
    <br>
    which included Rcpp 0.9.0 in the compilation, creating the undefined
    symbol (since Rcpp 0.10.1 has a different signature for
    r_vector_start).<br>
    <br>
    Wishing you both and the rest of the list a good weekend,<br>
    <br>
    +glenn<br>
    <br>
    <br>
    <br>
    On 12/13/2012 05:21 PM, Romain Francois wrote:
    <blockquote cite="mid:50CA008D.2010801@r-enthusiasts.com"
      type="cite">Do you have the same version of Rcpp as root and as
      non root ?
      <br>
      <br>
      You can use c++filt to demangle the name, e.g. what does this give
      you:
      <br>
      <br>
      $ c++filt _ZN4Rcpp8internal14r_vector_startILi14EdEEPT0_P7SEXPREC
      <br>
      <br>
      r_vector_start has changed in 0.10.1, i.e. it lost a template
      parameter, which is likely to be the case here. I suppose you have
      two versions of Rcpp installed;
      <br>
      <br>
      Romain
      <br>
      <br>
      Le 13/12/12 17:08, Glenn Lawyer a écrit :
      <br>
      <blockquote type="cite">The problem seems to be file privileges.
        When I run R as superuser, it
        <br>
        works. When I run as a normal user, I continue getting
        <br>
        <br>
        Error in dyn.load(libLFile) :
        <br>
           unable to load shared object
        '/tmp/RtmpTFHtzm/file1d365e7eaf51.so':
        <br>
           /tmp/RtmpTFHtzm/file1d365e7eaf51.so: undefined symbol:
        <br>
        _ZN4Rcpp8internal14r_vector_startILi14EdEEPT0_P7SEXPREC
        <br>
        <br>
        Note that the names of the undefined symbol is the same for all
        of the
        <br>
        ways and examples I have tested, which include:
        <br>
        cxxfunction (following the vignette)
        <br>
        cppFunction (following Hadley's tutorial)
        <br>
        R CMD INSTALL -l foo mypackage
        <br>
        where "mypackage" is created by
        Rcpp.package.skeleton("mypackage")
        <br>
        R CMD INSTALL -l foo somepackage.tar.gz
        <br>
        where "somepackage" is a package downloaded from CRAN which uses
        Rcpp.
        <br>
        <br>
        I would very much appreciate a hint/suggestion as to which
        <br>
        folders/directories/paths I may need to check to get the file
        <br>
        permissions correct.
        <br>
        <br>
        Does the name of the undefined symbol tell you anything? If you
        ignore
        <br>
        some characters, it reads
        <br>
        ...Rccp.internal..r_vector_start...SEXPR..
        <br>
        <br>
        +glenn
        <br>
        <br>
        <br>
        <br>
        On 12/12/2012 05:15 PM, Dirk Eddelbuettel wrote:
        <br>
        <blockquote type="cite">Works for me:
          <br>
          <br>
          R> require(Rcpp)
          <br>
          R> require(inline)
          <br>
          Loading required package: inline
          <br>
          R> inc <- '
          <br>
          +    using namespace Rcpp;
          <br>
          +    double norm( double x, double y ) {
          <br>
          +    return sqrt( x*x + y*y );
          <br>
          +    }
          <br>
          +    RCPP_MODULE(mod) {
          <br>
          +    function( "norm", &norm );
          <br>
          +    }
          <br>
          + '
          <br>
          R> fx <- cxxfunction(signature(), plugin="Rcpp",
          include=inc)
          <br>
          R>
          <br>
          R> mod <- Module( "mod", getDynLib(fx) )
          <br>
          R>
          <br>
          R> mod$norm( 3, 4 )
          <br>
          [1] 5
          <br>
          R>
          <br>
          R> sessionInfo()
          <br>
          R version 2.15.2 (2012-10-26)
          <br>
          Platform: x86_64-pc-linux-gnu (64-bit)
          <br>
          <br>
          locale:
          <br>
            [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
          LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
          LC_MONETARY=en_US.UTF-8
          <br>
            [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=C                
          LC_NAME=C                  LC_ADDRESS=C              
          LC_TELEPHONE=C
          <br>
          [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
          <br>
          <br>
          attached base packages:
          <br>
          [1] stats     graphics  grDevices utils     datasets 
          methods   base
          <br>
          <br>
          other attached packages:
          <br>
          [1] inline_0.3.10   RQuantLib_0.3.9 Rcpp_0.10.1.5
          <br>
          <br>
          loaded via a namespace (and not attached):
          <br>
          [1] compiler_2.15.2 tools_2.15.2
          <br>
          R>
          <br>
          <br>
          That is with Rcpp from SVN but that shouldn't matter.
          <br>
          <br>
          Dirk
          <br>
          <br>
        </blockquote>
        <br>
        --
        <br>
        --------------------------------------------------------------
        <br>
        Pirating science, because open access isn't always open enough
        <br>
        <a class="moz-txt-link-abbreviated" href="http://www.scipirate.com">www.scipirate.com</a>                                    @piratesci
        <br>
        <br>
              Dr. Glenn Lawyer
        <br>
              +352 661 967 244
        <br>
              Max-Planck-Institut für Informatik
        <br>
              Computational Biology and Applied Algorithmics
        <br>
              Campus E1 4
        <br>
              66123 Saarbrücken, Germany
        <br>
              <a class="moz-txt-link-freetext" href="http://bioinf.mpi-inf.mpg.de/~lawyer">http://bioinf.mpi-inf.mpg.de/~lawyer</a>
        <br>
        <br>
        <br>
        <br>
        _______________________________________________
        <br>
        Rcpp-devel mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a>
        <br>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a>
        <br>
        <br>
      </blockquote>
      <br>
      <br>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="66">-- 
--------------------------------------------------------------
Pirating science, because open access isn't always open enough
<a class="moz-txt-link-abbreviated" href="http://www.scipirate.com">www.scipirate.com</a>                                   @piratesci

     Dr. Glenn Lawyer                    
     +352 661 967 244              
     Max-Planck-Institut für Informatik
     Computational Biology and Applied Algorithmics
     Campus E1 4
     66123 Saarbrücken, Germany
     <a class="moz-txt-link-freetext" href="http://bioinf.mpi-inf.mpg.de/~lawyer">http://bioinf.mpi-inf.mpg.de/~lawyer</a>

</pre>
  </body>
</html>