I have adjusted the environment variables, and moved all the compiled
files to my destination folder for VTK.
I am using my own OS made with Linux From Scratch. I run it on Qemu/KVM.
I can run vtk from inside python interpreter. I can do “import vtk”, but on the console terminal I cannot run the .tcl file. I can run VTK with Python following this tutorial:
(Project 0: Getting VTK... to Work).
I just want to run vtk from bash without using Python interpreter.
That book hasn’t been updated, it uses VTK 4.2, we are now up to VTK 9.1 so Python or C++ is the way to go.
Also have a look here for Python and C++ examples: vtk-examples. The examples will compile/run with the VTK master. Also there is a PDF of the VTK TextBook and most of the examples in it will run with VTK 9+.
I do: git clone --recursive https://gitlab.kitware.com/vtk/vtk.git
then inside the vtk folder I mkdir build
then cd build
then I run: ccmake
Now after ccmake generate files inside the build folder I run: make
I am waiting now since it is compiling as I send this post.
When it is done I will do: make install
What are the last few lines of output of each of the commands? If it’s taking the build command is taking a long time, the cmake command was probably successful. What are the last few lines of output of your make/ninja command for building and the last few lines of output of your make/ninja install command?
A wheel is a Python package that you can install. Basically since you are not well verse with building VTK, you should either use a pre-built wheel version (pip install vtk) or build VTK with the basic options.
You are providing the source directory twice -S ./VTK-9.1.0 and /opt/hamzstlib/VTK-9.1.0 . I don’t think it matters but still, there is no point to setting the same key to maybe two different values.
Why are you enabling Java? -D VTK_WRAP_JAVA=ON Are you planning to use Java? Java tend to require a different install tree than standard C++ library so the JVM can load those libraries easily.
-D VTK_USE_TK=ON Why?
-D VTK_WHEEL_BUILD=ON Are you aiming to publish your VTK build to PyPI? This also imply some tree structure that might be incompatible with Java and maybe even VTK install tree for C++.
To summarize, if you don’t know what those options are for, don’t enable them. I already gave you the properties required to build VTK with Python support along with how to build an example against your build and install tree.