[R-SIG-Mac] [R] rgl package broke with R 2.14.2

jochen laubrock jochen.laubrock at gmail.com
Sat Mar 31 14:00:07 CEST 2012


Hi David,

I had a similar problem, with install.packages(rgl, type="source") complaining that

> ** testing if installed package can be loaded
> Error : .onLoad failed in loadNamespace() for 'rgl', details:
>   call: dyn.load(file, DLLpath = DLLpath, ...)
>   error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/rgl.so':
>   dlopen(/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/rgl.so, 6): Symbol not found: _FT_Attach_File

This was caused by a (very) old freetype in /usr/local/lib and went away after upgrading it. I replaced it with a current version from macports (I guess you could also use the version from their sourceforge page), although that is probably not the official solution.

In your case it looks like libpng, libX11, and libZ also need to be upgraded.

Best,
Jochen



On Mar 28, 2012, at 6:30 , David Winsemius wrote:

> 
> On Mar 27, 2012, at 6:31 PM, Grimes Mark wrote:
> 
>> Dear People
>> 
>> I can't figure out how to fix this problem: rgl won't run under R
>> 2.14.2 (it was working for me before under 2.14.0). The error message
>> is:
> 
> I'm having basically the same problem (at least to the extent that the error message on attempted loading is the same), but would add that rgl _was_ working with R 2.14.2 until I updated to the current version from rgl 0.87 in a failed effort at answering posting on StackOverflow. (I have tried reverting to rgl 0.87 without success.) I have had problems in th past related to difference in freetype and libpng This is, however, probably a Mac specific issue and should get posted to the Mac list rather than the general R help list. I am alternate-posting (correct term doubtful) this and do not think it appropriate to respond to further replies on R-help.
> 
> I generally run the Mac R GUI 64 bit and installed both from binary and source (with Xcode installed) using the Package Installer, and get the same error message at the point of loading. I get the following warnings during installation from source using teh Mac GUI Package Installer with a target of rgl 0.92.861 and with the version that was current as a couple of days ago 0.92.858 :
> 
> -----
> ld warning: in /opt/local/lib/libpng12.dylib, file is not of required architecture
> ld warning: in /opt/local/lib/libX11.dylib, file is not of required architecture
> ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required architecture
> mkdir Temp
> mv x11*.o Temp
> mkdir -p AGL
> mv AGL/* .
> MAKINGAGL=TRUE /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB  -o aglrgl.so *.cpp *.c \
> 		osx/*.mm osx/*.cpp
> mv: rename AGL/* to ./*: No such file or directory
> make: [aglrgl.so] Error 1 (ignored)
> 
> ------
> 
> 
> 
> sessionInfo()
> R version 2.14.2 (2012-02-29)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
> 
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> 
> attached base packages:
> [1] splines   stats     grDevices utils     datasets  graphics  methods   base
> 
> other attached packages:
> [1] rms_3.4-0        Hmisc_3.9-2      survival_2.36-12 sos_1.3-1        brew_1.0-6       lattice_0.20-0
> 
> loaded via a namespace (and not attached):
> [1] cluster_1.14.2 grid_2.14.2    tools_2.14.2
> > require(rgl)
> Loading required package: rgl
> Error : .onLoad failed in loadNamespace() for 'rgl', details:
>  call: dyn.load(file, DLLpath = DLLpath, ...)
>  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/aglrgl.so':
>  dlopen(/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/aglrgl.so, 6): Symbol not found: __ZN3gui13OSXGUIFactory12hasEventLoopEv
>  Referenced from: /Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/aglrgl.so
>  Expected in: dynamic lookup
> 
> 
>> 
>>> library(rgl)
>> Error : .onLoad failed in loadNamespace() for 'rgl', details:
>>  call: dyn.load(file, DLLpath = DLLpath, ...)
>>  error: unable to load shared object '/Library/Frameworks/
>> R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/aglrgl.so':
>>  dlopen(/Library/Frameworks/R.framework/Versions/2.14/Resources/
>> library/rgl/libs/x86_64/aglrgl.so, 6): Symbol not found:
>> __ZN3gui13OSXGUIFactory12hasEventLoopEv
>>  Referenced from: /Library/Frameworks/R.framework/Versions/2.14/
>> Resources/library/rgl/libs/x86_64/aglrgl.so
>>  Expected in: dynamic lookup
>> 
>> Error: package/namespace load failed for ‘rgl’
>> 
>> I tried re-installing the package several ways, including from R, both
>> binary and type='source', and from Terminal using R CMD INSTALL
>> rgl_0.92.858.tar.
>> 
>> I found some threads with this error but no solutions that I could
>> understand.  I am an R user, not a developer.  Do you have any idea
>> how to fix this?
>> 
>> Thanks for your help,
>> 
>> Mark
>> 
>>> sessionInfo()
>> R version 2.14.2 (2012-02-29)
>> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>> 
>> locale:
>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>> 
>> attached base packages:
>> [1] splines   stats     graphics  grDevices utils     datasets
>> methods   base
>> 
>> other attached packages:
>> [1] bio3d_1.1-3           RCytoscape_1.4.4
>> XMLRPC_0.2-4          graph_1.32.0          org.Hs.eg.db_2.6.4
>> [6] RSQLite_0.11.1        DBI_0.2-5
>> AnnotationDbi_1.16.19 Biobase_2.14.0        adegenet_1.3-4
>> [11] ade4_1.4-17           MASS_7.3-17           cluster_1.14.2
>> Hmisc_3.9-2           survival_2.36-12
>> [16] plyr_1.7.1
>> 
>> loaded via a namespace (and not attached):
>> [1] grid_2.14.2    IRanges_1.12.6 lattice_0.20-6 RCurl_1.91-1
>> tools_2.14.2   XML_3.9-4
>> 
>> 
>> 	[[alternative HTML version deleted]]
>> 
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> David Winsemius, MD
> West Hartford, CT
> 
> _______________________________________________
> 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