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

From: Simon Urbanek <>
Date: Tue, 16 Mar 2010 14:26:26 -0400


On Mar 16, 2010, at 14:19 , Alex Bokov wrote:

> 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.

You don't have the necessary tools -- your compiler+linker is too ancient (so is your OS, but that's another story). Please install Xcode 2.4 or higher -- see R for Mac FAQ and/or visit

In addition, please consider looking at R-SIG-Mac where Mac-related discussion takes place and this has been discussed before (stuffing the error in google gives exactly the relevant hit on the list...)


> 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 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: *** [] 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'
> ______________________________________________
> mailing list
> mailing list Received on Tue 16 Mar 2010 - 18:29:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 17 Mar 2010 - 00:31:01 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive