1

I'm having trouble installing the package 'rgl'.

I'm also curious about the g++ DNDEBUG messages that get printed (these messages seem to come up everytime I install a new package).

Here is the printout when I try install.packages("rgl"):

* installing *source* package ‘rgl’ ...
** package ‘rgl’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for gcc... (cached) gcc -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -std=gnu99 accepts -g... (cached) yes
checking for gcc -std=gnu99 option to accept ISO C89... (cached) none needed
checking whether __attribute__((visibility())) is supported... yes
checking whether gcc -std=gnu99 accepts -fvisibility... yes
checking whether  accepts -fvisibility... no
checking for libpng-config... yes
configure: using libpng-config
configure: using libpng dynamic linkage
checking for X... libraries , headers 
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for glEnd in -lGL... yes
checking for gluProject in -lGLU... yes
checking for freetype-config... yes
configure: using Freetype and FTGL
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ABCLineSet.cpp -o ABCLineSet.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c BBoxDeco.cpp -o BBoxDeco.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Background.cpp -o Background.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ClipPlane.cpp -o ClipPlane.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Color.cpp -o Color.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Disposable.cpp -o Disposable.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Light.cpp -o Light.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c LineSet.cpp -o LineSet.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c LineStripSet.cpp -o LineStripSet.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Material.cpp -o Material.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c NULLgui.cpp -o NULLgui.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c PlaneSet.cpp -o PlaneSet.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c PointSet.cpp -o PointSet.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c PrimitiveSet.cpp -o PrimitiveSet.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c RenderContext.cpp -o RenderContext.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Shape.cpp -o Shape.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c SphereMesh.cpp -o SphereMesh.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c SphereSet.cpp -o SphereSet.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c SpriteSet.cpp -o SpriteSet.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c String.cpp -o String.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Surface.cpp -o Surface.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c TextSet.cpp -o TextSet.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Texture.cpp -o Texture.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Viewpoint.cpp -o Viewpoint.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c api.cpp -o api.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c assert.cpp -o assert.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c callbacks.cpp -o callbacks.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c device.cpp -o device.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c devicemanager.cpp -o devicemanager.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c fps.cpp -o fps.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ftgl.cpp -o ftgl.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c geom.cpp -o geom.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c gl2ps.c -o gl2ps.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c glErrors.cpp -o glErrors.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c glgui.cpp -o glgui.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c gui.cpp -o gui.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c init.cpp -o init.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c par3d.cpp -o par3d.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c pixmap.cpp -o pixmap.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c platform.cpp -o platform.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c pretty.c -o pretty.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c render.cpp -o render.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c rglmath.cpp -o rglmath.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c rglview.cpp -o rglview.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c scene.cpp -o scene.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c select.cpp -o select.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c subscene.cpp -o subscene.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c win32gui.cpp -o win32gui.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c win32lib.cpp -o win32lib.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c x11gui.cpp -o x11gui.o
g++ -I/usr/share/R/include -DNDEBUG -DHAVE_PNG_H -I/home/alex/anaconda2/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/home/alex/anaconda2/include/freetype2 -Iext    -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fvisibility=hidden -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c x11lib.cpp -o x11lib.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -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 -L/home/alex/anaconda2/lib -lpng16 -lX11 -L/home/alex/anaconda2/lib -lfreetype -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/rgl/libs
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'rgl', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/usr/local/lib/R/site-library/rgl/libs/rgl.so':
  libpng16.so.16: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/rgl’

The downloaded source packages are in
        ‘/tmp/Rtmpmv8O2Z/downloaded_packages’
Warning message:
In install.packages("rgl") :
installation of package ‘rgl’ had non-zero exit status

and sessionInfo():

R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8    
 [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8   
 [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] BiocInstaller_1.20.1

loaded via a namespace (and not attached):
[1] tools_3.2.3 tcltk_3.2.3

and .libPaths():

> .libPaths()
[1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library"      
[3] "/usr/lib/R/library"
alexvpickering
  • 632
  • 1
  • 8
  • 20
  • The DNDEBUG messages are referencing /home/alex/anaconda2/include/libpng16 which exists and has the following files: png.h, pngconf.h, and pnglibconf.h. – alexvpickering Feb 19 '16 at 18:10
  • 1
    `error: unable to load shared object '/usr/local/lib/R/site-library/rgl/libs/rgl.so':` Do you need to specify a personal lib or run R as root? – Phil Feb 19 '16 at 18:13
  • Running R as root worked. Thanks! Any idea why (I usually don't need root to install R packages - and using root has messed up python/anaconda permissions for me in the past so I'm a bit weary of it)? – alexvpickering Feb 19 '16 at 18:30
  • The package was trying to install in the system library path which you generally don't have access to and isn't ideal. You can specify a path manually using the `lib = ` option in `install.packages()`. Your personal library should be the default though. Can you edit your question to include the output of `.libPaths()`? – Phil Feb 19 '16 at 18:44
  • Is there something I should change about my R configuration to prevent this in the future (and that won't mess up my current environment)? – alexvpickering Feb 19 '16 at 18:59

1 Answers1

1

From our discussion this seems to be a permissions issue.

The line error: unable to load shared object '/usr/local/lib/R/site-library/rgl/libs/rgl.so':... suggests that you are trying to install the library to a folder you do not have permission to write to.

You can either:

Install and manually specify a lib (recommended)

Use the lib = argument in install.packages(). As you're on Ubuntu your personal library will most likely be in ~/R/x86_64-pc-linux-gnu-library if on a 64bit system.

Install as root

You can run R as root (from a terminal sudo R) and install the library into the system folder.

Problem with .libPaths()

It seems like there's a problem with your library paths. If you run .libPaths() from your usual account (i.e. not sudo) your personal library should be listed first, and be the default location for packages to install to. As it seems to be missing you can append your personal library following the instructions in this answer: https://stackoverflow.com/a/15170774/3022126

(NB: list your personal library first to make it the default location, i.e. .libPaths(c("~/R/...", .libPaths())

Community
  • 1
  • 1
Phil
  • 4,344
  • 2
  • 23
  • 33
  • I'm thinking that the issue may have stemmed from my original R installation (all the instructions for installing on Ubuntu generally have you run sudo). ">which R" gives me /usr/bin/R. Regardless, the installation as root worked for me. – alexvpickering Feb 19 '16 at 19:33