Hi! I'm new to R, but have worked with Splus before. I installed several packages in R (R-1.9.1) without problems, but when I try to install rgl (rgl_0.64-13.tar.gz). I get the following, and the package does not install. Any help would be greatly appreciated. I'm running R in redhat 9. Thanks, Enrique ------- [my pc]# R CMD INSTALL rgl_0.64-13.tar.gz * Installing *source* package 'rgl' ... checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu 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... no checking libpng in /usr/local... not found checking libpng in /usr... found configure: creating ./config.status config.status: creating src/Makevars ** libs g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c x11lib.cpp -o x11lib.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c x11gui.cpp -o x11gui.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c types.cpp -o types.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c math.cpp -o math.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c fps.cpp -o fps.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c pixmap.cpp -o pixmap.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c gui.cpp -o gui.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c api.cpp -o api.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c device.cpp -o device.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c devicemanager.cpp -o devicemanager.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c rglview.cpp -o rglview.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c scene.cpp -o scene.o g++ -I/usr/lib/R/include -I/usr/X11R6/include -DHAVE_PNG_H -I/usr/include -I/usr /local/include -Wall -pedantic -fno-exceptions -fno-rtti -fPIC -O2 -g -march=i 386 -mcpu=i686 -c glgui.cpp -o glgui.o g++ -L/usr/local/lib -o rgl.so x11lib.o x11gui.o types.o math.o fps.o pixmap.o gui.o api.o device.o devicemanager.o rglview.o scene.o glgui.o -L/usr/X11R6/lib -L/usr/lib -lstdc++ -lX11 -lXext -lGL -lGLU -lpng /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18): In functio n `_start': ../sysdeps/i386/elf/start.S:77: undefined reference to `main' x11lib.o(.text+0x84): In function `set_R_handler': /tmp/R.INSTALL.8663/rgl/src/x11gui.h:33: undefined reference to `R_InputHandlers ' x11lib.o(.text+0x92):/tmp/R.INSTALL.8663/rgl/src/x11gui.h:33: undefined referenc e to `addInputHandler' x11lib.o(.text+0xfb): In function `unset_R_handler': /tmp/R.INSTALL.8663/rgl/src/x11lib.cpp:52: undefined reference to `R_InputHandle rs' x11lib.o(.text+0x103):/tmp/R.INSTALL.8663/rgl/src/x11lib.cpp:52: undefined refer ence to `removeInputHandler' collect2: ld returned 1 exit status make: *** [rgl.so] Error 1 ERROR: compilation failed for package 'rgl' ** Removing '/usr/lib/R/library/rgl' [my pc]
On Fri, 25 Jun 2004 17:36:30 +0000, "E GCP" <egcp at hotmail.com> wrote :>Hi! > >I'm new to R, but have worked with Splus before. I installed several >packages in R (R-1.9.1) without problems, but when I try to install rgl >(rgl_0.64-13.tar.gz). I get the following, and the package does not install. >Any help would be greatly appreciated. I'm running R in redhat 9.The missing reference R_InputHandlers is declared in the $RHOME/src/include/R_ext/eventloop.h file, and I believe is compiled into the library R_X11 (with some extension). You don't seem to have that in the list of libraries:>g++ -L/usr/local/lib -o rgl.so x11lib.o x11gui.o types.o math.o fps.o >pixmap.o >gui.o api.o device.o devicemanager.o rglview.o scene.o glgui.o >-L/usr/X11R6/lib >-L/usr/lib -lstdc++ -lX11 -lXext -lGL -lGLU -lpng >/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18): In >functio >n `_start': >../sysdeps/i386/elf/start.S:77: undefined reference to `main' >x11lib.o(.text+0x84): In function `set_R_handler': >/tmp/R.INSTALL.8663/rgl/src/x11gui.h:33: undefined reference to >`R_InputHandlersI don't know what you'll need to do to fix this, since I'm using Windows, so none of this stuff happens there, and I could be completely wrong about it. Duncan Murdoch
Thanks for your quick replies, and excuse my naivete, but how do I fix the problem, so the rgl package installs? Thanks again, Enrique >From: Prof Brian Ripley <ripley at stats.ox.ac.uk> >Subject: Re: [R] rgl installation problems >Date: Fri, 25 Jun 2004 20:14:24 +0100 (BST) > >Here's what should happen on RH9 (with the latest libpng and gcc in >/usr/local/lib) > >g++ -shared -L/usr/local/lib -o rgl.so x11lib.o x11gui.o types.o math.o >fps.o pixmap.o gui.o api.o device.o devicemanager.o rglview.o scene.o >glgui.o -L/usr/X11R6/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib >-lpng12 -lz -lm -lstdc++ -lX11 -lXext -lGL -lGLU -lpng12 -lz -lm > >Note that he had no --shared but did have crt1.o, that is was trying to >build a standalone executable and not a shared object. > >Something is wrong with the R installation's rules to make shared >libraries. > >On Fri, 25 Jun 2004, Duncan Murdoch wrote: > > > On Fri, 25 Jun 2004 17:36:30 +0000, "E GCP" <egcp at hotmail.com> wrote : > > > > >Hi! > > > > > >I'm new to R, but have worked with Splus before. I installed several > > >packages in R (R-1.9.1) without problems, but when I try to install rgl > > >(rgl_0.64-13.tar.gz). I get the following, and the package does not install. > > >Any help would be greatly appreciated. I'm running R in redhat 9. > > > > The missing reference R_InputHandlers is declared in the > > $RHOME/src/include/R_ext/eventloop.h file, and I believe is compiled > > into the library R_X11 (with some extension). You don't seem to have > > that in the list of libraries: > > > > >g++ -L/usr/local/lib -o rgl.so x11lib.o x11gui.o types.o math.o fps.o > > >pixmap.o > > >gui.o api.o device.o devicemanager.o rglview.o scene.o glgui.o > > >-L/usr/X11R6/lib > > >-L/usr/lib -lstdc++ -lX11 -lXext -lGL -lGLU -lpng > > >/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18): In > > >functio > > >n `_start': > > >../sysdeps/i386/elf/start.S:77: undefined reference to `main' > > >x11lib.o(.text+0x84): In function `set_R_handler': > > >/tmp/R.INSTALL.8663/rgl/src/x11gui.h:33: undefined reference to > > >`R_InputHandlers > > > > I don't know what you'll need to do to fix this, since I'm using > > Windows, so none of this stuff happens there, and I could be > > completely wrong about it. >
Thanks for your replies. I do not HTML-ize my mail, but free email accounts do that and there is not a switch to turn it off. I apologize in advance. I installed R from the redhat package provided by Martyn Plummer. It installed fine and without problems. I can use R and have installed and used other packages within R without any problems whatsoever. I do not think the problem is with R or its installation. I do think there is a problem with the installation of rgl_0.64-13.tar.gz on RedHat 9 (linux). So, if there is anybody out there who has installed succesfully rgl_0.64-13.tar.gz on RedHat 9, I would like to know how. Thanks so much, Enrique>From: Peter Dalgaard <p.dalgaard at biostat.ku.dk> >To: Prof Brian Ripley <ripley at stats.ox.ac.uk> >CC: E GCP <egcp at hotmail.com>, r-help at stat.math.ethz.ch >Subject: Re: [R] rgl installation problems >Date: 28 Jun 2004 20:05:34 +0200 > >Prof Brian Ripley <ripley at stats.ox.ac.uk> writes: > >>On Mon, 28 Jun 2004, E GCP wrote: >> >>>Thanks for your quick replies, and excuse my naivete, but how do I fix >>>the >>>problem, so the rgl package installs? >> >>We have no idea what is wrong on your system -- all we can tell is that >>you have done something wrong but we were not sitting at your shoulder >>when you did. Perhaps you should try re-building R from scratch, paying >>close attention to any messages? >> >>Meanwhile, try to follow the posting guide and not HTML-ize your mail. > >Another thing to try is to install Martyn's RPM (for FC1) instead of >what is there now. Seems to get things right for me on RH8. > >The demo is amazingly smooth even on this ancient machine, BTW.
Thanks. Adding the -shared to the Makeconf file fixed the problem. I installed R from R-1.9.1-0.fdr.2.rh90.i386.rpm , but for some reason the flag to share libraries was never set in SHLIB_CXXLDFLAGS. rgl_0.64-13.tar.gz now installed without problems. Thanks again, Enrique>On Wed, 2004-06-30 at 00:52, E GCP wrote: > > Thanks for your replies. I do not HTML-ize my mail, but free email >accounts > do that and there is not a switch to turn it off. I apologize >in advance. > > > I installed R from the redhat package provided by Martyn Plummer. It > >installed fine and without problems. I can use R and have installed and >used > other packages within R without any problems whatsoever. I do not >think the > problem is with R or its installation. I do think there is a >problem with > the installation of rgl_0.64-13.tar.gz on RedHat 9 (linux). >So, if there is > anybody out there who has installed succesfully >rgl_0.64-13.tar.gz on RedHat > 9, I would like to know how. > >This is a little strange. I'm now building RPMS for older Red Hat >versions on FC2 using a tool called Mach. There is a possibility that >there is some configuration problem, but I can't see it. As Brian has >pointed out, you are missing the crucial "-shared" flag when building >the shared library for rgl. This comes from the line > >SHLIB_CXXLDFLAGS = -shared > >in the file /usr/lib/R/etc/Makeconf. This is present in my latest RPM >for Red Hat ( R-1.9.1-0.fdr.2.rh90.i386.rpm ) so I don't know why it >isn't working for you. > >Check that you do have the latest RPM and that you don't have a locally >built version of R in /usr/local since this will have precedence on your >PATH.