[R-SIG-Mac] rgl

Simon Urbanek simon.urbanek at r-project.org
Wed Feb 13 17:35:12 CET 2008


Benilton,

On Feb 13, 2008, at 10:50 AM, Benilton Carvalho wrote:

> Thanks again Simon,
>
> I tried two options: 1) fixing rgl; 2) using R-devel. Both  
> approaches led me to the following error:
>
> g++-4.0 -arch x86_64 -no-cpp-precomp -I/Users/bcarvalh/Desktop/R-rc/ 
> include -I/Users/bcarvalh/Desktop/R-rc/include/x86_64 -DHAVE_PNG_H - 
> I/usr/X11/include -DRGL_USE_CARBON -I/System/Library/Frameworks/ 
> AGL.framework/Headers -Iext -I/usr/local/include   -g -O2 -fPIC  -g - 
> O2 -c osxgui.cpp -o osxgui.o
> osxgui.cpp: In constructor  
> ‘gui::OSXWindowImpl::OSXWindowImpl(gui::Window*)’:
> osxgui.cpp:74: error: ‘CreateNewWindow’ was not declared in this scope
> osxgui.cpp:78: error: ‘kEventWindowDrawContent’ was not declared in  
> this scope
> osxgui.cpp:91: error: ‘GetWindowEventTarget’ was not declared in  
> this scope
>
> (and lots of other messages similar to this)
>

It seems that osxgui is using Carbon API functions that are not  
supported in 64-bit. I suspect that you'll have to use --disable- 
carbon for 64-bit builds until rgl is updated to cope with that ..  
(and you'll probably have to ask rgl folks whether it's planned at  
all...).

Cheers,
Simon


>
> On Feb 13, 2008, at 8:45 AM, Simon Urbanek wrote:
>
>> Benilton,
>>
>> you're compiling for Tiger on Leopard with Leopard X11 settings.  
>> Unfortunately rgl includes --R_opts from libpng which won't work  
>> when targeting Tiger. So you have two options:
>>
>> 1) fix rgl, e.g. by using:
>> sed 's:--ldflags:--libs:' configure > 1 && mv 1 configure && chmod a 
>> +x configure
>>
>> (really correct solution is also to add --L_opts, but in our case  
>> that's taken care of by X11 already)
>>
>> 2) target Leopard instead of Tiger (default for R-devel, but  
>> requires tweaking for R 2.6.x)
>>
>> Since you are building 64-bit, I wonder why you are using R-2.6 as  
>> that is doesn't have Quartz support in 64-bit, unlike R-devel.
>>
>> Cheers,
>> Simon
>>
>> CC to Duncan: to avoid the above it may be a good idea to use -- 
>> L_opts and --libs only on Darwin, because rpath-like behavior is  
>> the default linker behavior anyway.
>>
>>
>> On Feb 12, 2008, at 9:30 PM, Benilton Carvalho wrote:
>>
>>> Thanks a lot Simon,
>>>
>>> I very much appreciate your kindness in pointing me back to the FAQ.
>>>
>>> That got me moving a little bit more and I'm now surprised by the  
>>> following error:
>>>
>>> g++-4.0 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names - 
>>> Wl,-macosx_version_min -Wl,10.4 -undefined dynamic_lookup - 
>>> single_module -multiply_defined suppress -L/usr/local/lib -o  
>>> rgl.so BBoxDeco.o Background.o Color.o Disposable.o FaceSet.o  
>>> Light.o LineSet.o LineStripSet.o Material.o PointSet.o  
>>> PrimitiveSet.o QuadSet.o RenderContext.o Shape.o SphereMesh.o  
>>> SphereSet.o SpriteSet.o String.o Surface.o TextSet.o Texture.o  
>>> TriangleSet.o Viewpoint.o api.o assert.o callbacks.o device.o  
>>> devicemanager.o fps.o geom.o gl2ps.o glgui.o gui.o init.o math.o  
>>> osxgui.o osxlib.o par3d.o pixmap.o render.o rglview.o scene.o  
>>> select.o win32gui.o win32lib.o x11gui.o x11lib.o -lGLU -lGL - 
>>> framework OpenGL  -L/usr/X11/lib -Wl,-rpath,/usr/X11/lib -lpng12 - 
>>> lz -lm -L/usr/X11/lib -lX11  -L/Users/bcarvalh/Desktop/R-rc/lib/ 
>>> x86_64 -lR
>>> ld: -rpath can only be used when targeting Mac OS X 10.5 or later
>>>
>>> Any suggestion?
>>>
>>> Thank you so much,
>>>
>>> b
>>>
>>> > sessionInfo()
>>> R version 2.6.2 RC (2008-02-05 r44340)
>>> i386-apple-darwin9.1.0
>>>
>>> locale:
>>> C
>>>
>>> attached base packages:
>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>
>>> loaded via a namespace (and not attached):
>>> [1] tools_2.6.2
>>>
>>>
>>>
>>>
>>> On Feb 12, 2008, at 9:09 PM, Simon Urbanek wrote:
>>>
>>>> Benilton,
>>>>
>>>> please read
>>>> http://r.research.att.com/building.html
>>>> (referenced from the R for Mac OS X FAQ) and fix your X11 in case  
>>>> you didn't already.
>>>>
>>>> Cheers,
>>>> Simon
>>>>
>>>>
>>>> On Feb 12, 2008, at 8:15 PM, Benilton Carvalho wrote:
>>>>
>>>>> Dear All,
>>>>>
>>>>> my apologies if a solution was already proposed for this and I  
>>>>> missed. I didn't have much success with my search, therefore I  
>>>>> ask here directions on building the rgl package from the source  
>>>>> using Leopard (and R-2.6.2 RC - 64 bits, built from the source).
>>>>>
>>>>> I initially tried what I always do to install packages:
>>>>>
>>>>> install.packages("rgl", dep=T, type="source")
>>>>>
>>>>> which failed with:
>>>>>
>>>>> checking for glEnd in -lGL... no
>>>>> configure: error: missing required library GL
>>>>>
>>>>> Well, OpenGL is available under Frameworks: /System/Library/ 
>>>>> Frameworks/OpenGL.framework
>>>>>
>>>>> and I wonder if anyone could give me some suggestions on how to  
>>>>> pass and what are the correct 'configure' options to install the  
>>>>> rgl package.
>>>>>
>>>>> Thank you very much,
>>>>>
>>>>> b
>>>>>
>>>>> _______________________________________________
>>>>> R-SIG-Mac mailing list
>>>>> R-SIG-Mac at stat.math.ethz.ch
>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>
>>>
>>
>



More information about the R-SIG-Mac mailing list