RGL package for R compilation error
Trying to compile rgl for r on arch linux x86_64. I copied only part of the installation error. This happened after I recently updated R. Any idea how to fix this issue?
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng16 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fvisibility=hidden -fpic -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -c init.cpp -o init.o
In file included from /usr/include/freetype2/freetype.h:33:0,
from ext/ftgl/FTGL/ftgl.h:33,
from glgui.h:12,
from gui.h:10,
from rglview.h:11,
from Device.h:11,
from DeviceManager.h:9,
from init.cpp:6:
init.cpp: In function βSEXPREC* rgl::rgl_init(SEXP, SEXP, SEXP)β:
/usr/include/freetype2/config/ftconfig.h:369:26: error: expected primary-expression before β__typeof__β
#define TYPEOF( type ) (__typeof__ (type))
^
init.cpp:58:13: note: in expansion of macro βTYPEOFβ
else if ( TYPEOF(initValue) == EXTPTRSXP ) {
^
/usr/include/freetype2/config/ftconfig.h:369:26: error: expected β)β before β__typeof__β
#define TYPEOF( type ) (__typeof__ (type))
^
init.cpp:58:13: note: in expansion of macro βTYPEOFβ
else if ( TYPEOF(initValue) == EXTPTRSXP ) {
^
init.cpp:61:3: error: expected β)β before βelseβ
else if ( !isNull(initValue) )
^
/usr/lib64/R/etc/Makeconf:143: recipe for target 'init.o' failed
make: *** [init.o] Error 1
ERROR: compilation failed for package βrglβ
* removing β/home/user/R/x86_64-unknown-linux-gnu-library/3.2/rglβ
Warning in install.packages :
installation of package βrglβ had non-zero exit status
+3
source to share