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

Simon Urbanek simon.urbanek at r-project.org
Tue Mar 27 16:49:28 CEST 2012


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,
> Jean
> 
> 
> --
> Jean Thioulouse - Labo Biometrie et Biologie Evolutive,  UMR CNRS 5558
> Universite Lyon 1, Batiment Mendel,  69622 Villeurbanne Cedex - France
> Tel : (33)(0)472432756  Fax : (33)(0)472431388  Cel : (33)(0)675122302
> 
>              http://pbil.univ-lyon1.fr/JTHome/Biblio/                
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> 



More information about the R-SIG-Mac mailing list