[R-SIG-Mac] rgl configure error: "missing required library GL"

Duncan Murdoch murdoch.duncan at gmail.com
Mon Jul 23 19:13:23 CEST 2012


On 23/07/2012 12:55 PM, Grimes Mark wrote:
> I wonder if this is related.  Package 'rgl' failed to load in an error
> similar to one I've had previously.  It was working for a while and
> now it is not working again.  R output attached

I think that's a different problem.  The original one in this thread 
(which should now be fixed) caused R to fail to build.  This one causes 
it to fail to run on some newer MacOSX systems.  (Newer than what I 
have, anyway.)  This is probably caused by Apple changing their API; I 
don't know a fix, but a workaround is to delete the aglrgl.so library 
mentioned in the error message.  rgl will fall back to the X11 library, 
which still works.

Duncan Murdoch

>
> Mark Grimes
>
>   > 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.15/Resources/library/rgl/libs/x86_64/aglrgl.so':
>     dlopen(/Library/Frameworks/R.framework/Versions/2.15/Resources/
> library/rgl/libs/x86_64/aglrgl.so, 6): Symbol not found:
> __ZN3gui13OSXGUIFactory12hasEventLoopEv
>     Referenced from: /Library/Frameworks/R.framework/Versions/2.15/
> Resources/library/rgl/libs/x86_64/aglrgl.so
>     Expected in: dynamic lookup
>
> Error: package/namespace load failed for ‘rgl’
>   > install.packages("rgl")
> --- Please select a CRAN mirror for use in this session ---
> trying URL 'http://cran.stat.sfu.ca/bin/macosx/leopard/contrib/2.15/rgl_0.92.892.tgz'
> Content type 'application/x-gzip' length 7774197 bytes (7.4 Mb)
> opened URL
> ==================================================
> downloaded 7.4 Mb
>
>
> The downloaded binary packages are in
> 	/var/folders/p3/vs342gm97msfg0y_fsx79x880000gn/T//RtmpYZqfh1/
> downloaded_packages
>   > library(rgl)
> Error in get(Info[i, 1], envir = env) :
>     internal error -3 in R_decompress1
> Error: package/namespace load failed for ‘rgl’
>   > library("rgl")
> Error in get(Info[i, 1], envir = env) :
>     internal error -3 in R_decompress1
> Error: package/namespace load failed for ‘rgl’
>   > sessionInfo()
> R version 2.15.1 (2012-06-22)
> 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] grid      splines   stats     graphics  grDevices utils
> datasets  methods   base
>
> other attached packages:
>    [1] gplots_2.11.0        KernSmooth_2.23-8    caTools_1.13
> bitops_1.0-4.1       gdata_2.11.0         gtools_2.7.0
> tsne_0.1-2           vegan_2.0-4          permute_0.7-0
> RUnit_0.4.26         bio3d_1.1-3
> [12] RCytoscape_1.6.5     XMLRPC_0.2-4         graph_1.34.0
> org.Hs.eg.db_2.7.1   RSQLite_0.11.1       DBI_0.2-5
> AnnotationDbi_1.18.1 Biobase_2.16.0       BiocGenerics_0.2.0
> adegenet_1.3-4       ade4_1.4-17
> [23] MASS_7.3-19          cluster_1.14.2       Hmisc_3.9-3
> survival_2.36-14     plyr_1.7.1
>
> loaded via a namespace (and not attached):
> [1] IRanges_1.14.4 lattice_0.20-6 RCurl_1.91-1   stats4_2.15.1
> tools_2.15.1   XML_3.9-4
>   >
>
> On Jul 17, 2012, at 1:25 PM, Duncan Murdoch wrote:
>
> > On 17/07/2012 2:33 PM, peter dalgaard wrote:
> >> On Jul 17, 2012, at 19:31 , Davor Cubranic wrote:
> >>
> >> > On 2012-07-17, at 10:05 AM, Duncan Murdoch wrote:
> >> >
> >> >> The aglrgl.so library is built from osxgui.mm and osxlib.cpp.
> >> I'd been assuming the problem was an API change in recent OSX 64
> >> bit, but maybe it's a problem with the makefiles or the compiler.
> >> If you can suggest any fixes for this, I'd appreciate it.  (The
> >> newest OSX that I have is 10.6.8.)
> >> >
> >> > BTW, I see osxgui.o being of wrong architecture during an install
> >> on 10.6.8 as well...
> >> >
> >> > But I think this is caused by object files being left in the
> >> tar.gz:
> >> >
> >> > $ tar xzf rgl_0.92.880.tar.gz
> >> > $ find rgl -name \*.o |xargs file
> >> > rgl/src/AGL/x11gui.o: Mach-O object i386
> >> > rgl/src/AGL/x11lib.o: Mach-O object i386
> >> > rgl/src/osx/osxgui.o: Mach-O object i386
> >> > rgl/src/osx/osxlib.o: Mach-O object i386
> >> >
> >> > Davor
> >>
> >> Yay, nice catch!
> >>
> >> This allows me to build an rgl that loads in R.app:
> >>
> >> tar xvfz rgl_0.92.880.tar.gz
> >> rm `find rgl -name \*.o`
> >> R64 CMD INSTALL --configure-args=--with-gl-libs=/usr/X11/lib rgl
> >>
> >> I still have some issues with the 32 bit version, but I believe
> >> those are unrelated. (MacPorts seems to be interfering....)
> >>
> >
> > Yes, nice catch indeed.   If you get the tarball from R-forge,
> > you'll get a slightly newer version, and no *.o files included. I'll
> > send that one to CRAN.
> >
> > Duncan Murdoch
> >
> > _______________________________________________
> > 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