[vtkusers] VTK 5.1 Mesa+Offscreen compilation problem

Obada Mahdi omahdi at gmx.de
Tue Nov 21 16:43:59 EST 2006


Hi Rasmus,

I have been getting the same error messages:

On 11/21/06, Rasmus Hemph <rasmus.hemph at chalmers.se> wrote:
> I am having problems compiling VTK from cvs (5.1) with
> offscreen-rendering using Mesa. With the 5.0 version I had no problem.
> This is the error message I get:
>
> usr/local/src/VTK/Rendering/vtkOpenGLPainterDeviceAdapter.cxx:248:
> error: no 'int vtkMesaPainterDeviceAdapter::IsAttributesSupported(int)'
> member f                              unction declared in class
> 'vtkMesaPainterDeviceAdapter'
> /usr/local/src/VTK/Rendering/vtkMesaPainterDeviceAdapter.cxx: In static
> member function 'static vtkMesaPainterDeviceAdapter*
> vtkMesaPainterDeviceAda                              pter::New()':
> /usr/local/src/VTK/Rendering/vtkMesaPainterDeviceAdapter.cxx:37: error:
> cannot allocate an object of abstract type 'vtkMesaPainterDeviceAdapter'
> /usr/local/src/VTK/Rendering/vtkMesaPainterDeviceAdapter.h:38: note:
> because the following virtual functions are pure within
> 'vtkMesaPainterDevice                              Adapter':
> /usr/local/src/VTK/Rendering/vtkPainterDeviceAdapter.h:76: note:
> virtual int vtkPainterDeviceAdapter::IsAttributesSupported(int)
> make[2]: ***
> [Rendering/CMakeFiles/vtkRendering.dir/vtkMesaPainterDeviceAdapter.o]
> Error 1
> make[1]: *** [Rendering/CMakeFiles/vtkRendering.dir/all] Error 2
>
> I am using Debian linux with gcc-4.1.2 for compilation. Any ideas?

It seems that in VTK CVS the header files
"vtkMesaPainterDeviceAdapter.h" and "vtkMesaRenderWindow.h" (at least,
maybe there are others, but they do not cause compilation problems)
are out of sync with the corresponding
"vtkOpenGLPainterDeviceAdapter.cxx" and "vtkOpenGLRenderWindow.cxx"
implementations; those classes share the implementation .cxx files,
but not the headers.

I am not sure whether there is a related bug report yet.  My
workaround is to take "vtkOpenGLPainterDeviceAdapter.h" and
"vtkOpenGLRenderWindow.h" as templates for the Mesa versions,
essentially replacing "OpenGL" with "Mesa" in both the filenames and
the file contents.  However, I have no idea why there are separate
header files for Mesa, whereas the implementation part is handled by
just having wrapper .cxx files that #define name mangling macros and
stuff, and then include the OpenGL version; there might be other
side-effects which I am not aware of.

HTH,

Obada



More information about the vtkusers mailing list