[GRASS5] NVIZ updates

Glynn Clements glynn.clements at virgin.net
Tue Nov 18 12:49:21 EST 2003


Paul Kelly wrote:

> Before the 5.3.0 release it will be good to get NVIZ back so that it
> compiles under Cygwin. There are some glX functions used that appear to be
> non-standard. I mentioned this before I think but here are the actual
> compile errors:

> OBJ.i686-pc-cygwin/do_zoom.o: In function `Create_OS_Ctx':
> /cygdrive/g/release/530/grass/src.contrib/GMSL/NVIZ2.2/src/do_zoom.c:275: undefined reference to `glXChooseFBConfig'
> /cygdrive/g/release/530/grass/src.contrib/GMSL/NVIZ2.2/src/do_zoom.c:287: undefined reference to `glXCreatePbuffer'
> /cygdrive/g/release/530/grass/src.contrib/GMSL/NVIZ2.2/src/do_zoom.c:288: undefined reference to `glXMakeContextCurrent'
> OBJ.i686-pc-cygwin/do_zoom.o: In function `Destroy_OS_Ctx':
> /cygdrive/g/release/530/grass/src.contrib/GMSL/NVIZ2.2/src/do_zoom.c:351: undefined reference to `glXDestroyPbuffer'

In my copy of GL/glx.h, those functions are preceded by the comment:

	/* New for GLX 1.3 */

So, any code which uses those functions should probably be
conditionalised upon GLX_VERSION_1_3.

However, all of the lines which produce errors *are* conditionalised
upon GLX_PBUFFER_WIDTH. That macro is also specific to GLX 1.3.

This suggests that the GL headers don't match the GL libraries (GLX
1.3 headers with pre-1.3 libraries). In which case, even if the code
was conditionalised upon the correct macro, it would probably still
fail for you.

It may be an installation problem, or it may be that you have multiple
OpenGL packages installed (e.g. both Mesa and XFree86) and the build
is using the headers from one and the libraries from another. [Your
output only shows the link command, and not the compilation commands,
so I don't know which -I switches were being used.]

If it's the latter, I'm not sure whether there is a realistic fix, in
the sense of changes which could be made to the configure script or
the build system.

A generic workaround for problems caused by having multiple versions
of a package is to create private header and library directories which
include symlinks to the actual files which should be used, then
specify those directories when configuring.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list