Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: OpenFOAM's Paraview Compilation "VTK undefined reference"

  1. #1

    Question 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
    Code:
    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 https://develop.openfoam.com/Develop...equirements.md

    this link is for official instructions https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md

    and here is the log file of compilation https://filebin.net/nnes8fm6h1f1rwbc
    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 https://filebin.net/uc2t6wizryypb8sa

    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!

    -Ramkumar
    Last edited by ramkumar47; 05-Apr-2021 at 00:20. Reason: link formation issue

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,108
    Blog Entries
    15

    Default Re: OpenFOAM's Paraview Compilation "VTK undefined reference"

    Hi and welcome to the Forum
    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
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Red face Re: OpenFOAM's Paraview Compilation "VTK undefined reference"

    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 !

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,108
    Blog Entries
    15

    Default Re: OpenFOAM's Paraview Compilation "VTK undefined reference"

    Quote Originally Posted by ramkumar47 View Post
    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 !
    Hi
    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;
    https://build.opensuse.org/package/s...ience/openfoam

    But failing for Tumbleweed....
    Last edited by malcolmlewis; 06-Apr-2021 at 05:31.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Default Re: OpenFOAM's Paraview Compilation "VTK undefined reference"

    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
    Code:
    ./makeParaView -python -python-lib /usr/lib64/libpython2.7.so.1.0 -qmake $(which qmake-qt5) > log.paraview 2>&1
    2) 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

    Code:
    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/libvtkRenderingOpenGL2-pv5.6.so.1: undefined reference to `vtkCamera::vtkCamera()'
    /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: ../../../lib/libvtkRenderingOpenGL2-pv5.6.so.1: 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/libvtkFiltersGeneralPython27D-pv5.6.so
    [ 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

  6. #6

    Default Re: OpenFOAM's Paraview Compilation "VTK undefined reference"

    Quote Originally Posted by malcolmlewis View Post

    On the openSUSE Build Service I see;
    https://build.opensuse.org/package/s...ience/openfoam

    But failing for Tumbleweed....
    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.

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,108
    Blog Entries
    15

    Default Re: OpenFOAM's Paraview Compilation "VTK undefined reference"

    Hi
    Well python2 is deprecated in openSUSE Tumbleweed, does it build with python3?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8

    Default Re: OpenFOAM's Paraview Compilation "VTK undefined reference"

    Quote Originally Posted by malcolmlewis View Post
    Hi
    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

    Code:
    ----
    Python information:
        executable     : /usr/bin/python
        version        : 2.7
        include path   : /usr/include/python2.7
        library        : /usr/lib64/libpython2.7.so.1.0
    Using qmake=/usr/bin/qmake-qt5
    
    ParaView_SOURCE_DIR=/home/ramkumar/OpenFOAM/ThirdParty-v2012/ParaView-v5.6.3
    ParaView_BUILD_DIR=/home/ramkumar/OpenFOAM/ThirdParty-v2012/build/linux64Gcc/ParaView-5.6.3
    ParaView_DIR=/home/ramkumar/OpenFOAM/ThirdParty-v2012/platforms/linux64Gcc/ParaView-5.6.3
    
    Build stages selected
    ---------------------
        -patch    true
        -config   true
        -make     true
        -install  true
    ---------------------
    Features selected
        mesa      false
        mpi       false
        python    true
        qt        true
    ---------------------
    Compiler
        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

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,108
    Blog Entries
    15

    Default Re: OpenFOAM's Paraview Compilation "VTK undefined reference"

    Hi
    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
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  10. #10
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,285
    Blog Entries
    2

    Default Re: OpenFOAM's Paraview Compilation "VTK undefined reference"

    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.

    https://develop.openfoam.com/Develop...ecompiled/suse

    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

    https://www.openfoam.com/download/install-source.php

    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.

    https://openfoamwiki.net/index.php/Contrib/PyFoam

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •