[vtkusers] undefined reference to `vtkOSOpenGLRenderWindow::New()

Dominik Szczerba dominik at itis.ethz.ch
Sat May 21 08:22:50 EDT 2011


Thanks for your email.

Indeed, initially, I was pointing to the 32 bit nvidia, but pointing
to 64 does not work either.
It keeps saying it switches to OSMESA because no OPENGL_gl_LIBRARY was
found. /usr/lib/libGL.so is there, but points to mesa/libGL.so, not
nvidia. Changing symlink by hand changes nothing.
Just trying things out blind I have installed libosmesa6 (it was not
installed) and then proceeded with the compilation as if using
software rendering. Compilation was successful, but then:

$ ldd libvtkRendering.so | grep GL
	libGL.so.1 => /usr/lib/nvidia-current/libGL.so.1 (0x00007f7986653000)

comes quite unexpectedly! Great, but there is certainly something wrong.

My preliminary theory is that cmake fails to detect the otherwise
correct vendor libGL library properly. Does it sound reasonable or you
have another idea? I feel quite a bit of unrest because of it.

Thanks
Dominik

On Fri, May 20, 2011 at 2:07 PM, Kevin H. Hobbs <hobbsk at ohio.edu> wrote:
> On 05/20/2011 07:41 AM, Dominik Szczerba wrote:
>> I further looked into the problem and I see that cmake is stubborn on
>> this variable: VTK_OPENGL_HAS_OSMESA. It always switches it back on,
>> even if I set it to off. I do have my nvidia driver under
>> /usr/lib32/nvidia-current/libGL.so which I pass as OPENGL_gl_LIBRARY.
>> But it still seems unable to find it. Any ideas?
>>
>
> Gaaa not enough nervous in caffeine system. I basically ignored
> the second half of your e-mail.
>
> "/usr/lib32"  you said you were on 64 bit Ubuntu the linker may
> not be able to use this as the rest of the app. will be 64 bit
> unless you're cross compiling.  Does "-m 32" in CMAKE_CXX_FLAGS
> and CMAKE_C_FLAGS do this?
>
>



More information about the vtkusers mailing list