Skip to content
Prev 5860 / 15075 Next

Rcpp on Leopard

On Apr 13, 2009, at 13:53 , Jonathan Terhorst wrote:

            
I think RcppTemplate is long deprecated and was replaced entirely by  
Rcpp if I remember correctly. The latter was updated no so long ago to  
work with OS X.
That is wrong! The configure is supposed to be run from the R  
environment which is where those variables come from. If you want to  
run it by hand, use the proper
R CMD ./configure
instead.
I suspect you have some old version - this problem does not exist in  
the current version...
Not really, the build process is correct. If you compile Rcpp from  
sources you'll have the correct path for your target destination.  
Apparently you didn't do that.

When you install Rcpp from a binary distribution, it cannot know where  
you are installing (binary installation simply unpacks the tar ball)  
it so it has no way of knowing the correct path. However, even if you  
use the pre-compiled binary, you can use the static version of the  
library which doesn't have path issues. Second, you can fix the path  
in the installed dylib binary - let's say you installed Rcpp in $HOME/ 
Library/R/2.8/library/Rcpp then you can run
install_name_tool -id $HOME/Library/R/2.8/library/Rcpp/lib/i386/ 
libRcpp.dylib $HOME/Library/R/2.8/library/Rcpp/lib/i386/libRcpp.dylib
(replace i386 by x86_64 for 64-bit or ppc for PowerPC).
You may have asked and saved yourself a lot of time ;).

Cheers,
Simon