简体   繁体   中英

R package RGL fails to install on a Mac with MRAN

I'm trying to install rgl because another package needs some element of it. I have XQuartz running on the Mac because I'm using MRAN R. The installation (from CRAN within Rstudio, from the shell in Rstudio and other sources) fails with the following errors.

    clang-omp++ -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/System/Library/Frameworks/OpenGL.framework/Headers  -DHAVE_PNG_H -I/Users/gcn/anaconda/include/libpng16 -I/usr/X11/include -DDarwin -DNO_GL_PREFIX -I/opt/X11/include -DHAVE_FREETYPE -Iext/ftgl -I/opt/X11/include/freetype2 -Iext  -I/Users/Shared/Jenkins/workspace/External-R-3.3.3/vendor/build/include -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include   -fPIC  -g -O3 -Wall -pedantic -mtune=native -std=c++11 -c platform.cpp -o platform.o
platform.cpp:38:18: error: no member named 'x' in '_GLKVector3'
      *winX = result.x;
              ~~~~~~ ^
    platform.cpp:39:18: error: no member named 'y' in '_GLKVector3'
      *winY = result.y;
              ~~~~~~ ^
    platform.cpp:40:18: error: no member named 'z' in '_GLKVector3'
      *winZ = result.z;
              ~~~~~~ ^
    platform.cpp:64:18: error: no member named 'x' in '_GLKVector3'
      *objX = result.x;
              ~~~~~~ ^
    platform.cpp:65:18: error: no member named 'y' in '_GLKVector3'
      *objY = result.y;
              ~~~~~~ ^
    platform.cpp:66:18: error: no member named 'z' in '_GLKVector3'
      *objZ = result.z;

I also have a version of Rstudio running in an ubuntu instance on AWS and I didn't get these errors when installing. The ubuntu doesn't use MRAN so I suppose that could the source of the problem on the mac, but this page from Microsoft - https://mran.microsoft.com/web/checks/check_results_rgl.html seems to suggest rgl does run with MRAN on a mac.

You appear to have the compiler define __STRICT_ANSI__ set. Normally rgl doesn't set that. The latest version of rgl on R-forge (0.98.13) has this fixed in the platform.cpp file where you saw the error, but there may be other places where problems arise.

You can get the latest version on R-forge. It is not available on CRAN (or MRAN).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM