Skip to content

rgl package broke with R 2.14.2

3 messages · David Winsemius, Jochen Laubrock

#
On Mar 27, 2012, at 6:31 PM, Grimes Mark wrote:

            
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
David Winsemius, MD
West Hartford, CT
3 days later
#
Hi David,

I had a similar problem, with install.packages(rgl, type="source") complaining that
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:

            
#
Below some more observations that might help you locate the problem.

Also sorry for ignoring the posting rules in my last post. I was still on 2.14.1, and installing from source from the GUI version of R64. Installing from source from R64 GUI still works after the upgrade to R 2.14.2, . 

The 32 bit versions of R don't work for me anymore, probably because I have only installed the 64 bit versions of some libraries under Lion. I have never noticed before, since after the problem discussed in this thread https://stat.ethz.ch/pipermail/r-sig-mac/2010-July/007609.html I have been using R64 exclusively.

Also note that installing from the command line (Terminal) version of either R32 or R64 gives the error
Presumably, something is wrong with my bash environment and the configure script is picking up the wrong gl libraries.
Installing from source does work after downloading and unzipping the rgl tarball with

./configure --with-gl-libs=/usr/X11/lib --with-gl-includes=/usr/X11/include


Jochen


=== broken: R64  ===
R version 2.14.2 (2012-02-29)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tcltk_2.14.2 tools_2.14.2
=== working: R.app  ===
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] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_2.14.2

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