On 17/07/2012 12:51 PM, Davor Cubranic wrote:
Thank you, that fixes it.

I also noticed the following warning when installing 64-bit version of the 
package (the default, on OS X):

g++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined 
dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o 
aglrgl.so ABCLineSet.o BBoxDeco.o Background.o Color.o Disposable.o Light.o 
LineSet.o LineStripSet.o Material.o PlaneSet.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 Viewpoint.o api.o assert.o callbacks.o device.o 
devicemanager.o fps.o ftgl.o geom.o glErrors.o glgui.o gui.o init.o par3d.o 
pixmap.o render.o rglmath.o rglview.o scene.o select.o win32gui.o win32lib.o 
x11gui.o x11lib.o gl2ps.o osx/osxgui.o osx/osxlib.o -L/opt/local/lib -lpng14 
-framework Cocoa -L/opt/local/lib -lfreetype -lz -lbz2 -lobjc 
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework 
-Wl,CoreFoundation
ld: warning: ignoring file osx/osxgui.o, file was built for i386 which is not 
the architecture being linked (x86_64)

Sure enough, osx/osxgui.o is the only object file built for the 32-bit 
architecture:

There is one other problem I've heard of for 64 bit versions of OSX, which Peter reported as follows:

> >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’

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.)

Duncan Murdoch



$ find  -name \*.o |xargs file
rgl/src/ABCLineSet.o:    Mach-O 64-bit object x86_64
rgl/src/AGL/x11gui.o:    Mach-O 64-bit object x86_64
rgl/src/AGL/x11lib.o:    Mach-O 64-bit object x86_64
rgl/src/api.o:           Mach-O 64-bit object x86_64
rgl/src/assert.o:        Mach-O 64-bit object x86_64
rgl/src/Background.o:    Mach-O 64-bit object x86_64
rgl/src/BBoxDeco.o:      Mach-O 64-bit object x86_64
rgl/src/callbacks.o:     Mach-O 64-bit object x86_64
rgl/src/Color.o:         Mach-O 64-bit object x86_64
rgl/src/device.o:        Mach-O 64-bit object x86_64
rgl/src/devicemanager.o: Mach-O 64-bit object x86_64
rgl/src/Disposable.o:    Mach-O 64-bit object x86_64
rgl/src/fps.o:           Mach-O 64-bit object x86_64
rgl/src/ftgl.o:          Mach-O 64-bit object x86_64
rgl/src/geom.o:          Mach-O 64-bit object x86_64
rgl/src/gl2ps.o:         Mach-O 64-bit object x86_64
rgl/src/glErrors.o:      Mach-O 64-bit object x86_64
rgl/src/glgui.o:         Mach-O 64-bit object x86_64
rgl/src/gui.o:           Mach-O 64-bit object x86_64
rgl/src/init.o:          Mach-O 64-bit object x86_64
rgl/src/Light.o:         Mach-O 64-bit object x86_64
rgl/src/LineSet.o:       Mach-O 64-bit object x86_64
rgl/src/LineStripSet.o:  Mach-O 64-bit object x86_64
rgl/src/Material.o:      Mach-O 64-bit object x86_64
rgl/src/osx/osxgui.o:    Mach-O object i386
rgl/src/osx/osxlib.o:    Mach-O 64-bit object x86_64
rgl/src/par3d.o:         Mach-O 64-bit object x86_64
rgl/src/pixmap.o:        Mach-O 64-bit object x86_64
rgl/src/PlaneSet.o:      Mach-O 64-bit object x86_64
rgl/src/PointSet.o:      Mach-O 64-bit object x86_64
rgl/src/PrimitiveSet.o:  Mach-O 64-bit object x86_64
rgl/src/QuadSet.o:       Mach-O 64-bit object x86_64
rgl/src/render.o:        Mach-O 64-bit object x86_64
rgl/src/RenderContext.o: Mach-O 64-bit object x86_64
rgl/src/rglmath.o:       Mach-O 64-bit object x86_64
rgl/src/rglview.o:       Mach-O 64-bit object x86_64
rgl/src/scene.o:         Mach-O 64-bit object x86_64
rgl/src/select.o:        Mach-O 64-bit object x86_64
rgl/src/Shape.o:         Mach-O 64-bit object x86_64
rgl/src/SphereMesh.o:    Mach-O 64-bit object x86_64
rgl/src/SphereSet.o:     Mach-O 64-bit object x86_64
rgl/src/SpriteSet.o:     Mach-O 64-bit object x86_64
rgl/src/String.o:        Mach-O 64-bit object x86_64
rgl/src/Surface.o:       Mach-O 64-bit object x86_64
rgl/src/TextSet.o:       Mach-O 64-bit object x86_64
rgl/src/Texture.o:       Mach-O 64-bit object x86_64
rgl/src/Viewpoint.o:     Mach-O 64-bit object x86_64
rgl/src/win32gui.o:      Mach-O 64-bit object x86_64
rgl/src/win32lib.o:      Mach-O 64-bit object x86_64
rgl/src/x11gui.o:        Mach-O 64-bit object x86_64
rgl/src/x11lib.o:        Mach-O 64-bit object x86_64

I'm attaching the full log of configuring and building the package. I don't see 
osx/osxgui.o it being explicilty built, unlike the others.

Davor





On 2012-07-17, at 3:35 AM, peter dalgaard wrote:

>
> On Jul 17, 2012, at 03:02 , Duncan Murdoch wrote:
>
>> It also needs the headers, not just the library.  If you have them and it's 
not finding them, you can give hints to the configure script; after unpacking the 
source, run ./configure --help to see what's possible.
>
> Red herring... It really is the library that goes AWOL. I'm not sure why, but 
the magical incantation on OSX (Snow Leopard at least) seems to be
>
> install.packages("rgl", configure.args="--with-gl-libs=/usr/X11/lib")
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Email: [email protected]  Priv: [email protected]
>
>
>
>
>
>
>
>


_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to