Skip to content
Prev 56943 / 63424 Next

rgl install for R 3.7

On 02/06/2019 16:28, Koenker, Roger W wrote:
I presume 'R 3.7.0' is R-devel: it is not released and may never be 
released under that version.
I suspect you don't want the second: if you have pkg-config it should 
find include paths for you.
Perhaps you should show the linking line.  A similar setup works for me:

configure: Darwin, so ensuring /opt/X11/bin is at the head of the PATH...
checking for pkg-config... yes
...

Do you have pkg-config (it is not a standard part of macOS, but is 
available on SU's site -- see the R-admin manual)?  You may need to set 
its path: for rgl I used

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

(which should be the default) but for a few packages (Cairo gdtools rsvg)

PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

/usr/local/clang8/bin/clang++ -std=gnu++11 -dynamiclib 
-Wl,-headerpad_max_install_names -undefined dynamic_lookup 
-single_module -multiply_defined suppress -L/Users/ripley/R/R-devel/lib 
-L/usr/local/clang8/lib -L/usr/local/lib -o rgl.so ABCLineSet.o 
BBoxDeco.o Background.o ClipPlane.o Color.o Disposable.o Light.o 
LineSet.o LineStripSet.o Material.o NULLgui.o PlaneSet.o PointSet.o 
PrimitiveSet.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 par3d.o pixmap.o platform.o 
pretty.o render.o rglmath.o rglview.o scene.o select.o subscene.o 
win32gui.o win32lib.o x11gui.o x11lib.o -lGLU -lGL -framework GLKit 
-framework OpenGL -dylib_file 
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 
-L/usr/local/lib -lpng16 -L/usr/X11/lib -lX11 -L/usr/local/lib 
-lfreetype -L/Users/ripley/R/R-devel/lib -lR -Wl,-framework 
-Wl,CoreFoundation

so that is statically linking libfreetype from /usr/local/lib and 
installed from 
https://mac.r-project.org/libs/freetype-2.5.5-darwin.13-x86_64.tar.gz . 
And that provides a freetype2.pc file, so

% pkg-config freetype2 --cflags
-I/usr/local/include/freetype2 -I/usr/local/include/libpng16
% pkg-config freetype2 --libs
-L/usr/local/lib -lfreetype