[R-SIG-Mac] Oops --- still have problems building R from source.

Simon Urbanek simon.urbanek at r-project.org
Thu May 27 22:32:49 CEST 2010


On May 27, 2010, at 3:58 PM, Rolf Turner wrote:

> 
> On 28/05/2010, at 2:56 AM, Berend Hasselman wrote:
> 
> 
> 	<SNIP>
> 
>>> (R. T.): Wound up getting:
>>> 
>>>>     .
>>>>     .
>>>>     .
>>>> gcc -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names  -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o R_X11.so dataentry.o devX11.o rotated.o rbitmap.o -lSM -lICE  -lX11 -lXt -lXmu   -L../../../lib -lR   -Wl,-framework -Wl,CoreFoundation
>>>> ld: library not found for -lSM
>>>> collect2: ld returned 1 exit status
>>>> make[4]: *** [R_X11.so] Error 1
>>>> make[3]: *** [R] Error 2
>>>> make[2]: *** [make.X11] Error 2
>>>> make[1]: *** [R] Error 1
>>>> make: *** [R] Error 1
>>> 
>>> What is the ``-lSM'' business all about?  What is ``SM''?  How do
>>> I get the missing library?  Psigh!  :-(
>> 
>> You had the same thing some iterations ago.
>> -lSM  tells the linker to link against libSM.dylib (in this case; because of the -dynamiclib if i am correct).
>> This .dylib is in /usr/X11/lib
>> 
>> You may have forgotten to  put the line
>> 
>> 		LIBS=-L/usr/X11/lib
>> 
>> into the config.site file.
>> 
>> I can't think of anything else.
> 
> 
> Dang.  This is discouraging.  The line ``LIBS=-L/usr/Xll/lib'' is
> definitely in config.site. :-(
> 

You do realize that it's supposed to be X11 not Xll, right?

But now, seriously, why don't use just follow the instructions and do exactly the following (copy/paste):

rm -rf /tmp/build
mkdir /tmp/build
cd /tmp/build
curl -O http://cran.stat.auckland.ac.nz/src/base/R-2/R-2.11.0.tar.gz
tar fxz R-2.11.0.tar.gz
mkdir R-x86_64
cd R-x86_64
../R-2.11.0/configure r_arch=x86_64 CC="gcc -arch x86_64" \
CXX="g++ -arch x86_64" F77="gfortran -arch x86_64" \
FC="gfortran -arch x86_64" OBJC="gcc -arch x86_64" \
--x-includes=/usr/X11/include --x-libraries=/usr/X11/lib
make -j`sysctl -n hw.ncpu`



Your only technical issue was that fink was messing up your system, but now that it's gone, all you need to do is to use the regular instructions from FAQ/R-admin like all other people.

Cheers,
Simon



More information about the R-SIG-Mac mailing list