Skip to content

[Rpy] Rpy-0.3.4 on OS X (10.3.3)

5 messages · Jan de Leeuw, stefano iacus, Warnes, Gregory R +1 more

#
Now compiles cleanly (no more multiply defined symbols) but the
final link goes astray. It says

gcc -Wl,-F. -Wl,-F. -bundle -framework Python  
build/temp.darwin-7.2.1-Power_Macintosh-2.3/src/rpymodule.o  
build/temp.darwin-7.2.1-Power_Macintosh-2.3/src/R_eval.o  
build/temp.darwin-7.2.1-Power_Macintosh-2.3/src/io.o  
-L/Library/Frameworks/R.framework/Versions/1.9.0/Resources/Frameworks  
-L/Library/Frameworks/R.framework/Versions/1.9.0/Resources/bin -lR -o  
build/lib.darwin-7.2.1-Power_Macintosh-2.3/_rpy.so

and there is no such thing as   
/Library/Frameworks/R.framework/Versions/1.9.0/Resources/Frameworks  
(fortunately).

Also

ld: Undefined symbols:
_R_interact
_my_interp
_python_sigint
_rpy
_rpy_dict
On Feb 17, 2004, at 7:44, Warnes, Gregory R wrote:

            
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 8130 Math Sciences Bldg, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw@stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
#
I would not add -Xlinker -m to the setup. Apple advises strongly
against it, because it is unclear you want the first definition in the
link. Using 'extern' is the way to go. Also -dynamic is the default
for gcc.
On Feb 17, 2004, at 7:44, Warnes, Gregory R wrote:

            
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 8130 Math Sciences Bldg, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw@stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
#
We are about to change (in few days after some tries) the SHLIB script  
for R built and installed ad R.framework.
The default header path flag would be  
-I@R_FRAMEWORK_DIR@/R.framework/Headers and all of this
where the default for @R_FRAMEWORK_DIR@ is /Library/Frameworks
will be replaced by -framework R

I hope to be back on this with you soon.

stefano
On Feb 17, 2004, at 6:16 PM, Jan de Leeuw wrote:

            
#
Wonderful Jan!

I've been working with Christopher Fonnesbeck [chris@fonnesbeck.org] to get
rpy to build cleanly on OS X, so your information is timely.

I had already checked into CVS changes to make the infringing definitions in
the header files 'extern' with a single definition within one .C file.  I've
now added the linker flags you suggested.

If you have a moment, could you check to see if the CVS version compiles
cleanly now?  

To get it via anonymous CVS do:

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/rpy login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/rpy rpy

Thanks!

-Greg
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}
#
On Tue, 17 Feb 2004, Jan de Leeuw wrote:

            
In general Apple is right -- it is unclear that you want the first
definition, because they could be definitions of different symbols that
just happen to use the same name. However, if the code is correct on other
Unices (which collapse all the definitions into a single storage location)
it can't matter which one is used.

	-thomas
Thomas Lumley			Assoc. Professor, Biostatistics
tlumley@u.washington.edu	University of Washington, Seattle