[R-SIG-Mac] Warning: Missing required architecture x86_64 in file

David Winsemius dwinsemius at comcast.net
Sat Jul 4 19:41:43 CEST 2009

I am attempting to install rgl from source within a freshly installed  
R 2.9.1(Patched) from the att.research site.
I am getting this warning at the end of the compilation process:

g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names - 
undefined dynamic_lookup -single_module -multiply_defined suppress -L/ 
usr/local/lib -o rgl.so BBoxDeco.o Background.o Color.o Disposable.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 Viewpoint.o api.o assert.o  
callbacks.o device.o devicemanager.o fps.o ftgl.o geom.o gl2ps.o  
glErrors.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 -dylib_file /System/ 
libGL.dylib -L/usr/local/lib -lpng12 -L/usr/X11/lib -lX11 -L/usr/local/ 
lib -lfreetype -lz -F/Library/Frameworks/R.framework/.. -framework R - 
Wl,-framework -Wl,CoreFoundation
ld warning: in /usr/local/lib/libfreetype.dylib, missing required  
architecture x86_64 in file

And as a consequence am unable to load when running in the 64bit GUI

 > library(rgl)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared library '/Library/Frameworks/R.framework/ 
x86_64/rgl.so, 6): Symbol not found: _FT_Attach_File
   Referenced from: /Library/Frameworks/R.framework/Resources/library/ 
   Expected in: dynamic lookup

In addition: Warning message:
In install.packages(c("RGtk2"), lib = "/Library/Frameworks/R.framework/ 
Resources/library/",  :
   installation of package 'RGtk2' had non-zero exit status
Error : .onLoad failed in 'loadNamespace' for 'rgl'
Error: package/namespace load failed for 'rgl'

 > sessionInfo()
R version 2.9.1 Patched (2009-07-04 r48897)


attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] foreign_0.8-36

loaded via a namespace (and not attached):
[1] tools_2.9.1

I understand this is probably an X11 question rather than an R  
question, but I don't really know where to pose such questions.  I am  
hoping someone has some advice about how to repair or replace  
libfreetype with one that supports the 64 bit architecture? Or perhaps  
some advice about the best place to pose UNIX fixing problems?

David Winsemius, MD
Heritage Laboratories
West Hartford, CT

More information about the R-SIG-Mac mailing list