0

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.

5
  • You could post the bug to MRAN's Github page, or just use R from CRAN. I have heard (but have not personally confirmed) that MRAN handles C++ incorrectly, and there are problems with lots of packages that use C++. Commented Aug 16, 2017 at 20:22
  • I posted a query at the MRAN Community website a couple of weeks ago and updated it yesterday. No responses. I couldn't find a GitHub page for MRAN. I've been using MRAN for a while now and haven't had any MRAN-specific problems, at least that I could document. Commented Aug 17, 2017 at 14:01
  • The Github page I was thinking of was github.com/Microsoft/microsoft-r-open, not exactly MRAN. Commented Aug 17, 2017 at 17:17
  • "Doctor, doctor, it hurts when I do that ..." -- why not install just rgl from CRAN then? Commented Aug 18, 2017 at 14:00
  • The version on CRAN fails (or at least did the last time I tried). I was able to install successfully following the procedure below. Commented Aug 18, 2017 at 18:23

1 Answer 1

1

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).

Sign up to request clarification or add additional context in comments.

1 Comment

Here's the process I used. Download rgl_0.98.13.tar.gz from https://r-forge.r-project.org/R/?group_id=234 and put it at the root of my project directory. Then run install.packages("rgl_0.98.13.tar.gz", repos=NULL). Seems to have worked. Thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.