[R-SIG-Mac] rgl on 10.7: has anyone tried it?

Duncan Murdoch murdoch.duncan at gmail.com
Wed Oct 12 00:07:11 CEST 2011


On 11-10-11 5:04 PM, Simon Urbanek wrote:
>
> On Oct 11, 2011, at 4:10 PM, Marius Hofert wrote:
>
>> Dear all,
>>
>> I tried to install the package rgl on 10.7. Here's the output:
>>
>> ##############################################################################
>>
>>> install.packages("rgl", type="source")
>> install.packages("rgl", type="source")
>> Installing package(s) into ‘/Library/Frameworks/R.framework/library’
>> (as ‘lib’ is unspecified)
>> trying URL 'http://stat.ethz.ch/CRAN/src/contrib/rgl_0.92.798.tar.gz'
>> Content type 'application/x-gzip' length 1677772 bytes (1.6 Mb)
>> opened URL
>> ==================================================
>> downloaded 1.6 Mb
>>
>> * installing *source* package ‘rgl’ ...
>> checking for gcc... gcc -arch x86_64 -std=gnu99
>> checking for C compiler default output file name... a.out
>> checking whether the C compiler works... yes
>> checking whether we are cross compiling... no
>> checking for suffix of executables...
>> checking for suffix of object files... o
>> checking whether we are using the GNU C compiler... yes
>> checking whether gcc -arch x86_64 -std=gnu99 accepts -g... yes
>> checking for gcc -arch x86_64 -std=gnu99 option to accept ISO C89... none needed
>> checking how to run the C preprocessor... gcc -arch x86_64 -std=gnu99 -E
>> checking for gcc... (cached) gcc -arch x86_64 -std=gnu99
>> checking whether we are using the GNU C compiler... (cached) yes
>> checking whether gcc -arch x86_64 -std=gnu99 accepts -g... (cached) yes
>> checking for gcc -arch x86_64 -std=gnu99 option to accept ISO C89... (cached) none needed
>> checking for libpng-config... yes
>> configure: using libpng-config
>> configure: using libpng dynamic linkage
>> checking for X... libraries , headers
>> checking for glEnd in -lGL... no
>> configure: error: missing required library GL
>> ERROR: configuration failed for package ‘rgl’
>> * removing ‘/Library/Frameworks/R.framework/library/rgl’
>>
>> The downloaded packages are in
>> 	‘/private/var/folders/5r/fpc7qzk55ll71t9j8l9d1d_00000gn/T/RtmpQ6nuVK/downloaded_packages’
>> Warning message:
>> In install.packages("rgl", type = "source") :
>>   installation of package 'rgl' had non-zero exit status
>>>
>>
>> ##############################################################################
>>
>> Apparently, I'm missing the "GL" library. But how can I install it? I searched for it on the web and mainly found that the Mac should have Open GL already installed (?).
>>
>
> Are you sure you installed X11 and Xcode4?
> I have no problem with the *configuration* on vanilla Lion. There is still an issue in the rgl 0.92.798 code (opengl.hpp), though, it's including AGL/* instead of OpenGL/* which fails (hence CC to Duncan), but that's at compilation stage, not configuration.

I can't build on MacOS these days either.  The history is that at one 
point the R.app GUI worked better with the AGL code, while the command 
line version needed X11.  So it built separate shared libraries to be 
loaded depending on what it saw at package load time (I think rgl.* is 
for X11, aglrgl.* is for AGL).  I haven't kept up with Apple's 
rearrangements, so I don't know what is currently needed, and am 
unlikely to have the time to figure it out.

However, if someone who does know what's going on sends me a patch that 
doesn't obviously break something else, I'd be happy to commit it.

Duncan Murdoch


> BTW: why don't you just use
> install.packages("rgl")
> that works on Lion as well...
>
> Cheers,
> Simon
>
>
> [PS: while at it - I'm a bit confused about the current setup, though, since it uses the (non-X11) OpenGL framework yet links X11;  Also it crashes when GLX is not supported (e.g. ssh tunneling). I remember that at some point in the past it was building native and X11 versions but what is left is some mix of both...]
>
>
>
>
>
>> Cheers,
>>
>> Marius
>> _______________________________________________
>> 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