Closed mjsteinbaugh closed 1 year ago
See related:
Could be an X11 / XQuartz issue?
This is likely a Homebrew issue. See the suggestions for debugging it in issue #44.
I can confirm this works:
install.packages("rgl", type = "source", configure.args = "--disable-opengl")
Thanks, I'll take a look. Usually this gets installed as the binary, so I figured I'd post in case somebody else hits this.
Let's leave this open, in case some other Homebrew users want to try to debug it properly.
OK great. For reference, I'm using the CRAN Homebrew R cask (which allows for binary package installs), unlike the case in #44 .
Actually I hit the same issue on Big Sur as well, so this isn't Catalina-specific.
I'm sure it's a Homebrew issue, but it's possible rgl
's install code could be modified to work with it. The things to look for:
Does x11()
work in R? If not, then it's likely hopeless to get rgl
fully working. Both use X11 to display. On macOS, that's provided by XQuartz; its recent updates have caused a lot of breakage.
If x11()
works but rgl
won't start, then there's hope, but it needs someone with a good knowledge of xquartz in Homebrew to see what rgl
is doing wrong. It might be as simple as disabling the Darwin special-casing, or it might need more extensive changes.
I'm not going to be able to debug this: I use the CRAN build of R, and the xquartz.org build of XQuartz, and things are fine.
I have the same problem here and I'm also using the cask from homebrew, but...
libpng
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c ABCLineSet.cpp -o ABCLineSet.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c BBoxDeco.cpp -o BBoxDeco.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c Background.cpp -o Background.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c ClipPlane.cpp -o ClipPlane.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c Color.cpp -o Color.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c Disposable.cpp -o Disposable.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c Light.cpp -o Light.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c LineSet.cpp -o LineSet.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c LineStripSet.cpp -o LineStripSet.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c Material.cpp -o Material.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c NULLgui.cpp -o NULLgui.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c PlaneSet.cpp -o PlaneSet.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c PointSet.cpp -o PointSet.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c PrimitiveSet.cpp -o PrimitiveSet.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c RenderContext.cpp -o RenderContext.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c Shape.cpp -o Shape.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c SphereMesh.cpp -o SphereMesh.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c SphereSet.cpp -o SphereSet.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c SpriteSet.cpp -o SpriteSet.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c String.cpp -o String.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c Surface.cpp -o Surface.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c TextSet.cpp -o TextSet.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c Texture.cpp -o Texture.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c Viewpoint.cpp -o Viewpoint.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c api.cpp -o api.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c assert.cpp -o assert.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c callbacks.cpp -o callbacks.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c device.cpp -o device.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c devicemanager.cpp -o devicemanager.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c fps.cpp -o fps.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c ftgl.cpp -o ftgl.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c geom.cpp -o geom.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c gl2ps.c -o gl2ps.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c glErrors.cpp -o glErrors.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c glgui.cpp -o glgui.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c gui.cpp -o gui.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c init.cpp -o init.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c par3d.cpp -o par3d.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c pixmap.cpp -o pixmap.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c platform.cpp -o platform.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c pretty.c -o pretty.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c render.cpp -o render.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c rglmath.cpp -o rglmath.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c rglview.cpp -o rglview.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c scene.cpp -o scene.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c select.cpp -o select.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c subscene.cpp -o subscene.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c win32gui.cpp -o win32gui.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c win32lib.cpp -o win32lib.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c x11gui.cpp -o x11gui.o
/usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -std=c++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/llvm/include -I/usr/local/opt/openssl/include -I/usr/local/opt/gettext/include -I/usr/local/opt/tcl-tk/include -fPIC -g -O3 -Wall -pedantic -mtune=native -pipe -c x11lib.cpp -o x11lib.o
I don't know if that -DRGL_NO_OPENGL
flag should be there.
In my case x11() works in R
On 06/03/2021 7:20 a.m., Luis Puerto wrote:
I have the same problem here and I'm also using the cask from homebrew, but...
- I don't see why should it be different than the one downloaded from CRAN since cask version just install cran version.
- The same with XQuartz
- I guess the issue is with the toolchain to build where some dependencies are installed with homebrew. Like|libpng|
You're using a different compiler for rgl than CRAN uses for R. The CRAN binaries are built with commands like
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/System/Library/Frameworks/OpenGL.framework/Headers -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I/usr/X11/include -DDarwin -DNO_GL_PREFIX -I/opt/X11/include -DHAVE_FREETYPE -Iext/ftgl -I/usr/local/opt/freetype/include/freetype2 -Iext -I/usr/local/include -fPIC -Wall -g -O2 -c ABCLineSet.cpp -o ABCLineSet.o
or
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DHAVE_PNG_H -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -DRGL_NO_OPENGL -I/usr/local/include -fPIC -Wall -g -O2 -c ABCLineSet.cpp -o ABCLineSet.o
depending on which version of the shared library is being built.
You are only getting the second type of build, because the configure script didn't find something it needs, and has defaulted to --disable-opengl (or you specified that explicitly).
I haven't specified anything…
I have a rmakevars, thought:
# --------
# RMakevars
# --------
# General note
# - need to repeat options across C++ flavors (e.g., 11, 14)
# Homebrew bin / opt / lib locations
HB=/usr/local/bin
HO=/usr/local/opt
HL=/usr/local/lib
HI=/usr/local/include
# MacOS 10.14.6 Xcode header location (August 2019)
# (do "xcrun -show-sdk-path" in terminal to get path; change if yours is different)
XH=$(shell xcrun -show-sdk-path)
# ccache
CCACHE=$(HB)/ccache
# Make using all cores (set # to # of cores on your machine)
# Check https://stackoverflow.com/q/2499070 for more info.
# Run `nproc` to check the number of threads https://stackoverflow.com/a/56607839
# As a rule of thumb the number should be between cores and threads.
MAKE=make -j4
# GNU version (July 2020)
GNU_VER=10
# LLVM (Clang) compiler options
CC=$(CCACHE) $(HO)/llvm/bin/clang
CXX=$(CC)++
CXX98=$(CC)++
CXX11=$(CC)++
CXX14=$(CC)++
CXX17=$(CC)++
# FORTRAN
FC=$(CCACHE) $(HB)/gfortran-$(GNU_VER)
F77=$(FC)
FLIBS=-L$(HL)/gcc/$(GNU_VER) -lgfortran -lquadmath -lm
# STD libraries
CXX1XSTD=-std=c++0x
CXX11STD=-std=c++11
CXX14STD=-std=c++14
CXX17STD=-std=c++17
# FLAGS
STD_FLAGS=-g -O3 -Wall -pedantic -mtune=native -pipe
CFLAGS=$(STD_FLAGS)
CXXFLAGS=$(STD_FLAGS)
CXX98FLAGS=$(STD_FLAGS)
CXX11FLAGS=$(STD_FLAGS)
CXX14FLAGS=$(STD_FLAGS)
CXX17FLAGS=$(STD_FLAGS)
# Preprocessor FLAGS
# NB: -isysroot refigures the include path to the Xcode SDK we set above
CPPFLAGS=-isysroot $(XH) -I$(HI) \
-I$(HO)/llvm/include -I$(HO)/openssl/include \
-I$(HO)/gettext/include -I$(HO)/tcl-tk/include
# Linker flags (suggested by homebrew)
LDFLAGS+=-L$(HO)/llvm/lib -Wl,-rpath,$(HO)/llvm/lib
# Flags for OpenMP support that should allow packages that want to use
# OpenMP to do so (data.table), and other packages that bork with
# -fopenmp flag (stringi) to be left alone
SHLIB_OPENMP_CFLAGS=-fopenmp
SHLIB_OPENMP_CXXFLAGS=-fopenmp
SHLIB_OPENMP_CXX98FLAGS=-fopenmp
SHLIB_OPENMP_CXX11FLAGS=-fopenmp
SHLIB_OPENMP_CXX14FLAGS=-fopenmp
SHLIB_OPENMP_CXX17FLAGS=-fopenmp
SHLIB_OPENMP_FCFLAGS=-fopenmp
SHLIB_OPENMP_FFLAGS=-fopenmp
/System/Library/Frameworks/OpenGL.framework/Headers
is not present. The only folders under OpenGL.framework
are Library
, Resources
and Versions
.
I also tried this: https://methi1999.github.io/2020/08/19/opengl.html and I got an error.
In fact, that include is also missing on my system. I should probably clean up the configure script.
I believe the OpenGL headers are being found in /usr/X11/include
, though they are also present in /opt/X11/include
. Those both have the same recent timestamp on my system, so were probably installed with XQuartz.
And just to be clear: I can't really help with debugging Homebrew. If you can work out what changes are needed in the configure script I'll try them out, but otherwise, I'd suggest changing to a more standard setup.
@dmurdoch I totally understand about the no support for homebrew and appreciate the time you are taking to this.
I really want to know why this isn't working when I have these R and XQuartz installed from the binaries. Yeah, through a homebrew script, but from the binaries.
I can see that on those includes on X11 there a libpng16. I think that perhaps the problem is that the build is taking the homebrew one instead of the XQuartz one.
Perhaps you can force on the building script to use the one from XQuartz?
By the way… I removed hombrew's libpng and my rmakevars, to see if there was something related to it.
Now it's not able to find libpng
Error in dyn.load(dynlib <- getDynlib(dir)) :
unable to load shared object '/Users/lpuerto/Library/R/4.x/library/00LOCK-rgl/00new/rgl/libs/rgl.so':
dlopen(/Users/lpuerto/Library/R/4.x/library/00LOCK-rgl/00new/rgl/libs/rgl.so, 6): Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: /usr/local/opt/freetype/lib/libfreetype.6.dylib
Full building output: https://gist.github.com/f66dcdb558e1ce44d01732f5d821cdda
Include a PR, and I'll test it.
I'm closing this, as there doesn't seem to be anything I can do here.
Hi, I'm having trouble getting rgl to install on one of my Macs running macOS 10.15.7. I tested this on another computer running Big Sur 11.2.2 and rgl installs sucessfully.
This runs through and looks good until the very end:
Here's my session info:
I use Homebrew and have the recommended macOS R developer tools, including gfortran installed.