Open certik opened 11 years ago
Note: the message was right, on my home computer I get:
[vtk] -- Looking for glXGetProcAddressARB
[vtk] -- Looking for glXGetProcAddressARB - found
[vtk] -- Looking for glXGetProcAddressARB in GL/glx.h
[vtk] -- Looking for glXGetProcAddressARB in GL/glx.h - TRUE
[vtk] CMake Error at Rendering/OpenGL/CMakeLists.txt:303 (message):
[vtk] X11_Xt_LIB could not be found. Required for VTK X lib.
[vtk]
[vtk]
[vtk] -- Configuring incomplete, errors occurred!
[vtk ERROR] Command '['bash', '../bash_script']' returned non-zero exit status 1
[vtk ERROR] command failed (code=1); raising
so I had to use:
--- a/vtkConfig/bash_script.linux
+++ b/vtkConfig/bash_script.linux
@@ -4,6 +4,7 @@ set -e
cmake -DCMAKE_INSTALL_PREFIX:PATH="$ARTIFACT" \
-DBUILD_TESTING:BOOL=OFF \
+ -DVTK_USE_X:BOOL=OFF \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DPYTHON_EXECUTABLE:FILEPATH=$PYTHON/bin/python \
-DPYTHON_INCLUDE_PATH:PATH=$PYTHON/include/python2.7 \
Then I got:
[vtk] -- Looking for IceConnectionNumber in ICE - found
[vtk] -- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
[vtk] -- Found OpenGL: /home/ondrej/repos/python-hpcmp2/opt/mesa/q6hs/lib/libGL.so
[vtk] VTK will be built with OSMesa support!
[vtk] CMake Error at CMake/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
[vtk] Could NOT find OSMesa (missing: OSMESA_INCLUDE_DIR)
[vtk] Call Stack (most recent call first):
[vtk] CMake/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
[vtk] CMake/FindOSMesa.cmake:26 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
[vtk] Rendering/OpenGL/CMakeLists.txt:317 (find_package)
[vtk]
[vtk]
[vtk] -- Configuring incomplete, errors occurred!
[vtk ERROR] Command '['bash', '../bash_script']' returned non-zero exit status 1
[vtk ERROR] command failed (code=1); raising
So I tried -DVTK_OPENGL_HAS_OSMESA:BOOL=ON
from the message, which didn't fix it. But -DOSMESA_INCLUDE_DIR=$MESA/include
fixed it. It's also interesting, that the following two options don't seem to be needed anymore:
-DOPENGL_INCLUDE_DIR=$MESA/include \
-DOPENGL_gl_LIBRARY=$MESA/lib/libGL.so \
Current status:
The VTK and Mayavi builds, but Mayavi needs to be ported to VTK 6, so currently it raises exceptions, which is an upstream issue https://github.com/enthought/mayavi/issues/74.
Current status:
The VTK and Mayavi builds, but Mayavi needs to be ported to VTK 6, so currently it raises exceptions, which is an upstream issue enthought/mayavi#74. VTK is build with all options.
Old, obsolete (not valid anymore) text that I left here for reference:
The patches 1944665...673b539 provide basic support for Mesa with offscreen rendering and VTK. The VTK package is only built with minimum cmake options. We might want to eventually use more of the options from here:
https://github.com/qsnake/vtk/blob/master/spkg-install
at least check if it is built in release mode. On top of this, we need to build mayavi and test it that it is able to render in ipython notebook offscreen.
The VTK itself works great with offscreen rendering, as can be checked by this simple script: https://gist.github.com/certik/5687727. Here is a little more nontrivial example: https://gist.github.com/certik/5687884.
Note: this message suggests to use some more options to VTK configure in order to get the offscreen rendering working, but for me it works without it.