[GRASS-user] Compiling NVIZ / OpenGL with nVidia drivers

Hi,

Perhaps more a general Linux question than a specific grass one, but does anyone know how to compile GRASS with OpenGL and NVIZ support?

I am running Ubuntu 9.04 with the proprietary nVidia drivers for my graphics card. Whenever I try to install OpenGL it breaks my nVidia settings. NVIZ works fine when I download the binary in a pre-compiled version of grass.

So far, I can only get grass to compile with --without-opengl.

Thanks

John

--
Dr John Stevenson
Postdoctoral Research Associate
School of Earth, Atmospheric and Environmental Sciences
Williamson Building
University of Manchester
Manchester M13 9PL
UK
tel. +44(0)161 306 9360; fax. +44(0)161 306 9361;
john.stevenson@manchester.ac.uk

John Stevenson wrote:

Perhaps more a general Linux question than a specific grass one, but
does anyone know how to compile GRASS with OpenGL and NVIZ support?

I am running Ubuntu 9.04 with the proprietary nVidia drivers for my
graphics card. Whenever I try to install OpenGL it breaks my nVidia
settings. NVIZ works fine when I download the binary in a
pre-compiled version of grass.

It's more of an Ubuntu question than a general Linux question.

To compile source code which uses OpenGL, You need the headers and and
an unversioned library symlink (i.e. libGL.so).

These are often provided in a separate "development" package, as you
don't need them to run the program, only to compile it.

If there are separate OpenGL packages for nVidia and X.org, there may
be separate development packages, or there may be a single package for
use with either version.

The worst case is if the headers are only available as part of a
package which includes the X.org (or Mesa) OpenGL libraries. In which
case, you'll need to sort out the mess manually.

--
Glynn Clements <glynn@gclements.plus.com>

John:

> does anyone know how to compile GRASS with OpenGL and NVIZ support?
>
> I am running Ubuntu 9.04 with the proprietary nVidia drivers

Glynn wrote:

It's more of an Ubuntu question than a general Linux question.

To compile source code which uses OpenGL, You need the
headers and and an unversioned library symlink (i.e. libGL.so).

These are often provided in a separate "development" package, as you
don't need them to run the program, only to compile it.

have a look at the "build-depends" lines here:
http://svn.debian.org/viewsvn/pkg-grass/packages/grass/trunk/debian/control

that is what goes into building the debian/ubuntu package.

you can find the ./configure line in here:
http://svn.debian.org/viewsvn/pkg-grass/packages/grass/trunk/debian/rules

If there are separate OpenGL packages for nVidia and X.org,
there may be separate development packages, or there may be a single
package for use with either version.

those probably exist, but I've got no idea about them. (libglu1-*)

Hamish

Hamish wrote:

Glynn wrote:
  

If there are separate OpenGL packages for nVidia and X.org,
there may be separate development packages, or there may be a single
package for use with either version.
    
those probably exist, but I've got no idea about them. (libglu1-*)
  

Thanks for that. I got it working by installing just the development packages for

mesa-common-dev
libglu1-mesa-dev

and providing the includes directory to configure: --with-opengl-includes=/usr/include/GL/

Previously, installing the mesa binaries had broken my nvidia driver, so this time I left them out.

Cheers

John

--

Dr John Stevenson
Postdoctoral Research Associate
School of Earth, Atmospheric and Environmental Sciences
Williamson Building (Room 2.42)
University of Manchester
Manchester M13 9PL, UK
tel. +44(0)161 306 6585; fax. +44(0)161 306 9361;
john.stevenson@manchester.ac.uk

John A Stevenson wrote:

and providing the includes directory to configure:
--with-opengl-includes=/usr/include/GL/

This isn't necessary. The "GL/" prefix is part of the header names,
and the compiler always looks in /usr/include.

--
Glynn Clements <glynn@gclements.plus.com>