[vtkusers] Fix Ubuntu 14.04 VTK 6.1 compiling issue

Cory Quammen cory.quammen at kitware.com
Tue Sep 9 16:42:35 EDT 2014


Christian's solution has been committed to VTK master:

http://www.vtk.org/gitweb?p=VTK.git;a=commit;h=800282f2

Please let us know if you have any further troubles.

Cory

On Tue, Sep 9, 2014 at 10:04 AM, Cory Quammen <cory.quammen at kitware.com> wrote:
> Severin,
>
> Can you try Christian's solution of uncommenting the GLX_GLXEXT_LEGACY
> definition to see if it works on your system?
>
> Thanks,
> Cory
>
> On Tue, Sep 2, 2014 at 5:05 AM, Christian Askeland
> <christian.askeland at gmail.com> wrote:
>> Hi,
>>
>> I had the same issue today, on both VTK 6.1 and the current git HEAD. I use
>> the NVidia driver version 343 (gl headers dated august 2014). However, a
>> colleague of mine compiles VTK fine when using an older driver (331 /
>> january 2014).
>>
>> I looked into the GL headers (/usr/include/GL/) and found that GLintptr now
>> is in use in glxext.h, this was not the case in the previous version.
>>
>> My solution was to uncomment the define GLXEXT like this:
>>
>> // define GLX_GLXEXT_LEGACY to prevent glx.h to include glxext.h provided by
>> // the system
>> #define GLX_GLXEXT_LEGACY
>> #include "GL/glx.h"
>>
>> #include "vtkgl.h"
>>
>> in file
>>
>> vtkXOpenGLRenderWindow.cpp
>>
>> which causes glext.h to be included in glxext.h, thus providing the missing
>> type GLintptr.
>>
>> This seems like a better solution than including vtkgl.h before GL/glx.h,
>> but I don't have the full picture here.
>>
>>
>>
>> Best Regards
>>
>> Christian Askeland
>> SINTEF Medical Technology
>>
>>
>>
>>
>> On Fri, Aug 29, 2014 at 9:49 AM, Severin Holzer-Graf <sholzergr at gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> I faced the same compiling issue on Ubuntu 14.04 as mathew here:
>>> http://www.vtk.org/pipermail/vtkusers/2014-August/084877.html
>>> Compiling fails, because "GLsizeiptr has not been declared".
>>>
>>> The issue is that "vtkgl.h" is included *after* "GL/glx.h" which needs
>>> the typedefs for the datatypes from "vtkgl.h".
>>> I simply swapped the two lines and VTK compiles. Appended a patch that
>>> shows the change.
>>>
>>> Interestingly on my ArchLinux system compiling VTK 6.1 works out of
>>> the box and this was not necessary. I didn't further investigate that,
>>> so I'm not sure if swapping the two lines is actually the correct fix.
>>>
>>> Best
>>> Severin
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>


More information about the vtkusers mailing list