I'm running R 2.4.1 (with the latest versions of all packages) on an FC6 32-bit system. When I try to install the rgl package, compilation fails:> install.packages("rgl")--- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/rgl_0.70.tar.gz' Content type 'application/x-gzip' length 705556 bytes opened URL =================================================downloaded 689Kb * Installing *source* package 'rgl' ... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for X... libraries , headers checking for libpng-config... yes configure: using libpng-config configure: using libpng dynamic linkage configure: creating ./config.status config.status: creating src/Makevars ** libs g++ -I/usr/lib/R/include -I/usr/lib/R/include -I -DHAVE_PNG_H -I/usr/include/libpng12 -Iext -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -c api.cpp -o api.o In file included from glgui.hpp:9, from gui.hpp:11, from rglview.h:10, from Device.hpp:11, from DeviceManager.hpp:9, from api.cpp:14: opengl.hpp:24:20: error: GL/glu.h: No such file or directory Disposable.hpp:13: warning: ?struct IDisposeListener? has virtual functions but non-virtual destructor types.h:77: warning: ?class DestroyHandler? has virtual functions but non-virtual destructor gui.hpp:56: warning: ?class gui::WindowImpl? has virtual functions but non-virtual destructor gui.hpp:90: warning: ?class gui::GUIFactory? has virtual functions but non-virtual destructor pixmap.h:39: warning: ?class PixmapFormat? has virtual functions but non-virtual destructor api.cpp: In function ?void rgl_user2window(int*, int*, double*, double*, double*, double*, int*)?: api.cpp:764: error: ?gluProject? was not declared in this scope api.cpp: In function ?void rgl_window2user(int*, int*, double*, double*, double*, double*, int*)?: api.cpp:792: error: ?gluUnProject? was not declared in this scope make: *** [api.o] Error 1 chmod: cannot access `/usr/lib/R/library/rgl/libs/*': No such file or directory ERROR: compilation failed for package 'rgl' ** Removing '/usr/lib/R/library/rgl' The downloaded packages are in /tmp/RtmpJY8uNp/downloaded_packages Warning message: installation of package 'rgl' had non-zero exit status in: install.packages("rgl") I was able to install this on an 64-bit system running FC4 and R 2.4.1. Any ideas on why it fails on FC6? Rick B.
Check again your error message: opengl.hpp:24:20: error: GL/glu.h: No such file or directory you need to install mesa-libGLU-devel FC6 version is 6.5.1-7 which will provide development files for glut3. Needless to say the above will probably pool some dependencies and (-devel) means it will install *.h files as well. Start your FC package manager and search for "GLU", install the above and try again. Best, Oleg Rick Bilonick wrote:> I'm running R 2.4.1 (with the latest versions of all packages) on an > FC6 32-bit system. When I try to install the rgl package, compilation > fails: > >> install.packages("rgl") > --- Please select a CRAN mirror for use in this session --- > Loading Tcl/Tk interface ... done > trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/rgl_0.70.tar.gz' > Content type 'application/x-gzip' length 705556 bytes > opened URL > =================================================> downloaded 689Kb > > * Installing *source* package 'rgl' ... > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ANSI C... none needed > checking how to run the C preprocessor... gcc -E > checking for X... libraries , headers > checking for libpng-config... yes > configure: using libpng-config > configure: using libpng dynamic linkage > configure: creating ./config.status > config.status: creating src/Makevars > ** libs > g++ -I/usr/lib/R/include -I/usr/lib/R/include -I -DHAVE_PNG_H > -I/usr/include/libpng12 -Iext -I/usr/local/include -fpic -O2 -g > -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic > -fasynchronous-unwind-tables -c api.cpp -o api.o > In file included from glgui.hpp:9, > from gui.hpp:11, > from rglview.h:10, > from Device.hpp:11, > from DeviceManager.hpp:9, > from api.cpp:14: > opengl.hpp:24:20: error: GL/glu.h: No such file or directory > Disposable.hpp:13: warning: ?struct IDisposeListener? has virtual > functions but non-virtual destructor > types.h:77: warning: ?class DestroyHandler? has virtual functions but > non-virtual destructor > gui.hpp:56: warning: ?class gui::WindowImpl? has virtual functions but > non-virtual destructor > gui.hpp:90: warning: ?class gui::GUIFactory? has virtual functions but > non-virtual destructor > pixmap.h:39: warning: ?class PixmapFormat? has virtual functions but > non-virtual destructor > api.cpp: In function ?void rgl_user2window(int*, int*, double*, double*, > double*, double*, int*)?: > api.cpp:764: error: ?gluProject? was not declared in this scope > api.cpp: In function ?void rgl_window2user(int*, int*, double*, double*, > double*, double*, int*)?: > api.cpp:792: error: ?gluUnProject? was not declared in this scope > make: *** [api.o] Error 1 > chmod: cannot access `/usr/lib/R/library/rgl/libs/*': No such file or > directory > ERROR: compilation failed for package 'rgl' > ** Removing '/usr/lib/R/library/rgl' > > The downloaded packages are in > /tmp/RtmpJY8uNp/downloaded_packages > Warning message: > installation of package 'rgl' had non-zero exit status in: > install.packages("rgl") > > I was able to install this on an 64-bit system running FC4 and R 2.4.1. > > Any ideas on why it fails on FC6? > > Rick B. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466
As the error message indicates, there is no GL/glu.h file installed in the system. If it is, the path is not properly set. % yum provides GL/glu.h on FC6 should give you some clues and tell you what to install, and also whether it should be installed. Ranjan On Mon, 19 Feb 2007 14:35:29 -0500 Rick Bilonick <rab45+ at pitt.edu> wrote:> I'm running R 2.4.1 (with the latest versions of all packages) on an > FC6 32-bit system. When I try to install the rgl package, compilation > fails: > > > install.packages("rgl") > --- Please select a CRAN mirror for use in this session --- > Loading Tcl/Tk interface ... done > trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/rgl_0.70.tar.gz' > Content type 'application/x-gzip' length 705556 bytes > opened URL > =================================================> downloaded 689Kb > > * Installing *source* package 'rgl' ... > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ANSI C... none needed > checking how to run the C preprocessor... gcc -E > checking for X... libraries , headers > checking for libpng-config... yes > configure: using libpng-config > configure: using libpng dynamic linkage > configure: creating ./config.status > config.status: creating src/Makevars > ** libs > g++ -I/usr/lib/R/include -I/usr/lib/R/include -I -DHAVE_PNG_H > -I/usr/include/libpng12 -Iext -I/usr/local/include -fpic -O2 -g > -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic > -fasynchronous-unwind-tables -c api.cpp -o api.o > In file included from glgui.hpp:9, > from gui.hpp:11, > from rglview.h:10, > from Device.hpp:11, > from DeviceManager.hpp:9, > from api.cpp:14: > opengl.hpp:24:20: error: GL/glu.h: No such file or directory > Disposable.hpp:13: warning: ___struct IDisposeListener___ has virtual > functions but non-virtual destructor > types.h:77: warning: ___class DestroyHandler___ has virtual functions but > non-virtual destructor > gui.hpp:56: warning: ___class gui::WindowImpl___ has virtual functions but > non-virtual destructor > gui.hpp:90: warning: ___class gui::GUIFactory___ has virtual functions but > non-virtual destructor > pixmap.h:39: warning: ___class PixmapFormat___ has virtual functions but > non-virtual destructor > api.cpp: In function ___void rgl_user2window(int*, int*, double*, double*, > double*, double*, int*)___: > api.cpp:764: error: ___gluProject___ was not declared in this scope > api.cpp: In function ___void rgl_window2user(int*, int*, double*, double*, > double*, double*, int*)___: > api.cpp:792: error: ___gluUnProject___ was not declared in this scope > make: *** [api.o] Error 1 > chmod: cannot access `/usr/lib/R/library/rgl/libs/*': No such file or > directory > ERROR: compilation failed for package 'rgl' > ** Removing '/usr/lib/R/library/rgl' > > The downloaded packages are in > /tmp/RtmpJY8uNp/downloaded_packages > Warning message: > installation of package 'rgl' had non-zero exit status in: > install.packages("rgl") > > I was able to install this on an 64-bit system running FC4 and R 2.4.1. > > Any ideas on why it fails on FC6? > > Rick B. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
You are missing the OpenGLU headers. On FC5 they are in mesa-libGLU-devel>From the README:REQUIREMENTS ------------ Windowing System (osx/carbon, unix/x11 or win32) OpenGL Library OpenGL Utility Library (GLU) On Mon, 19 Feb 2007, Rick Bilonick wrote:> I'm running R 2.4.1 (with the latest versions of all packages) on an > FC6 32-bit system. When I try to install the rgl package, compilation > fails: > >> install.packages("rgl") > --- Please select a CRAN mirror for use in this session --- > Loading Tcl/Tk interface ... done > trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/rgl_0.70.tar.gz' > Content type 'application/x-gzip' length 705556 bytes > opened URL > =================================================> downloaded 689Kb > > * Installing *source* package 'rgl' ... > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ANSI C... none needed > checking how to run the C preprocessor... gcc -E > checking for X... libraries , headers > checking for libpng-config... yes > configure: using libpng-config > configure: using libpng dynamic linkage > configure: creating ./config.status > config.status: creating src/Makevars > ** libs > g++ -I/usr/lib/R/include -I/usr/lib/R/include -I -DHAVE_PNG_H > -I/usr/include/libpng12 -Iext -I/usr/local/include -fpic -O2 -g > -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic > -fasynchronous-unwind-tables -c api.cpp -o api.o > In file included from glgui.hpp:9, > from gui.hpp:11, > from rglview.h:10, > from Device.hpp:11, > from DeviceManager.hpp:9, > from api.cpp:14: > opengl.hpp:24:20: error: GL/glu.h: No such file or directory > Disposable.hpp:13: warning: ??struct IDisposeListener?? has virtual > functions but non-virtual destructor > types.h:77: warning: ??class DestroyHandler?? has virtual functions but > non-virtual destructor > gui.hpp:56: warning: ??class gui::WindowImpl?? has virtual functions but > non-virtual destructor > gui.hpp:90: warning: ??class gui::GUIFactory?? has virtual functions but > non-virtual destructor > pixmap.h:39: warning: ??class PixmapFormat?? has virtual functions but > non-virtual destructor > api.cpp: In function ??void rgl_user2window(int*, int*, double*, double*, > double*, double*, int*)??: > api.cpp:764: error: ??gluProject?? was not declared in this scope > api.cpp: In function ??void rgl_window2user(int*, int*, double*, double*, > double*, double*, int*)??: > api.cpp:792: error: ??gluUnProject?? was not declared in this scope > make: *** [api.o] Error 1 > chmod: cannot access `/usr/lib/R/library/rgl/libs/*': No such file or > directory > ERROR: compilation failed for package 'rgl' > ** Removing '/usr/lib/R/library/rgl' > > The downloaded packages are in > /tmp/RtmpJY8uNp/downloaded_packages > Warning message: > installation of package 'rgl' had non-zero exit status in: > install.packages("rgl") > > I was able to install this on an 64-bit system running FC4 and R 2.4.1. > > Any ideas on why it fails on FC6? > > Rick B. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Rainer Hurling
2007-Feb-21 14:18 UTC
[R] Installing Package rgl - Compilation Fails - FreeBSD
Brian, thank you for the adaptions. I tried the new version under R-2.5.0 (2007-01-23 r40560) on FreeBSD 7.0-CURRENT and got the following output. ----- #R CMD INSTALL rgl_0.70-1.tar.gz * Installing to library '/usr/local/lib/R/library' * Installing *source* package 'rgl' ... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include checking for libpng-config... yes configure: using libpng-config configure: using libpng dynamic linkage configure: creating ./config.status config.status: creating src/Makevars ** libs g++ -I/usr/local/lib/R/include -I/usr/local/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/local/include/libpng -Iext -I/usr/local/include -fpic -g -O2 -c BBoxDeco.cpp -o BBoxDeco.o In file included from BBoxDeco.hpp:11, from BBoxDeco.cpp:1: math.h: In function `T math::log2(T)': math.h:43: error: `::log2' has not been declared *** Error code 1 Stop in /tmp/R.INSTALL.hVDVXM/rgl/src. chmod: /usr/local/lib/R/library/rgl/libs/*: No such file or directory ERROR: compilation failed for package 'rgl' ** Removing '/usr/local/lib/R/library/rgl' ----- It seems there is a problem with math.h. The FreeBSD manual for math(3) says: The log2() and nan() functions are missing, and many functions are not available in their long double variants. I do not know how to locate the library that contains function log2, sorry. What can I do next to help? Rainer Prof Brian Ripley wrote:> Please try the attached. > > Duncan: I fixed some other errors in configure.ac and src/Makevars.in, > and added a FIXME. If this works on MacOS X (and I am fairly confident > it will on FreeBSD since it now works on Solaris make), I can fix up the > FIXME too. > > I was presuming the MacOS code came from Simon Urbanek, but I would have > expected him to know better than to use GNU make extensions. > > Brian > > On Tue, 20 Feb 2007, Prof Brian Ripley wrote: > >> The problem is that rgl is apparently written for GNU make, and has >> (as shipped) >> >> ifdef MAKINGAGL >> PKG_CPPFLAGS=@AGLCPPFLAGS@ -Iext >> PKG_LIBS=@AGLLIBS@ >> else >> PKG_CPPFLAGS= -If:/R/R-2.4.1/src/extra/zlib -DHAVE_PNG_H >> -If:/R/R-2.4.1/src/gnuwin32/bitmap/libpng -Iext >> PKG_LIBS=-lgdi32 -lopengl32 -lglu32 >> -Lf:/R/R-2.4.1/src/gnuwin32/bitmap/libpng - >> lpng -Lf:/R/R-2.4.1/src/extra/zlib -lz >> endif >> >> and similar for BUILDAGL. >> >> That seems to have been written to make it workable on MacOS X. Given >> that configure knows (or could know) the OS, it seems better to write >> (via configure) a separate Makevars for MacOS X and remove all the >> ifdef...endif stuff for everyone else. (If you do that in Makevars.in >> it should work.) >> >> >> On Tue, 20 Feb 2007, Rainer Hurling wrote: >> >>> Duncan Murdoch schrieb: >>>> On 2/20/2007 1:11 PM, Ranjan Maitra wrote: >>>>> Hi Duncan, >>>>> I don't know if this will list all the dependencies for your >>>>> documentation, since Rick's error messages did not involve >>>>> libraries and header files already installed by him for something >>>>> else, perhaps. >>>> >>>> No, but it's a start: I'm thinking of something more like a FAQ than >>>> comprehensive documentation. Comprehensive docs are not feasible to >>>> maintain (there are so many systems that Daniel and I don't use), but >>>> hints that two non-standard packages solved one person's problems might >>>> be enough of a hint to get someone else going. >>> >>> Duncan, >>> >>> thank you for this purpose. I am such a person who could need some help >>> with installing rgl and hope it is ok to place it in this thread. >>> >>> My trial to install rgl_0.70.tar.gz on R-2.4.1 on FreeBSD 7.0-CURRENT >>> ends up with errors. Obiously something is wrong with Makevars. I have >>> no idea what to do next. 'rgl' is one of the rare cases that do not >>> install under R on FreeBSD. >>> >>> The install messages are short: >>> >>> ----- >>> #R CMD INSTALL rgl_0.70.tar.gz >>> * Installing to library '/usr/local/lib/R/library' >>> * Installing *source* package 'rgl' ... >>> checking for gcc... gcc >>> checking for C compiler default output file name... a.out >>> checking whether the C compiler works... yes >>> checking whether we are cross compiling... no >>> checking for suffix of executables... >>> checking for suffix of object files... o >>> checking whether we are using the GNU C compiler... yes >>> checking whether gcc accepts -g... yes >>> checking for gcc option to accept ANSI C... none needed >>> checking how to run the C preprocessor... gcc -E >>> checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include >>> checking for libpng-config... yes >>> configure: using libpng-config >>> configure: using libpng dynamic linkage >>> configure: creating ./config.status >>> config.status: creating src/Makevars >>> ** libs >>> "Makevars", line 9: Need an operator >>> "Makevars", line 12: Need an operator >>> "Makevars", line 15: Need an operator >>> "Makevars", line 21: Need an operator >>> "Makevars", line 23: Need an operator >>> "Makevars", line 36: Need an operator >>> "Makevars", line 38: Need an operator >>> make: fatal errors encountered -- cannot continue >>> chmod: /usr/local/lib/R/library/rgl/libs/*: No such file or directory >>> ERROR: compilation failed for package 'rgl' >>> ** Removing '/usr/local/lib/R/library/rgl' >>> ----- >>> >>> Are there any experiences with installing rgl on FreeBSD? Do you know if >>> it is at all possible to get rgl to work on FreeBSD? If I can do >>> anything like testing or giving more information let me know. >>> >>> I appreciate any help. Thank you in advance. >>> >>> Rainer Hurling