OpenFOAM's Paraview Compilation "VTK undefined reference"

Hi all,
I am a new OpenSUSE Tumbleweed user. I came from Arch/Ubuntu to OpenSUSE as it has both the rolling system and official support to OpenFOAM. I compiled OpenFOAM v2012 successfully, but the issue arises for the paraview part… at over 50% of compilation, it throws a bunch of “undefined reference” errors related to VTK and stopped.
here is the starting of issue

vtkProbeOpenGLVersion.cxx:(.text._ZN30vtkRenderingOpenGL2_ModuleInitD2Ev[_ZN30vtkRenderingOpenGL2_ModuleInitD5Ev]+0x5): undefined reference to `vtkRenderingOpenGL2_AutoInit_Destruct()'

i tried searching online and did suggestions regarding installing VTK libraries… but it failed… whereas when i was in Ubuntu, i compiled it properly. I followed the official guide for compilation
this link is for dependencies

this link is for official instructions here is the log file of compilation
i cannot find a way to attach the file in here, hence used filebin…

i tried compiling VTK (of suggested version) as well, it threw a similar error and its log file can be found at

i have been trying this over a couple of weeks now… please help me if u figure out something

Thank you in advance and be safe!


Hi and welcome to the Forum :slight_smile:
VTK includes location perhaps, in openSUSE it’s in “%{my_incdir}/%{pkgname}-%{series}/” = /usr/include/vtk-9.0/

Link order all ok? You could try before your build routine export SUSE_ASNEEDED=0

Hi, thank you for ur reply… i could not understand it properly, as i am still newbie…
could u plz explain to me explicitly by steps?, like u would do for a child…
thank you and be safe !

What is the exact command your using to compile?

In the log before the error, what is the full output of of the compile command?

On the openSUSE Build Service I see;

But failing for Tumbleweed…

hi, sorry, i couldnt get access to my machine and now i got it.

  1. the exact command i used for compilation is as below
./makeParaView -python -python-lib /usr/lib64/ -qmake $(which qmake-qt5) > log.paraview 2>&1
  1. in the log before error, there were 12,000 lines, i am not sure which one to show and here is a bunch of lines before and after the error

Scanning dependencies of target vtkProbeOpenGLVersion
 54%] Building CXX object VTK/Rendering/OpenGL2/CMakeFiles/vtkProbeOpenGLVersion.dir/vtkProbeOpenGLVersion.cxx.o
 54%] Linking CXX executable ../../../bin/vtkProbeOpenGLVersion
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkWarpLensPython.cxx.o
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/vtkProbeOpenGLVersion.dir/vtkProbeOpenGLVersion.cxx.o: in function `vtkRenderingOpenGL2_ModuleInit::~vtkRenderingOpenGL2_ModuleInit()':
vtkProbeOpenGLVersion.cxx:(.text._ZN30vtkRenderingOpenGL2_ModuleInitD2Ev[_ZN30vtkRenderingOpenGL2_ModuleInitD5Ev]+0x5): undefined reference to `vtkRenderingOpenGL2_AutoInit_Destruct()'
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/vtkProbeOpenGLVersion.dir/vtkProbeOpenGLVersion.cxx.o: in function `main':
vtkProbeOpenGLVersion.cxx:(.text.startup+0x12): undefined reference to `vtkRenderer::New()'
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: vtkProbeOpenGLVersion.cxx:(.text.startup+0x1a): undefined reference to `vtkRenderWindow::New()'
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: vtkProbeOpenGLVersion.cxx:(.text.startup+0x55): undefined reference to `vtkObjectBase::GetClassName() const'
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: vtkProbeOpenGLVersion.cxx:(.text.startup+0x15f): undefined reference to `vtkOutputWindow::GetInstance()'
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: vtkProbeOpenGLVersion.cxx:(.text.startup+0x170): undefined reference to `vtkOutputWindow::GetInstance()'
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/vtkProbeOpenGLVersion.dir/vtkProbeOpenGLVersion.cxx.o: in function `_GLOBAL__sub_I_vtkProbeOpenGLVersion.cxx':


/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: ../../../lib/ undefined reference to `vtkCamera::vtkCamera()'
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: ../../../lib/ undefined reference to `vtkTextActor3D::SetForceOpaque(bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [VTK/Rendering/OpenGL2/CMakeFiles/vtkProbeOpenGLVersion.dir/build.make:117: bin/vtkProbeOpenGLVersion] Error 1
make[1]: *** [CMakeFiles/Makefile2:9084: VTK/Rendering/OpenGL2/CMakeFiles/vtkProbeOpenGLVersion.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkWarpScalarPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkWarpToPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkWarpVectorPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkYoungsMaterialInterfacePython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkMarchingContourFilterPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkRectilinearGridToPointSetPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkGraphWeightEuclideanDistanceFilterPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkGraphWeightFilterPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkImageDataToPointSetPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkIntersectionPolyDataFilterPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkBooleanOperationPolyDataFilterPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkLoopBooleanPolyDataFilterPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkDistancePolyDataFilterPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkOverlappingAMRLevelIdScalarsPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkExtractArrayPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkMatricizeArrayPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkNormalizeMatrixVectorsPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkPassArraysPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkSplitColumnComponentsPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkCellTreeLocatorPython.cxx.o
 54%] Building CXX object VTK/Wrapping/Python/CMakeFiles/vtkFiltersGeneralPythonD.dir/vtkFiltersGeneralPythonInitImpl.cxx.o
 54%] Linking CXX shared library ../../../lib/
 54%] Built target vtkFiltersGeneralPythonD
make: *** [Makefile:171: all] Error 2

real    169m46.713s
user    276m43.868s
sys    35m21.771s

there were 2000+ lines showing “undefined reference” issues

thank you

also i seen that just now… their compilation error seems to be different from mine… and actually, i have successfully compiled the OpenFOAM codes, now the Paraview Compilation is the issue, BTW, i am trying to compile the paraview that comes with OpenFOAM’s source (in the Third-parties directory)… because it contains few very useful plugins that we cannot get if we install paraview from the repos.

Well python2 is deprecated in openSUSE Tumbleweed, does it build with python3?

the paraview version 5.6.3 has support only for python2… and paraview version 5.8 (i guess on number) onwards have switched python 3…
i installed python2 for compiling this. and i didnt see any error related to python on that…

infact, it detected python2 and read it properly as shown in the compilation log below

Python information:
    executable     : /usr/bin/python
    version        : 2.7
    include path   : /usr/include/python2.7
    library        : /usr/lib64/
Using qmake=/usr/bin/qmake-qt5


Build stages selected
    -patch    true
    -config   true
    -make     true
    -install  true
Features selected
    mesa      false
    mpi       false
    python    true
    qt        true
    cxx       g++
    flags     -std=c++11 -m64 -pthread -fPIC
Version information
    paraview  5.6.3
    major     5.6
    build     Release
    qt        5.15.2

i can say it confirmed once i compile paraview successfully with python support and the errors i got are related to VTK C++ stuff

Sure, but any bug report will likely ask to use python3 and the later version for Tumbleweed… I see you have a reply in the OBS project, best follow that path :wink:

Noticed your build instructions are different than what I found.
Recommend you follow the instructions on this page instead and see if it makes any difference
I don’t see anything obvious in the documentation that describes limitations and problems, so YMMV.

The above uses packages built for openSUSE/SUSE in general without specifying TW or LEAP.
If it doesn’t work,
Then the following is the recommended documentation for building from source.
The instructions reference v2012 packages which is the “current and latest” but not Beta code. If it doesn’t work, I see a Beta branch that’s available

As for support for Python 3,
It looks like OpenFOAM itself is entirely C++ code, so you shouldn’t have any problems either downloading and “installing” a pre-compiled binary or building yourself with the proper instructions.
The User Tools are written in Python, and yes it looks like main support is for Python2, but Python v3.4<only> appears to be supported and is not the default in Tumbleweed.
Here is the Wiki article for your Python tools…
You may need to install venv, virtualenv or any of about 6 different Python virtual environment tools to run different Python side by side on your machine and download/install Python 3.4 from PyPi to get your OpenFoam tools to work. The alternative might be to simply work within a dedicated Linux environment(I’d recommend virtualization) and you can then customize it any way you want. AFAIK openSUSE doesn’t have any default system level functionality that depends on a version of Python3 installed.
And, as long as you likely have to install Python 3.4 from PyPi, I’d expect that the PyFOAM utilities should be available from PyPi, too… You shouldn’t have to go searching anywhere else.


Ramkumar, I too work with openfoam. After seeing your problem with paraview I decided to upgrade to v8 openfoam to investigate your issues. Thus, a period of time has passed before my response. I too had many problems with compiling paraview including version numbers of qt-vtk libraries and other items but I found a workaround. Note: I am using leap 15.2 not tumbleweed.

openfoam has paraview in the repos. I installed v5.9 paraview through software management which is higher version than openfoam is using. I found the distro compiled version works fine analyzing a simple openfoam case. If you start paraview using, for example, in the cavity tutorial 1 case):

“paraFoam -builtin -case $FOAM_RUN/tutorials/incompressible/icoFoam/cavity/cavity”. paraFoam is openfoam utility for calling paraview. This starts paraview in the cavity case directory with the data available to it.

Note the “- builtin” flag after paraFoam. This starts system paraview rather than local paraview.

I assume all paraview functionality is there but I have only run a simple case thus far.

Unless you enjoy the challenge of compiling paraview, this should get you started with openfoam v8, I will also continue compilation attempts when I need a challenge.

tom kosvic

Going with what is on the OpenFOAM Downloads page, the same binary is likely distributed and will work for both LEAP 15.x and Tumbleweed, and v2012 likely compiled about 3 months ago more or less.
Would be interesting if the package from openSUSE 15.2 is the same as the package from OpenFOAM… I’d expect both to be fine options to use, and I wonder if the built in Paraviiew is different or significantly different than providing separately as you seem to have done.

Note I modified your post slightly enclosing your parafoam command in CODE tags…


thank you for ur response…

i am already used to repository version of paraview in loading/postProcessing the OpenFOAM cases… but u might have noticed that it does not have very useful plugins of OpenFOAM, such as reading of zones and sets, visualizing block etc… loading of zones and sets can be done by converting to vtk and loading it in paraview, but it is a difficult/timeConsuming process especially when we want to work with lot of zones/sets (like topoSet, setFields etc…).

i tried OpenFOAM v2012 from the science repository and faced following 2 issues,

  1. same paraview issue, “OpenFOAM_v2012-default” package does not involve the inbuilt paraview, hence paraFoam command calls for system paraview only.
  2. it calls for a separate terminal environment which makes me uncomfortable, especially when i try to code somethings and tinker with source codes

i think i can adjust with 2nd point, but not the first one… hence i started to compile OpenFOAM manually, so that i can get the same feeling as i were using it on Ubuntu…

i switched to OpenSUSE Tumbleweed from Ubuntu mainly because, it is rolling distro and has official support for OpenFOAM…

i already compiled the OpenFOAM codes part, and it works perfectly, now only the paraview is causing issue.

please let me know once u successfully compiled Paraview part, so that i can get the instructions from u to try.

Thank you!


thank you!.. i hope i get something on the OBS post…

hi, i tried repository version of OpenFOAM v2012, the issue is that it does not contain the paraview with it, and requires paraview to be installed from repository only (i.e. system paraview) which do not contain the useful plugins of OpenFOAM, such as visualizing blockMesh’s blocks, loading sets and zones easily etc… sets and zones can be loaded by converting to VTK format, but it is a timeConsuming work especially when we work with lot of sets/zones (like topoSet, setFields etc…). This is the main reason why i am trying to compile OpenFOAM from source.

second reason is that, repository’s version of OpenFOAM creates a separate terminal environment which makes me uncomfortable to use…

oh, sorry, i missed that… thank you!

In response to tsu2 re: paraview versions.

opensuse software repos distribute paraview 5.9.0 as system files

openfoam third party files are trying to locally install 5.6.3

I have no idea of the relative differences between the two.

I continue to look at the openfoam thirdparty file compilation of paraview 5.6.3
If solution found will post it.

I am at configuration error in compiling thirdparty paraview with “./makeParaView” command. Configuration hangs at error below:

[CODECMake Error at VTK/CMake/vtkQt.cmake:6 (message):
Expected value for VTK_QT_VERSION is ‘5’
Call Stack (most recent call first):
VTK/GUISupport/Qt/CMakeLists.txt:1 (include)

Has anyone found what package needs upgrading to get past this error?  I find nothing with this name. QT5 is installed.  Internet search has revealed that this message has been seen before.  I have added packages that others have found to satisfy this requirement to no avail.

I am at configuration error in compiling thirdparty paraview with “./makeParaView” command. Configuration hangs at error below:

Make Error at VTK/CMake/vtkQt.cmake:6 (message):
  Expected value for VTK_QT_VERSION is '5'
Call Stack (most recent call first):
  VTK/GUISupport/Qt/CMakeLists.txt:1 (include)

Has anyone found what package needs upgrading to get past this error? I find nothing with this name. QT5 is installed. Internet search has revealed that this message has been seen before. I have added packages that others have found to satisfy this requirement to no avail.

I think it’s pretty obvious that the Qt framework installed in your Tumbleweed is a major version 6 while the code expected 5.
This is probably going to be a very common issue if you decide to do your coding on Tumbleweed because everything in it changes so fast.
I’m not sure how Qt framework versioning is handled when you do command line coding, I know that if you were using the IDE Qt-Creator, it can handle multiple versions of Qt side by side on a system.
You can try going into your compile manifest and modify it to support v6, that ordinarily should not be a problem.

So, if you want to compile, there are several options…

  • Fix the manifest yourself (or will a compile flag successfully overrule?)
  • Use QT-creator to install Qt5 and use that to compile
  • Install virtualization and compile within a virtual machine. I would have recommended this anyway, because coding environments can be picky and pollute your main install, I prefer to do all my coding in virtual machines to isolate the required changes and discard easily when done without affecting my main machine. If you install LEAP within a virtual machine, you should be able to successfully compile in a default Qt5 environment. Once the binary has been compiled, if there are no dependencies it should be able to run on both LEAP and Tumbleweed (and maybe other Linux as well).

I don’t know if I was clear in my post that OpenFOAM provides its own pre-compiled packages for SUSE which should work fine on both TW and LEAP.
You should try it as an alternative to the package from openSUSE, it might have an older but acceptable working Paraview pre-compiled within it.


TW is using Qt6, but Qt6 is not ready completely.
Try to use Leap 15.2 with default Qt5.
With TW you may use virtual machine with Leap 15.2.