[R-SIG-Mac] installing rgl with the 3.0 RC

Robert J Goedman goedman at icloud.com
Tue Feb 5 16:35:47 CET 2013


Bryan,

I've seen that issue a couple of times as well. Trying to install rgl 0.93.934 from R-Forge using R.app, I get (in the R.app console):

...
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)
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/usr/local/include   -g -O2 -fPIC  -g -O2  -c x11gui.cpp -o x11gui.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/usr/local/include   -g -O2 -fPIC  -g -O2  -c x11lib.cpp -o x11lib.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/usr/local/include   -fPIC   -c osx/osxgui.mm -o osx/osxgui.o
osx/osxgui.mm:9:2: error: #error Cocoa backend reguires FreeType font reneder
make[1]: *** [osx/osxgui.o] Error 1
make: *** [aglrgl.so] Error 1

The downloaded source packages are in
	‘/private/var/folders/fl/jchvcqm92rd7bjh6hzkd1cqc0000gn/T/RtmpgyhrHG/downloaded_packages’
ERROR: compilation failed for package ‘rgl’
* removing ‘/Users/rob/Library/R/3.0/library/rgl’
* restoring previous ‘/Users/rob/Library/R/3.0/library/rgl’
>

On my system the following trick works. Make sure to keep a copy of the RGL package you want to install (typically the version is in the directory containing the downloaded packages, as printed at the end of the install process in the R.app console). Notice that these are removed if you quit R.app! So just keep R.app running.

I then use, in a terminal window:

cd /private/var/folders/fl/jchvcqm92rd7bjh6hzkd1cqc0000gn/T/RtmpgyhrHG/downloaded_packages
R_ARCH=/X86_64 R CMD INSTALL rgl_0.93.924.tar.gz

Towards the end of the build/install I get:

...
installing to /Users/rob/Library/R/3.0/library/rgl/libs/X86_64
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Warning in rgl.init(initValue) : RGL: unable to open X11 display
Warning in fun(libname, pkgname) : error in rgl_init

* DONE (rgl)

These last 2 warning messages only show up if XQuartz.app is not running. 

Testing in R.app:

library(rgl)
demo(rgl)

works (at least on my system!). 

Regards,
Rob J. Goedman
goedman at icloud.com




On Feb 5, 2013, at 5:25 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

> On 13-02-05 8:07 AM, Bryan Hanson wrote:
>> Thanks for taking the time to look at this carefully Duncan.  I don't see the warning you mention, and I don't see the string R_pretty0 in the log either.  I'm appending right here in case there is something else you want to look at.  I restarted my computer but the result is the same.  I'm on OSX OS X 10.8.2 (12C60). Thanks, Bryan
> 
> Okay, now you're getting a different error than you described before. This one I think you can fix:  you need Freetype, and rgl needs to be able to find it when you do the install.  Normally it does that using the freetype-config utility, but you're not finding that:
> 
> [deletions]
>> checking for freetype-config... no
> 
> I thought (from online readings) that Freetype should be available in a standard OSX install, so I'm not sure why it's not working for you.  You can disable the Cocoa (native) support by configuring with the configure option
> 
> install.packages("rgl", ..., configure.args="--disable-cocoa")
> 
> and then you should be able to get the install to complete, but it might be better to figure out why freetype-config isn't working for you.
> 
> 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