[Rd] Problems compiling a simple source package on MacOS X

Alex Bokov bokov at uthscsa.edu
Tue Mar 16 19:19:38 CET 2010


Hello. I wrote a package (that contains C source) that I've been 
compiling and running on both Linux and Windows for about a year. 
However, that same source package fails to compile on MacOS (10.4.11,  
PowerPC G4, Xcode installed, gcc version 4.0.1, make version 3.80, ld 
version cctools-590.23.2.obj~17).

There is nothing platform-specific in the code-- just numerical 
functions that I wrote in C so they would run faster. It's been a while 
since I hacked Macs... perhaps there is some preliminary step I'm 
overlooking that's so obvious to Mac R developers that nobody even 
bothers to mention it? I would greatly appreciate any suggestions on 
where I should look in order to troubleshoot this problem.

Thank you kindly.

PS: I get the following message when trying to compile either via R CMD 
INSTALL or via the "Packages & Data" menu within the R console:

* installing to library '/Users/barshop_lab/Library/R/2.10/library'
* installing *source* package 'Survomatic' ...
** libs
** arch - i386
gcc -arch i386 -std=gnu99 
-I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/i386 
 -I/usr/local/include    -fPIC  -g -O2 -c haz.c -o haz.o
gcc -arch i386 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names 
-mmacosx-version-min=10.4 -undefined dynamic_lookup -single_module 
-multiply_defined suppress -L/usr/local/lib -o Survomatic.so haz.o 
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework 
-Wl,CoreFoundation
ld: /Library/Frameworks/R.framework/../R.framework/R load command 17 
unknown cmd field
/usr/bin/libtool: internal link edit command failed
make: *** [Survomatic.so] Error 1
ERROR: compilation failed for package 'Survomatic'
* removing '/Users/barshop_lab/Library/R/2.10/library/Survomatic'
* restoring previous '/Users/barshop_lab/Library/R/2.10/library/Survomatic'



More information about the R-devel mailing list