make command fails on hello world example

I have installed cmake and VTK from the Kitware instructions. Both installations appeared to go without error. I am attempting to run the C++ Hello World example.
I downloaded the downloaded the CylinderExample.tar file and untarred it into its own directory. I then did the cmake … command to configure and set up the Makefile. No errors, no complaints.
I execute make on the Makefile and nothing happens. make will only execute “make help”. Any other option simply returns to the Centos 7 command prompt.
I have tried several other examples and they act the same way. I’m using make 3.82 and cmake 3.22.1.
Any thoughts as to what is missing? (make works for other Makefiles)

Check your cmake output : Does it say Skipping CylinderExample ? This means that you need to indicate to cmake where your VTK installation is. I suggest to run ccmake or cmake-gui wihtin the build directory and check the VTK_DIR variable. It needs to point to your VTK installation path. Something like

<your path>/lib/cmake/vtk-9.1

Alternatively you can set it during configuration

cd build
cmake -DVTK_DIR=<your path>/lib/cmake/vtk-9.1 ../

Christos,

I made the modifications you mentioned below and managed to get a little further. The build of the CylinderExample completed without errors, but when I try to run the example, it fails with a segmentation fault with some references to graphics drivers. Oddly enough it paints the window on the screen then apparently it attempts to paint the image when the seg fault happens.

To back up a bit, what my user wants to do is to run VTK with software rendering on our compute cluster, because the compute nodes and the login nodes are not equipped with any sort of GPUs. He understands that the software rendering won’t be fast, but he is apparently working with static images generated from a program called LIGGGHTS.

I’m beginning to think this is impossible given the number of dead ends I have encountered so far.

If there is a way to accomplish this, I’d like to get a recipe that starts with a plain CentOS 7 (7.7 or 7.8) installation.

Without seeing the errors there is not much I can tell about the issues.

Unfortunately I don’t have much experience configuring VTK with software rendering. I do know however that there is an off-screen rendering version for ParaView ( see ParaView Server for Headless Machines) that can produce images without accessing the X server. From what I gathered from LIGGGHTS website there is a posibility to export data in ParaView-compatible formats.

Christos,

Understood. All it says is error, segmentation fault. Not too helpful. I’ll keep trying to sort this out. If I come up with a answer, I’ll send you the recipe. Who knows, with the shortage of GPUs these days, someone else might need the same solution.