Errors with paraview-mesa in ParaView 5.7.0-RC2 for linux both superbuild built versions and with downloaded binary version

Utkarsh,

I have finished the clean builds and while it is now creating the new mesa directory inside of lib and putting libGL.so and other libraries in there, when paraview is run with

paraview-mesa paraview --backend llvmpipe --print

paraview is still not using that libGL.so that is now in the lib/mesa directory and is instead still attempting to use a nonexistant nvidia driver (and thus failing). Your distributed binaries do not have this problem, and correctly use the Mesa compiled lib. Why is paraview ignoring the library that it built and installed?

Thanks,

Joe

Alright, next step. Mind attaching (or emailing) the LD_DEBUG=libs complete output? Let’s see which libGLX is getting loaded and why.

Utkarsh,

Here is the interesting portion, I think

 51359:     find library=libGLX.so.0 [0]; searching
 51359:      search path=/p/app/DAAC/paraview/5.7.0-RC4_mesa_mpich/bin/../lib:/usr/cta/DAAC/build/PV/Build_5.7.0-RC4_mesa_mpich/install/lib:/usr/cta/DAAC/build/PV/Build_5.7.0-RC4_mesa_mpich/install/lib64         (RPATH from file /p/app/DAAC/paraview/5.7.0-RC4_mesa_mpich/bin/paraview)
 51359:       trying file=/p/app/DAAC/paraview/5.7.0-RC4_mesa_mpich/bin/../lib/libGLX.so.0
 51359:       trying file=/usr/cta/DAAC/build/PV/Build_5.7.0-RC4_mesa_mpich/install/lib/libGLX.so.0
 51359:       trying file=/usr/cta/DAAC/build/PV/Build_5.7.0-RC4_mesa_mpich/install/lib64/libGLX.so.0
 51359:      search path=/p/app/DAAC/paraview/5.7.0-RC4_mesa_mpich/bin/../lib/mesa          (LD_LIBRARY_PATH)
 51359:       trying file=/p/app/DAAC/paraview/5.7.0-RC4_mesa_mpich/bin/../lib/mesa/libGLX.so.0
 51359:      search cache=/etc/ld.so.cache
 51359:       trying file=/lib64/libGLX.so.0
 51359:
 51359:     find library=libOpenGL.so.0 [0]; searching
 51359:      search path=/p/app/DAAC/paraview/5.7.0-RC4_mesa_mpich/bin/../lib:/usr/cta/DAAC/build/PV/Build_5.7.0-RC4_mesa_mpich/install/lib:/usr/cta/DAAC/build/PV/Build_5.7.0-RC4_mesa_mpich/install/lib64         (RPATH from file /p/app/DAAC/paraview/5.7.0-RC4_mesa_mpich/bin/paraview)
 51359:       trying file=/p/app/DAAC/paraview/5.7.0-RC4_mesa_mpich/bin/../lib/libOpenGL.so.0
 51359:       trying file=/usr/cta/DAAC/build/PV/Build_5.7.0-RC4_mesa_mpich/install/lib/libOpenGL.so.0
 51359:       trying file=/usr/cta/DAAC/build/PV/Build_5.7.0-RC4_mesa_mpich/install/lib64/libOpenGL.so.0
 51359:      search path=/p/app/DAAC/paraview/5.7.0-RC4_mesa_mpich/bin/../lib/mesa          (LD_LIBRARY_PATH)
 51359:       trying file=/p/app/DAAC/paraview/5.7.0-RC4_mesa_mpich/bin/../lib/mesa/libOpenGL.so.0
 51359:      search cache=/etc/ld.so.cache
 51359:       trying file=/lib64/libOpenGL.so.0

but I have attached the full output as well.

test_run_output.txt (250.6 KB)

Thanks,

Joe

Utkarsh,

libGLX.so.0 is not in the lib or lib/mesa directories
and neither is libOpenGL.so.0

libGL.so and libGL.so.1 is in lib/mesa but is not being used for
some reason.

Thanks,

Joe

right! so mesa build it not building libGLX etc. correctly. Are those files present in the superbuild build directory at all?

Utkarsh,

Attached is a list of the libraries found in lib and lib/mesa.

Thanks,

Joe

library_list.txt (69.7 KB)

I checked the entire superbuild directory and the only files being built are

libGL.la
libGL.so
libGL.so.1
libGL.so.1.5.0

No libGLX.so.0 or libOpenGL.so.0 is being built

but

libGL.so
libGL.so.1
libGL.so.1.5.0

are also what is found in your binary distribution for linux, libOpenGL.so.0 and libGLX.so.0 are also not found in your binary distribution for RC4 either.

Thanks,

Joe

Utkarsh here are the contents of
/usr/cta/DAAC/paraview/5.7.0-RC4_mesa/bin/…/lib/mesa/*

as you requested.

[joeh@centennial20 bin]$ pwd
/usr/cta/DAAC/paraview/5.7.0-RC4_mesa/bin

[joeh@centennial20 bin]$ ls -ld …/lib/mesa/*
-rw-rw-r–. 1 joeh daac 724792 Sep 19 15:49 …/lib/mesa/libgcc_s.so.1
-rwxrwxr-x. 1 joeh daac 14295264 Sep 19 15:49 …/lib/mesa/libGL.so
-rwxrwxr-x. 1 joeh daac 14295264 Sep 19 15:49 …/lib/mesa/libGL.so.1
-rwxrwxr-x. 1 joeh daac 14295264 Sep 19 15:49 …/lib/mesa/libGL.so.1.5.0
lrwxrwxrwx. 1 joeh daac 33 Sep 19 15:49 …/lib/mesa/libLLVMAggressiveInstCombine.so -> libLLVMAggressiveInstCombine.so.7
-rwxrwxr-x. 1 joeh daac 67400 Sep 19 15:49 …/lib/mesa/libLLVMAggressiveInstCombine.so.7
lrwxrwxrwx. 1 joeh daac 20 Sep 19 15:49 …/lib/mesa/libLLVMAnalysis.so -> libLLVMAnalysis.so.7
-rwxrwxr-x. 1 joeh daac 3831912 Sep 19 15:49 …/lib/mesa/libLLVMAnalysis.so.7
lrwxrwxrwx. 1 joeh daac 22 Sep 19 15:49 …/lib/mesa/libLLVMAsmPrinter.so -> libLLVMAsmPrinter.so.7
-rwxrwxr-x. 1 joeh daac 943416 Sep 19 15:49 …/lib/mesa/libLLVMAsmPrinter.so.7
lrwxrwxrwx. 1 joeh daac 24 Sep 19 15:49 …/lib/mesa/libLLVMBinaryFormat.so -> libLLVMBinaryFormat.so.7
-rwxrwxr-x. 1 joeh daac 74160 Sep 19 15:49 …/lib/mesa/libLLVMBinaryFormat.so.7
lrwxrwxrwx. 1 joeh daac 21 Sep 19 15:49 …/lib/mesa/libLLVMBitReader.so -> libLLVMBitReader.so.7
-rwxrwxr-x. 1 joeh daac 428248 Sep 19 15:49 …/lib/mesa/libLLVMBitReader.so.7
lrwxrwxrwx. 1 joeh daac 21 Sep 19 15:49 …/lib/mesa/libLLVMBitWriter.so -> libLLVMBitWriter.so.7
-rwxrwxr-x. 1 joeh daac 295496 Sep 19 15:49 …/lib/mesa/libLLVMBitWriter.so.7
lrwxrwxrwx. 1 joeh daac 19 Sep 19 15:49 …/lib/mesa/libLLVMCodeGen.so -> libLLVMCodeGen.so.7
-rwxrwxr-x. 1 joeh daac 5415440 Sep 19 15:49 …/lib/mesa/libLLVMCodeGen.so.7
lrwxrwxrwx. 1 joeh daac 16 Sep 19 15:49 …/lib/mesa/libLLVMCore.so -> libLLVMCore.so.7
-rwxrwxr-x. 1 joeh daac 3233920 Sep 19 15:49 …/lib/mesa/libLLVMCore.so.7
lrwxrwxrwx. 1 joeh daac 29 Sep 19 15:49 …/lib/mesa/libLLVMDebugInfoCodeView.so -> libLLVMDebugInfoCodeView.so.7
-rwxrwxr-x. 1 joeh daac 804384 Sep 19 15:49 …/lib/mesa/libLLVMDebugInfoCodeView.so.7
lrwxrwxrwx. 1 joeh daac 24 Sep 19 15:49 …/lib/mesa/libLLVMDebugInfoMSF.so -> libLLVMDebugInfoMSF.so.7
-rwxrwxr-x. 1 joeh daac 97856 Sep 19 15:49 …/lib/mesa/libLLVMDebugInfoMSF.so.7
lrwxrwxrwx. 1 joeh daac 20 Sep 19 15:49 …/lib/mesa/libLLVMDemangle.so -> libLLVMDemangle.so.7
-rwxrwxr-x. 1 joeh daac 215280 Sep 19 15:49 …/lib/mesa/libLLVMDemangle.so.7
lrwxrwxrwx. 1 joeh daac 27 Sep 19 15:49 …/lib/mesa/libLLVMExecutionEngine.so -> libLLVMExecutionEngine.so.7
-rwxrwxr-x. 1 joeh daac 186416 Sep 19 15:49 …/lib/mesa/libLLVMExecutionEngine.so.7
lrwxrwxrwx. 1 joeh daac 22 Sep 19 15:49 …/lib/mesa/libLLVMGlobalISel.so -> libLLVMGlobalISel.so.7
-rwxrwxr-x. 1 joeh daac 493320 Sep 19 15:49 …/lib/mesa/libLLVMGlobalISel.so.7
lrwxrwxrwx. 1 joeh daac 23 Sep 19 15:49 …/lib/mesa/libLLVMInstCombine.so -> libLLVMInstCombine.so.7
-rwxrwxr-x. 1 joeh daac 1066624 Sep 19 15:49 …/lib/mesa/libLLVMInstCombine.so.7
lrwxrwxrwx. 1 joeh daac 26 Sep 19 15:49 …/lib/mesa/libLLVMMCDisassembler.so -> libLLVMMCDisassembler.so.7
-rwxrwxr-x. 1 joeh daac 34608 Sep 19 15:49 …/lib/mesa/libLLVMMCDisassembler.so.7
lrwxrwxrwx. 1 joeh daac 17 Sep 19 15:49 …/lib/mesa/libLLVMMCJIT.so -> libLLVMMCJIT.so.7
-rwxrwxr-x. 1 joeh daac 71568 Sep 19 15:49 …/lib/mesa/libLLVMMCJIT.so.7
lrwxrwxrwx. 1 joeh daac 20 Sep 19 15:49 …/lib/mesa/libLLVMMCParser.so -> libLLVMMCParser.so.7
-rwxrwxr-x. 1 joeh daac 358640 Sep 19 15:49 …/lib/mesa/libLLVMMCParser.so.7
lrwxrwxrwx. 1 joeh daac 14 Sep 19 15:49 …/lib/mesa/libLLVMMC.so -> libLLVMMC.so.7
-rwxrwxr-x. 1 joeh daac 922368 Sep 19 15:49 …/lib/mesa/libLLVMMC.so.7
lrwxrwxrwx. 1 joeh daac 18 Sep 19 15:49 …/lib/mesa/libLLVMObject.so -> libLLVMObject.so.7
-rwxrwxr-x. 1 joeh daac 1019784 Sep 19 15:49 …/lib/mesa/libLLVMObject.so.7
lrwxrwxrwx. 1 joeh daac 23 Sep 19 15:49 …/lib/mesa/libLLVMProfileData.so -> libLLVMProfileData.so.7
-rwxrwxr-x. 1 joeh daac 453616 Sep 19 15:49 …/lib/mesa/libLLVMProfileData.so.7
lrwxrwxrwx. 1 joeh daac 23 Sep 19 15:49 …/lib/mesa/libLLVMRuntimeDyld.so -> libLLVMRuntimeDyld.so.7
-rwxrwxr-x. 1 joeh daac 499200 Sep 19 15:49 …/lib/mesa/libLLVMRuntimeDyld.so.7
lrwxrwxrwx. 1 joeh daac 22 Sep 19 15:49 …/lib/mesa/libLLVMScalarOpts.so -> libLLVMScalarOpts.so.7
-rwxrwxr-x. 1 joeh daac 3282368 Sep 19 15:49 …/lib/mesa/libLLVMScalarOpts.so.7
lrwxrwxrwx. 1 joeh daac 24 Sep 19 15:49 …/lib/mesa/libLLVMSelectionDAG.so -> libLLVMSelectionDAG.so.7
-rwxrwxr-x. 1 joeh daac 2882672 Sep 19 15:49 …/lib/mesa/libLLVMSelectionDAG.so.7
lrwxrwxrwx. 1 joeh daac 19 Sep 19 15:49 …/lib/mesa/libLLVMSupport.so -> libLLVMSupport.so.7
-rwxrwxr-x. 1 joeh daac 1665088 Sep 19 15:49 …/lib/mesa/libLLVMSupport.so.7
lrwxrwxrwx. 1 joeh daac 18 Sep 19 15:49 …/lib/mesa/libLLVMTarget.so -> libLLVMTarget.so.7
-rwxrwxr-x. 1 joeh daac 77712 Sep 19 15:49 …/lib/mesa/libLLVMTarget.so.7
lrwxrwxrwx. 1 joeh daac 26 Sep 19 15:49 …/lib/mesa/libLLVMTransformUtils.so -> libLLVMTransformUtils.so.7
-rwxrwxr-x. 1 joeh daac 2039704 Sep 19 15:49 …/lib/mesa/libLLVMTransformUtils.so.7
lrwxrwxrwx. 1 joeh daac 24 Sep 19 15:49 …/lib/mesa/libLLVMX86AsmParser.so -> libLLVMX86AsmParser.so.7
-rwxrwxr-x. 1 joeh daac 692336 Sep 19 15:49 …/lib/mesa/libLLVMX86AsmParser.so.7
lrwxrwxrwx. 1 joeh daac 25 Sep 19 15:49 …/lib/mesa/libLLVMX86AsmPrinter.so -> libLLVMX86AsmPrinter.so.7
-rwxrwxr-x. 1 joeh daac 374408 Sep 19 15:49 …/lib/mesa/libLLVMX86AsmPrinter.so.7
lrwxrwxrwx. 1 joeh daac 22 Sep 19 15:49 …/lib/mesa/libLLVMX86CodeGen.so -> libLLVMX86CodeGen.so.7
-rwxrwxr-x. 1 joeh daac 4080496 Sep 19 15:49 …/lib/mesa/libLLVMX86CodeGen.so.7
lrwxrwxrwx. 1 joeh daac 19 Sep 19 15:49 …/lib/mesa/libLLVMX86Desc.so -> libLLVMX86Desc.so.7
-rwxrwxr-x. 1 joeh daac 2288104 Sep 19 15:49 …/lib/mesa/libLLVMX86Desc.so.7
lrwxrwxrwx. 1 joeh daac 27 Sep 19 15:49 …/lib/mesa/libLLVMX86Disassembler.so -> libLLVMX86Disassembler.so.7
-rwxrwxr-x. 1 joeh daac 1675480 Sep 19 15:49 …/lib/mesa/libLLVMX86Disassembler.so.7
lrwxrwxrwx. 1 joeh daac 19 Sep 19 15:49 …/lib/mesa/libLLVMX86Info.so -> libLLVMX86Info.so.7
-rwxrwxr-x. 1 joeh daac 8824 Sep 19 15:49 …/lib/mesa/libLLVMX86Info.so.7
lrwxrwxrwx. 1 joeh daac 20 Sep 19 15:49 …/lib/mesa/libLLVMX86Utils.so -> libLLVMX86Utils.so.7
-rwxrwxr-x. 1 joeh daac 27232 Sep 19 15:49 …/lib/mesa/libLLVMX86Utils.so.7
lrwxrwxrwx. 1 joeh daac 14 Sep 19 15:49 …/lib/mesa/libstdc++.so -> libstdc++.so.6
-rwxrwxr-x. 1 joeh daac 11385816 Sep 19 15:49 …/lib/mesa/libstdc++.so.6
lrwxrwxrwx. 1 joeh daac 14 Sep 19 15:49 …/lib/mesa/libstdc++.so.6.0.22 -> libstdc++.so.6
-rwxrwxr-x. 1 joeh daac 19296248 Sep 19 15:49 …/lib/mesa/libswrAVX2.so
-rwxrwxr-x. 1 joeh daac 19296248 Sep 19 15:49 …/lib/mesa/libswrAVX2.so.0
-rwxrwxr-x. 1 joeh daac 19296248 Sep 19 15:49 …/lib/mesa/libswrAVX2.so.0.0.0
-rwxrwxr-x. 1 joeh daac 19057456 Sep 19 15:49 …/lib/mesa/libswrAVX.so
-rwxrwxr-x. 1 joeh daac 19057456 Sep 19 15:49 …/lib/mesa/libswrAVX.so.0
-rwxrwxr-x. 1 joeh daac 19057456 Sep 19 15:49 …/lib/mesa/libswrAVX.so.0.0.0
lrwxrwxrwx. 1 joeh daac 9 Sep 19 15:49 …/lib/mesa/libz.so -> libz.so.1
-rwxrwxr-x. 1 joeh daac 121616 Sep 19 15:49 …/lib/mesa/libz.so.1
lrwxrwxrwx. 1 joeh daac 9 Sep 19 15:49 …/lib/mesa/libz.so.1.2.11 -> libz.so.1

mind attaching the LD_DEBUG=libs output from the paraview.org binary? Let’s see where things are different, since looks like the two packages are identical in contents.

Utkarsh,

Here is the most interesting part

 16344:     find library=libGL.so.1 [0]; searching
 16344:      search path=/p/app/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/bin/../lib          (RPATH from file /p/app/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/bin/paraview)
 16344:       trying file=/p/app/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/bin/../lib/libGL.so.1
 16344:      search path=/p/app/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/bin/../lib/mesa             (LD_LIBRARY_PATH)
 16344:       trying file=/p/app/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/bin/../lib/mesa/libGL.so.1
 16344:    
 16344:     find library=libGLU.so.1 [0]; searching
 16344:      search path=/p/app/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/bin/../lib          (RPATH from file /p/app/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/bin/paraview)
 16344:       trying file=/p/app/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/bin/../lib/libGLU.so.1
 16344:      search path=/p/app/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/bin/../lib/mesa             (LD_LIBRARY_PATH)
 16344:       trying file=/p/app/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/bin/../lib/mesa/libGLU.so.1
 16344:      search cache=/etc/ld.so.cache
 16344:       trying file=/lib64/libGLU.so.1

And here is the whole file attached.

Thanks,

Joe

test_run_output_kitware_build.txt (302.0 KB)

Interesting indeed! I think I know what the issue is, but just one more thing – can you post the result from readelf -d libvtkglew-pv5.7.so.1 from both binaries. Kitware’s should have a header as follows, I suspect your build is depending on libGLX instead.

> readelf -d libvtkglew-pv5.7.so.1

Dynamic section at offset 0x9dd50 contains 28 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libGL.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libGLU.so.1]
 0x000000000000000e (SONAME)             Library soname: [libvtkglew-pv5.7.so.1]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN:$ORIGIN/../lib]
....

Utkarsh,

Here you go. First from my build.

/usr/cta/DAAC/paraview/5.7.0-RC4_mesa_mpich/lib
[joeh@centennial01 lib]$ readelf -d libvtkglew-pv5.7.so.1

Dynamic section at offset 0x9cd50 contains 28 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libGLX.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libOpenGL.so.0]
 0x000000000000000e (SONAME)             Library soname: [libvtkglew-pv5.7.so.1]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN]
...

Then from the kitware build

[joeh@centennial01 lib]$ pwd
/usr/cta/DAAC/build/ParaView-5.7.0-RC4-MPI-Linux-Python3.7-64bit/lib
[joeh@centennial01 lib]$ readelf -d libvtkglew-pv5.7.so.1

Dynamic section at offset 0x9dd50 contains 28 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libGL.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libGLU.so.1]
 0x000000000000000e (SONAME)             Library soname: [libvtkglew-pv5.7.so.1]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN:$ORIGIN/../lib]
...

Thanks,

Joe

Utkarsh,

Here is it in a file as it seems to have somehow escaped in the editor.

Thanks,

Joe

readelf_output.txt (3.5 KB)

exactly as I suspected, the ParaView build in the Superbuild is finding and using system OpenGL rather than the OpenGL from mesa the Superbuild built. Your system OpenGL is old and hence CMake switches to using the old-style OpenGL libraries. Next, I’ll figure out what needs to change on the Superbuild side to fix this.

What linux type/version are you building on? I’ll see if I can reproduce this behavior in a docker container and make debugging easier.

Utkarsh,

The system is running “Red Hat Enterprise Linux Server” version 7.6.
The compiler is gcc 6.1.0 and the cmake version is 3.11.4.

Thanks,

Joe

@joeh, can you try the attached patch please? It’ll need to be applied to the Superbuild.

My observations are as follows:

  • the issue arises when using superbuild (SB) to build binaries with mesa enabled on a system that has GLVND-based OpenGL. That’s the reason why we are seeing this when the binary is built on RHEL:7.6 (your machine) but not on centos:6 (paraview.org binaries). (The former uses GLVND for OpenGL by default, while the latter does not.)
  • Mesa that the SB builds is without glvnd. Thus, it only builds libGL (old ABI) and not libGLX, libOpenGL etc (new GLVND-based ABI).
  • When building on a system with GLVND, ParaView ends up finding and linking directly with the GLVD-based libraries i.e libGLX, libOpenGL etc. However, when building on non-GLVD based system, ParaView finds and links using old OpenGL ABI i.e. libGL. Thus, in former case the Mesa libGL will never be loaded while in the latter case, it will be loaded correctly if found in search path – the mechanism ParaView has traditionally relied on for the runtime mesa switching.

In summary, we need to fix how the runtime mesa-dispatch is expected to work when using GLVND-based OpenGL interfaces. For 5.7, forcing use of legacy OpenGL interfaces when mesa is enabled (as done in attached patch), should suffice.

Utkarsh,

The patch worked, my ParaView 5.7.0-RC4 version, built with the patched superbuild, is now behaving the same as the Kitware built binaries and properly loading the version of Mesa version it built in libGL.so. Thanks for working with me, I am glad this was resolved before 5.7.0 was released.

Thanks,

Joe

great! glad that was it. We’ll have this merged in for the 5.7 release. I’ve reported a bug to fix the issue the right way at a later date. Thanks for testing and your patience – these issues can be tedious to say the least!