[Paraview] undefined references to EGL library functions when using NVIDIA's libEGL_nvidia.so.384.90
Andrew Cochrane
acochrane at gmail.com
Sat Mar 3 13:29:22 EST 2018
I had a similar issue using the nvidia driver.
Is this a bug?
I had to add the egl, eglcore and osmesa libraries to the link lines for
vtkProbeOpenGLVersion and libvtkRenderingOpenGL2-pv5.5.so.1
`-L/usr/lib/nvidia-340/ -lEGL -lnvidia-eglcore -L/usr/lib/x86_64-linux-gnu
-lOSMesa`
or
`/usr/lib/nvidia-340/libEGL.so
/usr/lib/nvidia-340/libnvidia-eglcore.so.340.104
/usr/lib/x86_64-linux-gnu/libOSMesa.so`
Best,
Andrew
Original Message:
Greetings,
I'm trying to build pvserver with GPU headless rendering capability and
am getting undefined references to EGL library functions when using
NVIDIA's libEGL_nvidia.so.384.90 library. My cmake build specification
is:
cmake ../paraview \
-DVTK_USE_EGL=ON \
-DVTK_OPENGL_HAS_EGL=ON \
-DEGL_INCLUDE_DIR=/usr/include/nvidia-384 \
-DEGL_opengl_LIBRARY:FILEPATH=/usr/local/nvidia/lib64/libOpenGL.so.0 \
-DEGL_gldispatch_LIBRARY:FILEPATH=/usr/local/nvidia/lib64/libGLdispatch.so.0 \
-DEGL_LIBRARY:FILEPATH=/usr/local/nvidia/lib64/libEGL_nvidia.so.384.90 \
-DOPENGL_INCLUDE_DIR=:FILEPATH=/usr/include/nvidia-384 \
-DVTK_USE_X=OFF \
-DVTK_OPENGL_HAS_OSMESA=OFF \
-DPARAVIEW_BUILD_QT_GUI=OFF \
-DBUILD_SHARED_LIBS=ON -DPARAVIEW_USE_MPI=ON
libvtkRenderingOpenGL2-pv5.4.so.1 is reporting undefined references to
the egl* functions:
[100%] Building CXX object
CommandLineExecutables/CMakeFiles/pvserver.dir/pvserver.cxx.o
[100%] Linking CXX executable ../bin/pvserver
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglTerminate'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglCreateWindowSurface'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglQueryString'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglGetProcAddress'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglGetError'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglCreatePbufferSurface'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglDestroySurface'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglBindAPI'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglInitialize'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglQuerySurface'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglChooseConfig'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglSwapBuffers'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglCreateContext'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglGetCurrentDisplay'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglGetDisplay'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglMakeCurrent'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglDestroyContext'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglGetCurrentSurface'
collect2: error: ld returned 1 exit status
CommandLineExecutables/CMakeFiles/pvserver.dir/build.make:124: recipe
for target 'bin/pvserver' failed
Manually linking while specifying libEGL_nvidia.so.384.90 and
libEGL.so.1 does not resolve these references either:
/usr/bin/c++ -I/usr/include/nvidia-384 -g
CMakeFiles/pvserver.dir/pvserver.cxx.o -o ../bin/pvserver -rd
ynamic /usr/lib/nvidia-384/libEGL.so.1
../lib/libvtkPVServerManagerApplication-pv5.4.so.1 ../lib/libvtkPVServ
erManagerCore-pv5.4.so.1
../lib/libvtkPVServerImplementationCore-pv5.4.so.1
../lib/libvtkPVClientServerCoreCor
e-pv5.4.so.1 ../lib/libvtkFiltersParallel-pv5.4.so.1
../lib/libvtkFiltersExtraction-pv5.4.so.1 ../lib/libvtkFi
ltersModeling-pv5.4.so.1 ../lib/libvtkFiltersGeometry-pv5.4.so.1
../lib/libvtkPVVTKExtensionsCore-pv5.4.so.1 .
./lib/libvtkPVCommon-pv5.4.so.1 ../lib/libvtkClientServer-pv5.4.so.1
../lib/libvtkIOXMLParser-pv5.4.so.1 ../li
b/libvtkFiltersSources-pv5.4.so.1
../lib/libvtkFiltersGeneral-pv5.4.so.1
../lib/libvtkFiltersCore-pv5.4.so.1 .
./lib/libvtkIOImage-pv5.4.so.1
../lib/libvtkPVVTKExtensionsSIL-pv5.4.so.1
../lib/libvtkParallelMPI-pv5.4.so.1
../lib/libvtkParallelCore-pv5.4.so.1 ../lib/libvtkIOLegacy-pv5.4.so.1
../lib/libvtkIOCore-pv5.4.so.1 ../lib/li
bvtkCommonExecutionModel-pv5.4.so.1
../lib/libvtkCommonDataModel-pv5.4.so.1
../lib/libvtkCommonSystem-pv5.4.so
.1 ../lib/libvtkCommonTransforms-pv5.4.so.1
../lib/libvtkCommonMisc-pv5.4.so.1 ../lib/libvtkCommonMath-pv5.4.s
o.1 ../lib/libvtkCommonCore-pv5.4.so.1 ../lib/libprotobuf.so -lpthread
../lib/libvtkjsoncpp-pv5.4.so.1 -Wl,-rp
ath,/opt/subflow/paraview/paraview_build/lib:
-Wl,-rpath-link,/opt/subflow/paraview/paraview_build/lib^Cusr/li
b/nvidia-384/libEGL_nvidia.so.384.90
/usr/lib/nvidia-384/libEGL.so.384.90 /usr/lib/nvidia-384/libEGL.so.1
-Wl,
-rpath-link,/usr/lib/nvidia-384 /usr/lib/nvidia-384/libEGL.so
/usr/lib/nvidia-384/libGL.so /usr/lib/nvidia-384
/libGLESv1_CM.so /usr/lib/nvidia-384/libGLESv2.so
/usr/lib/nvidia-384/libGLX.so /usr/lib/nvidia-384/libOpenGL.
so /usr/lib/nvidia-384/libnvcuvid.so
/usr/lib/nvidia-384/libnvidia-cfg.so
/usr/lib/nvidia-384/libnvidia-compil
er.so /usr/lib/nvidia-384/libnvidia-encode.so
/usr/lib/nvidia-384/libnvidia-fbc.so /usr/lib/nvidia-384/libnvid
ia-ifr.so /usr/lib/nvidia-384/libnvidia-ml.so
root at paraview-6dcc64f758-9nkbc
<http://public.kitware.com/mailman/listinfo/paraview>:/opt/subflow/paraview/paraview_build/CommandLineExecutables#
../../link.sh
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglTerminate'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglCreateWindowSurface'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglQueryString'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglGetProcAddress'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglGetError'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglCreatePbufferSurface'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglDestroySurface'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglBindAPI'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglInitialize'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglQuerySurface'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglChooseConfig'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglSwapBuffers'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglCreateContext'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglGetCurrentDisplay'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglGetDisplay'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglMakeCurrent'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglDestroyContext'
/opt/subflow/paraview/paraview_build/lib/libvtkRenderingOpenGL2-pv5.4.so.1:
undefined reference to `eglGetCurrentSurface'
collect2: error: ld returned 1 exit status
Does anyone know what is going wrong here?
Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180303/85487315/attachment.html>
More information about the ParaView
mailing list