[vtkusers] Issue with libvtkRendering.so

johnpamar johnpamar at yahoo.com
Tue Apr 24 02:38:19 EDT 2012


Hello,

I am new to Ubuntu and I am trying to build a 3rd party software (CRKit)
that uses VTK. I had compiled and built VTK 5.6.1 on my Ubuntu 10.04 (Lucid)
OS with the following command:

/usr/bin/cmake -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF
-DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release
-DDESIRED_QT_VERSION:STRING=4 -DVTK_USE_CARBON:BOOL=OFF
-DVTK_USE_COCOA:BOOL=ON -DVTK_USE_GUISUPPORT:BOOL=ON
-DVTK_USE_64BIT_IDS:BOOL=ON -DVTK_USE_QT:BOOL=ON -DVTK_USE_QVTK:BOOL=ON
-DQT_QMAKE_EXECUTABLE:PATH=~/CRKit/crkit_build/install/qt-4.7.4/bin/qmake
-DVTK_USE_HYBRID:BOOL=ON -DVTK_USE_ANSI_STDLIB:BOOL=ON
-DVTK_USE_PARALLEL:BOOL=ON -DVTK_USE_RENDERING:BOOL=ON
-DVTK_USE_PATENTED:BOOL=ON '-DCMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG'
-DCMAKE_INSTALL_PREFIX:PATH=~/CRKit/crkit_build/install/vtk
~/CRKit/crkit_build/vtk/VTK

make -j 2

make install

After completing the VTK build and make (with some warnings), I ran into the
following error when building and making CRKit:
*$ make
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXMakeCurrent'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXGetConfig'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXQueryServerString'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXSwapBuffers'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXIsDirect'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXChooseVisual'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXCreateContext'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXGetClientString'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXGetCurrentContext'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXQueryExtensionsString'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXDestroyGLXPixmap'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXQueryExtension'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXDestroyContext'
collect2: ld returned 1 exit status
make[2]: *** [viz/code/crlViz] Error 1
make[1]: *** [viz/code/CMakeFiles/crlViz.dir/all] Error 2
make: *** [all] Error 2
$ make install
^[[5~^[[B~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so:
undefined reference to `glXMakeCurrent'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXGetConfig'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXQueryServerString'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXSwapBuffers'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXIsDirect'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXChooseVisual'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXCreateContext'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXGetClientString'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXGetCurrentContext'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXQueryExtensionsString'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXDestroyGLXPixmap'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXQueryExtension'
~/CRKit/crkit_build/install/vtk/lib/vtk-5.6/libvtkRendering.so: undefined
reference to `glXDestroyContext'
collect2: ld returned 1 exit status
make[2]: *** [viz/code/crlViz] Error 1
make[1]: *** [viz/code/CMakeFiles/crlViz.dir/all] Error 2
make: *** [all] Error 2*

My feeling is this has something to do with incorrect paths to OpenGL
(glu,xmesa) libraries in my CMake config file. For instance, I left the
following in the CMakeCache.txt and the build did not give any errors:
//Path to a library.
OPENGL_gl_LIBRARY:FILEPATH=/usr/include/GL/

//Path to a library.
OPENGL_glu_LIBRARY:FILEPATH=OPENGL_glu_LIBRARY-NOTFOUND

//Path to a file.
OPENGL_xmesa_INCLUDE_DIR:PATH=OPENGL_xmesa_INCLUDE_DIR-NOTFOUND



Looking over past threads, I haven't come across any other obvious things
that I might be overlooking. I apologize if this has been addressed before.
Let me know how I can find the path to my glu and xmesa library and how I
can correct this issue.

Thanks,
JP

--
View this message in context: http://vtk.1045678.n5.nabble.com/Issue-with-libvtkRendering-so-tp5661141p5661141.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list