rgl build warnings and loading error on Linux

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

rgl build warnings and loading error on Linux

Liviu Andronic
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?
Liviu

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Duncan Murdoch
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.

Duncan Murdoch

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Dirk Eddelbuettel

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.

Hth, Dirk

--
Three out of two people have difficulties with fractions.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

cberry
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.
>
> ______________________________________________
> [hidden email] 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:[hidden email]            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

paul smith-6
In reply to this post by Liviu Andronic
On Sun, Mar 16, 2008 at 7:38 PM, Liviu Andronic <[hidden email]> wrote:

>  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?

What is your Linux distribution?

Paul

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Liviu Andronic
In reply to this post by Duncan Murdoch
On Sun, Mar 16, 2008 at 10:00 PM, Duncan Murdoch <[hidden email]> wrote:
>  It sounds as though it is not finding the OpenGL libs when it
>  configures.  That function should be in libGL.so.

This is what I have on my system:
localhost liviu # locate libGL.so
/usr/lib/opengl/xorg-x11/lib/libGL.so.1
/usr/lib/opengl/xorg-x11/lib/libGL.so.1.2
/usr/lib/opengl/xorg-x11/lib/libGL.so
/usr/lib/libGL.so

However, the funny thing is that "/usr/lib/libGL.so" belongs to no
package, while the other libGL.so belongs to media-libs/mesa.
localhost liviu # equery b /usr/lib/libGL.so
[ Searching for file(s) /usr/lib/libGL.so in *... ]

localhost liviu # equery b /usr/lib/opengl/xorg-x11/lib/libGL.so
[ Searching for file(s) /usr/lib/opengl/xorg-x11/lib/libGL.so in *... ]
media-libs/mesa-7.0.2 (/usr/lib/opengl/xorg-x11/lib/libGL.so -> libGL.so.1.2)

localhost liviu # eix media-libs/mesa
[I] media-libs/mesa
     Available versions:  6.5.2-r1 (~)7.0.2
     Installed versions:  7.0.2(22:55:32 26/02/08)

Do you think removing /usr/lib/libGL.so is reasonable?

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Liviu Andronic
In reply to this post by cberry
On Mon, Mar 17, 2008 at 1:54 AM, Charles C. Berry <[hidden email]> wrote:
>         emerge -pD R
>
>  to see what would get rebuilt. (This should rebuild out-of-date
>  dependencies.)

emerge -tvaD R proposes me to emerge all out-dated packages found on
my system, from gimp to dbus (currently 292,146 kB). Do you think it
is possible to simply emerge/pinpoint R's out-dated dependencies?  (I
haven't yet found how to do this.)


Thanks,
Liviu

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Duncan Murdoch
In reply to this post by Liviu Andronic
Liviu Andronic wrote:

> On Sun, Mar 16, 2008 at 10:00 PM, Duncan Murdoch <[hidden email]> wrote:
>  
>>  It sounds as though it is not finding the OpenGL libs when it
>>  configures.  That function should be in libGL.so.
>>    
>
> This is what I have on my system:
> localhost liviu # locate libGL.so
> /usr/lib/opengl/xorg-x11/lib/libGL.so.1
> /usr/lib/opengl/xorg-x11/lib/libGL.so.1.2
> /usr/lib/opengl/xorg-x11/lib/libGL.so
> /usr/lib/libGL.so
>
> However, the funny thing is that "/usr/lib/libGL.so" belongs to no
> package, while the other libGL.so belongs to media-libs/mesa.
> localhost liviu # equery b /usr/lib/libGL.so
> [ Searching for file(s) /usr/lib/libGL.so in *... ]
>
> localhost liviu # equery b /usr/lib/opengl/xorg-x11/lib/libGL.so
> [ Searching for file(s) /usr/lib/opengl/xorg-x11/lib/libGL.so in *... ]
> media-libs/mesa-7.0.2 (/usr/lib/opengl/xorg-x11/lib/libGL.so -> libGL.so.1.2)
>
> localhost liviu # eix media-libs/mesa
> [I] media-libs/mesa
>      Available versions:  6.5.2-r1 (~)7.0.2
>      Installed versions:  7.0.2(22:55:32 26/02/08)
>
> Do you think removing /usr/lib/libGL.so is reasonable?
>  

You'd need to ask a Gentoo expert that.  I have very little experience
with Linux, and none with Gentoo.

But if you can determine which one of those rgl attempts to load, it
would make sense to temporarily disable that one just to see if it helps.

Duncan Murdoch

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

cberry
In reply to this post by Liviu Andronic
On Mon, 17 Mar 2008, Liviu Andronic wrote:

> On Mon, Mar 17, 2008 at 1:54 AM, Charles C. Berry <[hidden email]> wrote:
>>         emerge -pD R
>>
>>  to see what would get rebuilt. (This should rebuild out-of-date
>>  dependencies.)
>
> emerge -tvaD R proposes me to emerge all out-dated packages found on
> my system, from gimp to dbus (currently 292,146 kB). Do you think it
> is possible to simply emerge/pinpoint R's out-dated dependencies?  (I
> haven't yet found how to do this.)

Are you sure?! Perhaps you slipped in a '-N' without noticing?

On my Gentoo system, 'emerge -tvaD R' gives only the dependencies of R
even though there are other things needing to be rebuilt.

In any case, emerge -tvaD R should show you what dependencies of R will be
rebuilt.

But if it doesn't, dig into 'equery depgraph R'.

HTH,

Chuck

p.s. you really should 'emerge system' and 'emerge world' fairly often to
keep your system up to date. See

  http://gentoo-wiki.com/HOWTO_Maintain_Gentoo_-_%22Best_Practices%22


> > > Thanks,
> Liviu
>
> ______________________________________________
> [hidden email] 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:[hidden email]            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Liviu Andronic
In reply to this post by Liviu Andronic
On Mon, Mar 17, 2008 at 11:07 PM, Liviu Andronic <[hidden email]> wrote:
>  This is what I have on my system:
>  localhost liviu # locate libGL.so
>  /usr/lib/opengl/xorg-x11/lib/libGL.so.1
>  /usr/lib/opengl/xorg-x11/lib/libGL.so.1.2
>  /usr/lib/opengl/xorg-x11/lib/libGL.so
>  /usr/lib/libGL.so
>
>  However, the funny thing is that "/usr/lib/libGL.so" belongs to no
>  package, while the other libGL.so belongs to media-libs/mesa.

I moved "/usr/lib/libGL.so" to "/usr/lib/libGL.so.bak" (it seemed like
a broken soft link) and recreated a "/usr/lib/libGL.so" that linked to
"/usr/lib/opengl/xorg-x11/lib/libGL.so.1.2".
liviu@localhost ~ $ ls -l /usr/lib/libGL.so
lrwxrwxrwx 1 root root 32 2008-03-18 12:16 /usr/lib/libGL.so ->
opengl/xorg-x11/lib/libGL.so.1.2

However, the problem was not solved. A rebuilt rgl generates the same
error on library load:
> dyn.load("/usr/lib/R/library/rgl/libs/rgl.so")
Error in dyn.load("/usr/lib/R/library/rgl/libs/rgl.so") :
  unable to load shared library '/usr/lib/R/library/rgl/libs/rgl.so':
  /usr/lib/R/library/rgl/libs/rgl.so: undefined symbol: glTexCoordPointer

Is there anything else that I could try?

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

cberry
On Tue, 18 Mar 2008, Liviu Andronic wrote:

> On Mon, Mar 17, 2008 at 11:07 PM, Liviu Andronic <[hidden email]> wrote:
>>  This is what I have on my system:
>>  localhost liviu # locate libGL.so
>>  /usr/lib/opengl/xorg-x11/lib/libGL.so.1
>>  /usr/lib/opengl/xorg-x11/lib/libGL.so.1.2
>>  /usr/lib/opengl/xorg-x11/lib/libGL.so
>>  /usr/lib/libGL.so
>>
>>  However, the funny thing is that "/usr/lib/libGL.so" belongs to no
>>  package, while the other libGL.so belongs to media-libs/mesa.
>
> I moved "/usr/lib/libGL.so" to "/usr/lib/libGL.so.bak" (it seemed like
> a broken soft link) and recreated a "/usr/lib/libGL.so" that linked to
> "/usr/lib/opengl/xorg-x11/lib/libGL.so.1.2".
> liviu@localhost ~ $ ls -l /usr/lib/libGL.so
> lrwxrwxrwx 1 root root 32 2008-03-18 12:16 /usr/lib/libGL.so ->
> opengl/xorg-x11/lib/libGL.so.1.2
>
> However, the problem was not solved. A rebuilt rgl generates the same
> error on library load:
>> dyn.load("/usr/lib/R/library/rgl/libs/rgl.so")
> Error in dyn.load("/usr/lib/R/library/rgl/libs/rgl.so") :
>  unable to load shared library '/usr/lib/R/library/rgl/libs/rgl.so':
>  /usr/lib/R/library/rgl/libs/rgl.so: undefined symbol: glTexCoordPointer
>
> Is there anything else that I could try?

Below substitute 'nvidia-drivers' or whatever you use for
<your-video-drivers>

  emerge -D mesa <your-video-drivers>
  revdep-rebuild -X
  R
  install.packages("rgl")

>
> ______________________________________________
> [hidden email] 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:[hidden email]            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Liviu Andronic
Dear R users,

This is a follow-up of a recent discussion on building rgl on Gentoo
Linux. Please read bellow.

On Tue, Mar 18, 2008 at 7:24 PM, Charles C. Berry <[hidden email]> wrote:
>  Below substitute 'nvidia-drivers' or whatever you use for
> <your-video-drivers>
>
>         emerge -D mesa <your-video-drivers>
>         revdep-rebuild -X
>         R
>         install.packages("rgl")
>

I have entirely updated my system using "emerge -tva -DNu world", also
meaning that I switched to R version 2.6.2. I have rebuilt all
packages broken by this update using "revdep-rebuild -i -tva -X". Just
to make sure, afterwards I have also "emerge -tva mesa
xf86-video-i810". My mesa USE flags look like this:
localhost liviu # eix mesa
media-libs/mesa
     Installed versions:  7.0.2(15:23:17 09/04/08)(video_cards_i810
-debug -doc -kernel_FreeBSD -motif -nptl -pic [..])

Building and loading rgl has only switched the error message:
> dyn.load("/usr/lib/R/library/rgl/libs/rgl.so")
Error in dyn.load("/usr/lib/R/library/rgl/libs/rgl.so") :
  unable to load shared library '/usr/lib/R/library/rgl/libs/rgl.so':
  /usr/lib/R/library/rgl/libs/rgl.so: undefined symbol: glNormal3f

Previously it was: "undefined symbol: glTexCoordPointer".

Does this look like an rgl or a Gentoo Linux issue? Would any of the
disabled mesa USE flags be worth enabling?

Thank you in advance,
Liviu

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Duncan Murdoch
On 4/9/2008 10:53 AM, Liviu Andronic wrote:

> Dear R users,
>
> This is a follow-up of a recent discussion on building rgl on Gentoo
> Linux. Please read bellow.
>
> On Tue, Mar 18, 2008 at 7:24 PM, Charles C. Berry <[hidden email]> wrote:
>>  Below substitute 'nvidia-drivers' or whatever you use for
>> <your-video-drivers>
>>
>>         emerge -D mesa <your-video-drivers>
>>         revdep-rebuild -X
>>         R
>>         install.packages("rgl")
>>
>
> I have entirely updated my system using "emerge -tva -DNu world", also
> meaning that I switched to R version 2.6.2. I have rebuilt all
> packages broken by this update using "revdep-rebuild -i -tva -X". Just
> to make sure, afterwards I have also "emerge -tva mesa
> xf86-video-i810". My mesa USE flags look like this:
> localhost liviu # eix mesa
> media-libs/mesa
>      Installed versions:  7.0.2(15:23:17 09/04/08)(video_cards_i810
> -debug -doc -kernel_FreeBSD -motif -nptl -pic [..])
>
> Building and loading rgl has only switched the error message:
>> dyn.load("/usr/lib/R/library/rgl/libs/rgl.so")
> Error in dyn.load("/usr/lib/R/library/rgl/libs/rgl.so") :
>   unable to load shared library '/usr/lib/R/library/rgl/libs/rgl.so':
>   /usr/lib/R/library/rgl/libs/rgl.so: undefined symbol: glNormal3f
>
> Previously it was: "undefined symbol: glTexCoordPointer".
>
> Does this look like an rgl or a Gentoo Linux issue? Would any of the
> disabled mesa USE flags be worth enabling?

glNormal3f and glTexCoordPointer are both OpenGL entry points used by
rgl, so the messages are indicating a linking problem.  But I don't know
enough about Linux to recognize whether that's because of something
wrong with Gentoo or what you did, or something wrong with the rgl
configure script.

Duncan Murdoch

>
> Thank you in advance,
> Liviu

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Prof Brian Ripley
We'll need to see the output from install.packages("rgl") to have much
idea:

R CMD ldd /usr/lib/R/library/rgl/libs/rgl.so

would also be informative.

On Wed, 9 Apr 2008, Duncan Murdoch wrote:

> On 4/9/2008 10:53 AM, Liviu Andronic wrote:
>> Dear R users,
>>
>> This is a follow-up of a recent discussion on building rgl on Gentoo
>> Linux. Please read bellow.
>>
>> On Tue, Mar 18, 2008 at 7:24 PM, Charles C. Berry <[hidden email]> wrote:
>>>  Below substitute 'nvidia-drivers' or whatever you use for
>>> <your-video-drivers>
>>>
>>>         emerge -D mesa <your-video-drivers>
>>>         revdep-rebuild -X
>>>         R
>>>         install.packages("rgl")
>>>
>>
>> I have entirely updated my system using "emerge -tva -DNu world", also
>> meaning that I switched to R version 2.6.2. I have rebuilt all
>> packages broken by this update using "revdep-rebuild -i -tva -X". Just
>> to make sure, afterwards I have also "emerge -tva mesa
>> xf86-video-i810". My mesa USE flags look like this:
>> localhost liviu # eix mesa
>> media-libs/mesa
>>      Installed versions:  7.0.2(15:23:17 09/04/08)(video_cards_i810
>> -debug -doc -kernel_FreeBSD -motif -nptl -pic [..])
>>
>> Building and loading rgl has only switched the error message:
>>> dyn.load("/usr/lib/R/library/rgl/libs/rgl.so")
>> Error in dyn.load("/usr/lib/R/library/rgl/libs/rgl.so") :
>>   unable to load shared library '/usr/lib/R/library/rgl/libs/rgl.so':
>>   /usr/lib/R/library/rgl/libs/rgl.so: undefined symbol: glNormal3f
>>
>> Previously it was: "undefined symbol: glTexCoordPointer".
>>
>> Does this look like an rgl or a Gentoo Linux issue? Would any of the
>> disabled mesa USE flags be worth enabling?
>
> glNormal3f and glTexCoordPointer are both OpenGL entry points used by
> rgl, so the messages are indicating a linking problem.  But I don't know
> enough about Linux to recognize whether that's because of something
> wrong with Gentoo or what you did, or something wrong with the rgl
> configure script.
>
> Duncan Murdoch
>
>>
>> Thank you in advance,
>> Liviu
>
> ______________________________________________
> [hidden email] 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,                  [hidden email]
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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Liviu Andronic
Dear Duncan and Brian,
thank you for the quick replies. Please see bellow.

On Wed, Apr 9, 2008 at 6:11 PM, Prof Brian Ripley <[hidden email]> wrote:
> We'll need to see the output from install.packages("rgl") to have much idea:
>

localhost liviu # R CMD INSTALL "/home/liviu/inst/dwn_R/rgl_0.77.tar.gz"
[ http://www.geocities.com/landroni/rgl_build.txt ]

>  R CMD ldd /usr/lib/R/library/rgl/libs/rgl.so
>

localhost liviu # R CMD ldd /usr/lib/R/library/rgl/libs/rgl.so
        linux-gate.so.1 =>  (0xffffe000)
        libR.so => /usr/lib/R/lib/libR.so (0xb7c9a000)
        libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6
(0xb7b92000)
        libm.so.6 => /lib/libm.so.6 (0xb7b6c000)
        libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.so.1
(0xb7b60000)
        libc.so.6 => /lib/libc.so.6 (0xb7a2f000)
        libblas.so.0 => /usr/lib/libblas.so.0 (0xb79dd000)
        libgfortran.so.1 =>
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libgfortran.so.1 (0xb7962000)
        libreadline.so.5 => /lib/libreadline.so.5 (0xb7930000)
        libpcre.so.0 => /usr/lib/libpcre.so.0 (0xb7909000)
        libbz2.so.1 => /lib/libbz2.so.1 (0xb78f9000)
        libz.so.1 => /lib/libz.so.1 (0xb78e6000)
        libdl.so.2 => /lib/libdl.so.2 (0xb78e2000)
        /lib/ld-linux.so.2 (0x80000000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb789e000)

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

cberry
In reply to this post by Liviu Andronic
On Wed, 9 Apr 2008, Liviu Andronic wrote:

> Dear R users,
>
> This is a follow-up of a recent discussion on building rgl on Gentoo
> Linux. Please read bellow.
>
> On Tue, Mar 18, 2008 at 7:24 PM, Charles C. Berry <[hidden email]> wrote:
>>  Below substitute 'nvidia-drivers' or whatever you use for
>> <your-video-drivers>
>>
>>         emerge -D mesa <your-video-drivers>
>>         revdep-rebuild -X
>>         R
>>         install.packages("rgl")
>>
>
> I have entirely updated my system using "emerge -tva -DNu world", also
> meaning that I switched to R version 2.6.2. I have rebuilt all
> packages broken by this update using "revdep-rebuild -i -tva -X". Just
> to make sure, afterwards I have also "emerge -tva mesa
> xf86-video-i810". My mesa USE flags look like this:
> localhost liviu # eix mesa
> media-libs/mesa
>     Installed versions:  7.0.2(15:23:17 09/04/08)(video_cards_i810
> -debug -doc -kernel_FreeBSD -motif -nptl -pic [..])
>
> Building and loading rgl has only switched the error message:
>> dyn.load("/usr/lib/R/library/rgl/libs/rgl.so")
> Error in dyn.load("/usr/lib/R/library/rgl/libs/rgl.so") :
>  unable to load shared library '/usr/lib/R/library/rgl/libs/rgl.so':
>  /usr/lib/R/library/rgl/libs/rgl.so: undefined symbol: glNormal3f
>
> Previously it was: "undefined symbol: glTexCoordPointer".
>
> Does this look like an rgl or a Gentoo Linux issue? Would any of the
> disabled mesa USE flags be worth enabling?

A couple of guesses here.

---

Does 'glxgears' work or give you a similar error message??

Obviously, if it breaks, your system is the issue.

---

You can get some sense of what is going on by setting

  export LD_DEBUG_OUTPUT=tmp.debug
  export LD_DEBUG=all

running something - like glxgears or R (invoking library(rgl))

then

  grep glNormal3f tmp.debug.*

For one of my gentoo systems running an ati video card, I get this after
glxgears

cberry@coyote ~ $ grep glNormal3f tmp.debug.*
       6846:     symbol=glNormal3f;  lookup in file=glxgears [0]
       6846:     symbol=glNormal3f;  lookup in file=/usr/lib/libglut.so.3 [0]
       6846:     symbol=glNormal3f;  lookup in file=/usr/lib/libGLU.so.1 [0]
       6846:     symbol=glNormal3f;  lookup in file=//usr/lib64/opengl/ati/lib/libGL.so.1 [0]
       6864:      binding file glxgears [0] to
//usr/lib64/opengl/ati/lib/libGL.so.1 [0]:
normal symbol `glNormal3f'


and after R <return> library(rgl) I get many more lines, but again
ending with this long (wrapped) line"

  6857:  binding file /home/cberry/lib.loc/rgl/libs/rgl.so [0] to
  //usr/lib64/opengl/ati/lib/libGL.so.1 [0]: normal symbol `glNormal3f'


Maybe this helps:

http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-libraries.html

---

Have you tried opengl-update?


HTH,

Chuck


>
> Thank you in advance,
> Liviu
>
> ______________________________________________
> [hidden email] 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:[hidden email]            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Prof Brian Ripley
In reply to this post by Liviu Andronic
Right, that shows that the rgl configure script is not being run and no
linking is being done to any GL libraries.

I've never seen that.  Is there something unusual about the filesystem so
it does not recognize rgl/configure is executable?  (We've seen that on
SMB filesystems with the wrong mount options.)

What I suggest you try is

- unpack the rgl tarball.
- cd rgl
- R CMD ./configure
- cd ..
- R CMD INSTALL rgl

Hopefully that will either configure or explain why it is not being run.


On Wed, 9 Apr 2008, Liviu Andronic wrote:

> Dear Duncan and Brian,
> thank you for the quick replies. Please see bellow.
>
> On Wed, Apr 9, 2008 at 6:11 PM, Prof Brian Ripley <[hidden email]> wrote:
>> We'll need to see the output from install.packages("rgl") to have much idea:
>>
>
> localhost liviu # R CMD INSTALL "/home/liviu/inst/dwn_R/rgl_0.77.tar.gz"
> [ http://www.geocities.com/landroni/rgl_build.txt ]
>
>>  R CMD ldd /usr/lib/R/library/rgl/libs/rgl.so
>>
>
> localhost liviu # R CMD ldd /usr/lib/R/library/rgl/libs/rgl.so
> linux-gate.so.1 =>  (0xffffe000)
> libR.so => /usr/lib/R/lib/libR.so (0xb7c9a000)
> libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6
> (0xb7b92000)
> libm.so.6 => /lib/libm.so.6 (0xb7b6c000)
> libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.so.1
> (0xb7b60000)
> libc.so.6 => /lib/libc.so.6 (0xb7a2f000)
> libblas.so.0 => /usr/lib/libblas.so.0 (0xb79dd000)
> libgfortran.so.1 =>
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libgfortran.so.1 (0xb7962000)
> libreadline.so.5 => /lib/libreadline.so.5 (0xb7930000)
> libpcre.so.0 => /usr/lib/libpcre.so.0 (0xb7909000)
> libbz2.so.1 => /lib/libbz2.so.1 (0xb78f9000)
> libz.so.1 => /lib/libz.so.1 (0xb78e6000)
> libdl.so.2 => /lib/libdl.so.2 (0xb78e2000)
> /lib/ld-linux.so.2 (0x80000000)
> libncurses.so.5 => /lib/libncurses.so.5 (0xb789e000)
>

--
Brian D. Ripley,                  [hidden email]
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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Liviu Andronic
On Wed, Apr 9, 2008 at 9:30 PM, Prof Brian Ripley <[hidden email]> wrote:
>  I've never seen that.  Is there something unusual about the filesystem so
> it does not recognize rgl/configure is executable?  (We've seen that on SMB
> filesystems with the wrong mount options.)
>

In /etc/fstab, I have the following.
tmpfs           /tmp            tmpfs
defaults,size=100M,mode=1777,noexec,nosuid 0 0

Mounting /tmp with "noexec" is a security measure, since /tmp may
easily become a vulnerable spot on a Linux system.

>  What I suggest you try is
>
>  - unpack the rgl tarball.
>  - cd rgl
>  - R CMD ./configure
>  - cd ..
>  - R CMD INSTALL rgl
>

Running "R CMD INSTALL rgl" from my reiserfs / partition was enough
for the ./configure script to get executed and for rgl to build
properly [1]. Now I can dyn.load() rgl with no error messages,
although it is somewhat crashy. I will report here if I get any
meaningful error messages.

Thanks goes to all who contributed with their suggestions.
Best regards,
Liviu


[1] http://www.geocities.com/landroni/rgl_build_02.txt

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: rgl build warnings and loading error on Linux

Prof Brian Ripley
>From the 'R Installation and Administration Manual':

   Note that @env{TMPDIR} will be used to execute @command{configure}
   scripts when installing packages, so if @code{/tmp} has been mounted as
   @samp{noexec}, @env{TMPDIR} needs to be set to a directory from which
   execution is allowed.

'If all else fails, read the manual'.

On Thu, 10 Apr 2008, Liviu Andronic wrote:

> On Wed, Apr 9, 2008 at 9:30 PM, Prof Brian Ripley <[hidden email]> wrote:
>>  I've never seen that.  Is there something unusual about the filesystem so
>> it does not recognize rgl/configure is executable?  (We've seen that on SMB
>> filesystems with the wrong mount options.)
>>
>
> In /etc/fstab, I have the following.
> tmpfs           /tmp            tmpfs
> defaults,size=100M,mode=1777,noexec,nosuid 0 0
>
> Mounting /tmp with "noexec" is a security measure, since /tmp may
> easily become a vulnerable spot on a Linux system.

I suggest you talk to an expert about that.

>>  What I suggest you try is
>>
>>  - unpack the rgl tarball.
>>  - cd rgl
>>  - R CMD ./configure
>>  - cd ..
>>  - R CMD INSTALL rgl
>>
>
> Running "R CMD INSTALL rgl" from my reiserfs / partition was enough
> for the ./configure script to get executed and for rgl to build
> properly [1]. Now I can dyn.load() rgl with no error messages,
> although it is somewhat crashy. I will report here if I get any
> meaningful error messages.
>
> Thanks goes to all who contributed with their suggestions.
> Best regards,
> Liviu
>
>
> [1] http://www.geocities.com/landroni/rgl_build_02.txt
>

--
Brian D. Ripley,                  [hidden email]
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

______________________________________________
[hidden email] 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.