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

Simon Urbanek simon.urbanek at r-project.org
Wed Oct 12 00:37:33 CEST 2011


On Oct 11, 2011, at 6:33 PM, Marius Hofert wrote:

> 
> On 2011-10-12, at 00:12 , Simon Urbanek wrote:
> 
>> 
>> On Oct 11, 2011, at 6:01 PM, Marius Hofert wrote:
>> 
>>> 
>>> On 2011-10-11, at 23:30 , Simon Urbanek wrote:
>>> 
>>>> 
>>>> On Oct 11, 2011, at 5:16 PM, Marius Hofert wrote:
>>>> 
>>>>> 
>>>>> On 2011-10-11, at 23:04 , 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?
>>>>> 
>>>>> yes, both are installed.
>>>>> 
>>>>>> I have no problem with the *configuration* on vanilla Lion.
>>>>> 
>>>>> I installed about 30 packages today, everything worked fine. Hmmm... seems challenging to detect where the problem is.
>>>>> 
>>>> 
>>>> If you want to do that, have a look at rgl/config.log - it will tell you what went wrong.
>>>> 
>>> 
>>> Hi Simon,
>>> 
>>> do you know the full path of this file? I can't find it.0
>>> 
>> 
>> It's in the rgl directory after you run R CMD INSTALL rgl
> 
> that's removed after the configure-trial:
> 
> bash-3.2$ R CMD INSTALL rgl_0.92.798.tar.gz 
> * installing to library ‘/Library/Frameworks/R.framework/library’
> * 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’
> bash-3.2$ 
> 
> => there is no rgl folder (neither in /Library/Frameworks/R.framework/library nor in the folder in which the .tar.gz resides). 
> 

As I said use R CMD INSTALL rgl, not on the tar ball
S


>> 
>> 
>> 
>>>> 
>>>>>> 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.
>>>>>> 
>>>>>> BTW: why don't you just use
>>>>>> install.packages("rgl")
>>>>>> that works on Lion as well...
>>>>> 
>>>>> I installed all packages from source since I installed R from source and I remember reading somewhere that one should do it this way since the binaries are built to work with CRAN's binary installation of R. But if this does not create problems (please let me know), I'll give it a try.
>>>>> 
>>>> 
>>>> As long as your configuration is compatible (essentially you have to set r_arch properly) it works. It's not guaranteed to work if you use different compilers.
>>> 
>>> I tried:
>>> install.packages("rgl", configure.args="--r_arch=x86_64")
>>> 
>> 
>> Naw, you got wrong - I was talking about R configuration. Never mind then (you may want to read up on building R - see the R for Mac FAQ).
>> 
>> Cheers,
>> Simon
>> 
>> 
>> 
>>> but the outcome was:
>>> 
>>>> install.packages("rgl", configure.args="--r_arch=x86_64")
>>> install.packages("rgl", configure.args="--r_arch=x86_64")
>>> Installing package(s) into ‘/Library/Frameworks/R.framework/library’
>>> (as ‘lib’ is unspecified)
>>> --- Please select a CRAN mirror for use in this session ---
>>> Loading Tcl/Tk interface ... done
>>> 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’ ...
>>> configure: error: unrecognized option: `--r_arch=x86_64'
>>> Try `./configure --help' for more information.
>>> 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/RtmpzmXkSd/downloaded_packages’
>>> Warning message:
>>> In install.packages("rgl", configure.args = "--r_arch=x86_64") :
>>> installation of package 'rgl' had non-zero exit status
>>>> 
>>> 
>>> How/Where should r_arch be specified?
>>> 
>>> Cheers,
>>> 
>>> Marius
>>> 
>>> 
>>>> 
>>>> 
>>>>> I just remember something: I installed the 64bit R version. Is this a problem for rgl?
>>>>> 
>>>> 
>>>> No.
>>>> 
>>>> Cheers,
>>>> Simon
>>>> 
>>>> 
>>>>> Cheers,
>>>>> 
>>>>> Marius
>>>>> 
>>>>> 
>>>>>> 
>>>>>> 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