installing Rpy using MacPorts

Mark Moll mmoll at macports.org
Tue Jul 14 09:52:23 PDT 2009


I am trying to create a port for rpy2, an interface to R from python.  
I have R and python2.6 installed through MacPorts. When I run "python  
setup.py build" in the rpy2-2.0.6 directory, I get the following error:

--->  Computing dependencies for py26-rpy
--->  Building py26-rpy
Error: Target org.macports.build returned: shell command " cd "/opt/ 
local/var/macports/build/_Users_mmoll_src_macports_dports_python_py26- 
rpy/work/rpy2-2.0.6" && /opt/local/Library/Frameworks/Python.framework/ 
Versions/2.6/bin/python2.6 setup.py --no-user-cfg build " returned  
error 1
Command output: running build
running build_py
running build_ext
building 'rpy2.rinterface.rinterface' extension
/usr/bin/gcc-4.0 -L/opt/local/lib -bundle -undefined dynamic_lookup  
build/temp.macosx-10.5-i386-2.6/rpy/rinterface/array.o build/ 
temp.macosx-10.5-i386-2.6/rpy/rinterface/r_utils.o build/ 
temp.macosx-10.5-i386-2.6/rpy/rinterface/rinterface.o -L/opt/local/lib/ 
R/lib -L/opt/local/lib/R/modules -L/opt/local/lib/R/lib -L/opt/local/ 
lib/R/modules -lR -o build/lib.macosx-10.5-i386-2.6/rpy2/rinterface/ 
rinterface.so -L/opt/local/lib/R/lib -lR -dylib_file libRblas.dylib:/ 
opt/local/lib/R/lib/libRblas.dylib -L/opt/local/lib/R/lib -lRlapack -L/ 
opt/local/lib/R/lib -lRblas
ld: library not found for -lR -dylib_file libRblas.dylib:/opt/local/ 
lib/R/lib/libRblas.dylib
collect2: ld returned 1 exit status
error: command '/usr/bin/gcc-4.0' failed with exit status 1

Error: Status 1 encountered during processing.


If I copy/paste the last gcc command on the command line I do *not*  
get an error. How could this be? I can't think of any environment  
variable that would explain the difference between the "python  
setup.py build" command and the command line.

-- 
Mark





More information about the macports-dev mailing list