Internal GLEW build does not disable X symbol usage
Hello,
I am building ParaView 5.9.1 with Catalyst support on an x86 machine but without X11 libraries. There are NVIDIA drivers and OpenGL on this machine as well as Mesa and I intend to use it with the former. Unfortunately I am running into a linking issue:
[ 95%] Linking CXX executable ../../../bin/vtkProbeOpenGLVersion-pv5.9 [9/9431]
cd /lustre/scafellpike/local/HT04121/aas01/shared/software/build-5.9.1/VTK/Rendering/OpenGL2 && /netfs/smain01/scafellpike/local/apps/hierarchy/core/cmake/3.21
.1/bin/cmake -E cmake_link_script CMakeFiles/vtkProbeOpenGLVersion.dir/link.txt --verbose=2
/lustre/scafellpike/local/apps/hierarchy/core/gcc/6.5.0/bin/g++ -O2 -g -DNDEBUG -Wl,-lc -Wl,-lc -Wl,-rpath=/lustre/scafellpike/local/apps/hierarchy/compiler/
gcc/6.5/openmpi/4.1.1-ucx/lib CMakeFiles/vtkProbeOpenGLVersion.dir/vtkProbeOpenGLVersion.cxx.o -o ../../../bin/vtkProbeOpenGLVersion-pv5.9 -Wl,-rpath,"\$ORIG
IN/../lib64::::::::" ../../../lib64/libvtkRenderingOpenGL2-pv5.9.so.5.9 ../../../lib64/libvtkRenderingUI-pv5.9.so.5.9 ../../../lib64/libvtkRenderingCore-pv5.9.
so.5.9 ../../../lib64/libvtkFiltersGeneral-pv5.9.so.5.9 ../../../lib64/libvtkFiltersCore-pv5.9.so.5.9 ../../../lib64/libvtkglew-pv5.9.so.5.9 /usr/lib64/libOpen
GL.so ../../../lib64/libvtkCommonExecutionModel-pv5.9.so.5.9 ../../../lib64/libvtkCommonDataModel-pv5.9.so.5.9 ../../../lib64/libvtkCommonTransforms-pv5.9.so.5
.9 ../../../lib64/libvtkCommonMisc-pv5.9.so.5.9 ../../../lib64/libvtkCommonMath-pv5.9.so.5.9 ../../../lib64/libvtkCommonCore-pv5.9.so.5.9 -lpthread ../../../li
b64/libvtksys-pv5.9.so.5.9 -ldl -Wl,-rpath-link,/lustre/scafellpike/local/HT04121/aas01/shared/software/build-5.9.1/lib64
../../../lib64/libvtkglew-pv5.9.so.5.9: undefined reference to `glXQueryVersion'
../../../lib64/libvtkglew-pv5.9.so.5.9: undefined reference to `glXGetProcAddressARB'
../../../lib64/libvtkglew-pv5.9.so.5.9: undefined reference to `glXGetClientString'
I believe this problem to be identical to this post, which was at version 5.7 and @ben.boeckel advised then that the problem is GLEW not disabling the X11 symbols. Is it possible that this is still happening?
I also submitted a post to discourse, but I think now I understand the issue better and that's why I decided to put it here. Please advise.
For reference this is my cmake invocation:
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_TESTING=OFF \
-DPARAVIEW_USE_MPI=YES \
-DVTK_PYTHON_OPTIONAL_LINK=OFF \
-DVTK_MODULE_ENABLE_ParaView_Catalyst=YES \
-DVTK_MODULE_ENABLE_ParaView_PythonCatalyst=YES \
-DVTK_MODULE_ENABLE_VTK_FiltersParallel=YES \
-DVTK_MODULE_ENABLE_ParaView_VTKExtensionsExtraction=YES \
-DVTK_MODULE_ENABLE_ParaView_VTKExtensionsExtractionPython=YES \
-DVTK_MODULE_ENABLE_VTK_FiltersExtraction=YES \
-DPARAVIEW_USE_PYTHON=NO \
-DVTK_USE_X=NO \
-DVTK_RENDERING_BACKEND=OpenGL2 \
-DPARAVIEW_USE_QT=OFF \
-DEGL_LIBRARY=/usr/lib64/libEGL_nvidia.so.0 \
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
../ParaView-v${VERSION} 2>&1 | tee $LOGFILE
Edited by Robert Manson-Sawko