[R] rgl build warnings and loading error on Linux
Charles C. Berry
cberry at tajo.ucsd.edu
Mon Mar 17 01:54:44 CET 2008
On Sun, 16 Mar 2008, Dirk Eddelbuettel wrote:
>
> On 16 March 2008 at 17:00, Duncan Murdoch wrote:
> | On 16/03/2008 3:38 PM, Liviu Andronic wrote:
> | > Dear useRs,
> | >
> | > I have several problems in using rgl-0.77 (and recent earlier
> | > versions) on Gentoo Linux with a custom-built v. 2.6.22 kernel.
> | > Currently I use R-2.6.1.
> | >
> | > When I build rgl,
> | > # R CMD INSTALL "/home/liviu/inst/dwn/R/rgl_0.77.tar.gz"
> | > or
> | > install.packages("rgl", dependencies=TRUE, method ="wget"),
> | >
> | > I notice the following warning messages:
> | > i686-pc-linux-gnu-g++ -I/usr/lib/R/include -I/usr/lib/R/include
> | > -I/usr/local/include -fpic -O2 -march=pentium-m -pipe
> | > -fomit-frame-pointer -std=gnu99 -c api.cpp -o api.o
> | > cc1plus: warning: command line option "-std=gnu99" is valid for C/ObjC
> | > but not for C++
> | >
> | > The warning message itself is repeated during the entire build
> | > process. However, the package builds fine, but fails to load:
> | >> library(rgl)
> | > Error in dyn.load(file, ...) :
> | > unable to load shared library '/usr/lib/R/library/rgl/libs/rgl.so':
> | > /usr/lib/R/library/rgl/libs/rgl.so: undefined symbol: glTexCoordPointer
> | > Error : .onLoad failed in 'loadNamespace' for 'rgl'
> | > Error: package/namespace load failed for 'rgl'
> | >
> | > I had the exact same error message with rgl_0.76.
> | >
> | > Could anyone suggest how to make rgl build correctly?
> |
> | It sounds as though it is not finding the OpenGL libs when it
> | configures. That function should be in libGL.so.
>
> For what it is worth, the Debian r-cran-rgl packages uses these Build-Depends
> which may or may not map into similar Gentoo packages:
>
> Build-Depends: debhelper (>= 5.0.0), r-base-dev (>= 2.6.2), cdbs, \
> libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, \
> libpng12-dev, libx11-dev, libxt-dev, x-dev
>
> So try looking for libgl and libglu, possibly in their mesa implementations.
install.packages("rgl") and dyn.load("PATH.TO.rgl.so/rgl.so") work on my
Gentoo box. (I can't run library(rgl) from home without X so I cannot say
what else works.)
Along the lines of Dirk's suggestions, recent R-ebuilds use
CDEPEND="dev-lang/perl
>=dev-libs/libpcre-7.3
app-arch/bzip2
virtual/blas
virtual/ghostscript
readline? ( sys-libs/readline )
jpeg? ( media-libs/jpeg )
png? ( media-libs/libpng )
lapack? ( virtual/lapack )
tk? ( dev-lang/tk )
X? ( x11-libs/libXmu x11-misc/xdg-utils )"
and of course all of THEIR dependencies.
But I'd just try
emerge -pD R
to see what would get rebuilt. (This should rebuild out-of-date
dependencies.)
If you installed R using emerge and anything besides R would get rebuilt,
then run 'emerge -D R'.
If you followed the R Installation and Admin guide to install R (as I do
as I hate waiting months for the latest release to be deemed stable enough
to be unmasked), then emerge everything listed by 'emerge -pD R' up to R
itself, reinstall R, and try again.
FWIW,
equery depgraph R | less
will allow you to check all the R dependencies, but there are over
1000, so this is probably a bit much.
HTH,
Chuck
>
> Hth, Dirk
>
> --
> Three out of two people have difficulties with fractions.
>
> ______________________________________________
> R-help at r-project.org 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.
>
Charles C. Berry (858) 534-2098
Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
More information about the R-help
mailing list