I am trying to compile ParaView 5.8.0 on OpenSUSE Leap 15.1.
The last ParaView version compiled was 5.6.0 and it compiled ok.
with 5.8.0 I am getting the following errors, while linking:
Scanning dependencies of target ChartsCore
[ 79%] Linking CXX executable …/…/…/bin/vtkProbeOpenGLVersion-pv5.8
[ 79%] Building CXX object VTK/Interaction/Widgets/CMakeFiles/InteractionWidgets.dir/vtkPointPlacer.cxx.o
[ 79%] Building CXX object VTK/Charts/Core/CMakeFiles/ChartsCore.dir/vtkAxis.cxx.o
/usr/lib64/gcc/x86_64-suse-linux/7/…/…/…/…/x86_64-suse-linux/bin/ld: …/…/…/lib64/libvtkRenderingOpenGL2-pv5.8.so.5.8: undefined reference to OSMesaDestroyContext' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: ../../../lib64/libvtkRenderingOpenGL2-pv5.8.so.5.8: undefined reference to OSMesaMakeCurrent’
/usr/lib64/gcc/x86_64-suse-linux/7/…/…/…/…/x86_64-suse-linux/bin/ld: …/…/…/lib64/libvtkRenderingOpenGL2-pv5.8.so.5.8: undefined reference to OSMesaGetCurrentContext' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: ../../../lib64/libvtkRenderingOpenGL2-pv5.8.so.5.8: undefined reference to OSMesaCreateContext’
/usr/lib64/gcc/x86_64-suse-linux/7/…/…/…/…/x86_64-suse-linux/bin/ld: …/…/…/lib64/libvtkRenderingOpenGL2-pv5.8.so.5.8: undefined reference to `OSMesaGetProcAddress’
collect2: error: ld returned 1 exit status
make[2]: *** [VTK/Rendering/OpenGL2/CMakeFiles/vtkProbeOpenGLVersion.dir/build.make:112: bin/vtkProbeOpenGLVersion-pv5.8] Error 1
make[1]: *** [CMakeFiles/Makefile2:12375: VTK/Rendering/OpenGL2/CMakeFiles/vtkProbeOpenGLVersion.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
The OSMesa library is installed:
> zypper se libOSMesa
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
---+-----------------------+--------------------------------------------------------------+--------
i+ | libOSMesa-devel | Development files for the Mesa Offscreen Rendering extension | package
| libOSMesa-devel-32bit | Development files for the Mesa Offscreen Rendering extension | package
i+ | libOSMesa8 | Mesa Off-screen rendering extension | package
i+ | libOSMesa8-32bit | Mesa Off-screen rendering extension | package
I have not found anything about such an error online or on this forum. I am at a loss what the reason for the error, how should I proceed?
Note that OSMesa and X support are mutually exclusive. The old build system probably just silently disabled one of them. rc3 will have a condition letting you know that you’ve requested an impossible configuration.
Basically, if you want OSMesa support, X support has to be disabled.
That page explicitly claims that it’s now possible to use X and OSMESA flags at the same time in the build - do you know if this is a) just not true, b) I’ve misunderstood the entire thing, or c) true only for some versions more recent than 5.8.0 (i.e. dev)? (Perhaps I should include the implicit d) Some other option I can’t think of…)
If I want both, is there a recommended way to do this? (i.e. via two separate compilations, what are the best collection of flags relevant to either case to provide an X tunnelling compatible setup and a headless server that I connect to via a desktop client?)
That is indeed correct. However, not the following mentioned on the page you linked:
If VTK_OPENGL_HAS_OSMESA is ON, and VTK_USE_X is ON, then all the OpenGL
and OSMesa variables should point to the Mesa libraries.
This, AFAIK, is not possible using standard platform provided OSMesa since the that package typically does not provide GLX. If you custom build mesa with OSMesa and GLX support, then it should work.
Thank you for the clarification.
I’m going to open a new question because I think I’m moving away from the original topic here - it seems likely my problem may be related to the GLX support you mention (although I’m using a custom built installation of Mesa v20.1.3, and I thought GLX support).