[R-SIG-Mac] error compiling package - ld: library not found for -lSystemStubs

THIOULOUSE JEAN Jean.Thioulouse at univ-lyon1.fr
Tue Mar 27 22:12:25 CEST 2012


Le 27 mars 2012 à 22:02, "Simon Urbanek" <simon.urbanek at r-project.org> a écrit :
> 
> On Mar 27, 2012, at 3:44 PM, THIOULOUSE JEAN wrote:
> 
>> 
>> Le 27 mars 2012 à 16:49, Simon Urbanek a écrit :
>>> 
>>> On Mar 27, 2012, at 10:40 AM, THIOULOUSE JEAN wrote:
>>> 
>>>> Hi,
>>>> 
>>>> Sorry to bother you about what is probably a bad configuration of my system. I have the following error when checking a package on my Mac (Mac Pro mid-2010 with Mac OS X Lion 10.7.3 (11D50), running R-2.14.2 from CRAN). I have Xcode 4.3.2 and the GNU Fortran compiler from http://r.research.att.com/. The package is prepRISA and it compiles without problem on R-Forge.
>>>> 
>>>> Here is the install.out file of R CMD check prepRISA:
>>>> 
>>>> * installing *source* package ‘prepRISA’ ...
>>>> ** 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/mysql/include -I/usr/local/include    -fPIC  -g -O2 -c repClass.c -o repClass.o
>>>> gcc -arch i386 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o prepRISA.so repClass.o -L/usr/local/mysql/lib -lmysqlclient -lSystemStubs -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
>>>> ld: library not found for -lSystemStubs
>>>> collect2: ld returned 1 exit status
>>>> make: *** [prepRISA.so] Error 1
>>>> ERROR: compilation failed for package ‘prepRISA’
>>>> * removing ‘/Volumes/Macintosh-HD/Users/jthioulo/Desktop/prepRISA.Rcheck/prepRISA’
>>>> 
>>>> I tried to search about this SystemStubs library, but could only find that it is deprecated in MacOS X 10.7.
>>>> 
>>>> Here is my sessionInfo:
>>>>> sessionInfo()
>>>> R version 2.14.2 (2012-02-29)
>>>> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>>>> 
>>>> locale:
>>>> [1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8
>>>> 
>>>> attached base packages:
>>>> [1] stats     graphics  grDevices utils     datasets  tcltk     methods  
>>>> [8] base     
>>>> 
>>>> other attached packages:
>>>> [1] ade4TkGUI_0.2-5 ade4_1.4-17    
>>>>> 
>>>> 
>>>> What can I do to get rid of this problem ?
>>>> 
>>> 
>>> The problem seems local to your R or settings - did you perhaps override any PKG_* with bogus flags? This is what you get with released R:
>>> 
>>> ** 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  -Wall -pedantic -g -O2 -c repClass.c -o repClass.o
>>> gcc -arch i386 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o prepRISA.so repClass.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
>>> installing to /Library/Frameworks/R.framework/Versions/2.14/Resources/library/prepRISA/libs/i386
>>> 
>>> note that you have superfluous "-L/usr/local/mysql/lib -lmysqlclient -lSystemStubs" in your linking step which is *not* part of R ...
>>> 
>>> Cheers,
>>> Simon
>> 
>> Thank you, this probably comes from a previous install of a mysql server implementation. Is there a way to know how these flags get added to the R CMD gcc command line ? I deleted all the R and mysql instances I found on my Mac and re-installed R from CRAN, but the problem remains.
>> 
> 
> It has nothing to do with those -- it is your user setting. It could be in your environment (try set | grep PKG) or any startup files (.Rprofile, .Renviron or any of the site-configuration files of .R/Makevars and friends ..).
> 
> Cheers,
> Simon

Yes indeed, it was in my .cshrc file. Thanks a lot, and sorry for the trouble !

Jean




More information about the R-SIG-Mac mailing list