Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol: eglCreateContext #108

Open
ljiqy opened this issue Sep 3, 2021 · 4 comments
Open

undefined symbol: eglCreateContext #108

ljiqy opened this issue Sep 3, 2021 · 4 comments

Comments

@ljiqy
Copy link

ljiqy commented Sep 3, 2021

Hi,thank you for your great work!
when I run tf.load_op_library('dirt/librasterise.so'),it has error:
Traceback (most recent call last):
File "", line 1, in
File "/home/lj/software/anaconda3/envs/MGN_py2.7/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 60, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: ../dirt/librasterise.so: undefined symbol: eglCreateContext

and I use ldd -r dirt/librasterise.so to show:
(MGN_py2.7) [root@runonce-lj-syt build]# ldd -r ../dirt/librasterise.so
linux-vdso.so.1 => (0x00007ffe49d93000)
libEGL_nvidia.so.0 => /usr/lib64/libEGL_nvidia.so.0 (0x00007f092a8ba000)
libGLX_nvidia.so.0 => /usr/lib64/libGLX_nvidia.so.0 (0x00007f092a590000)
libtensorflow_framework.so => /home/lj/software/anaconda3/envs/MGN_py2.7/lib/python2.7/site-packages/tensorflow/libtensorflow_framework.so (0x00007f0929622000)
librt.so.1 => /usr/lib64/librt.so.1 (0x00007f092941a000)
libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007f09291fe000)
libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007f0928ffa000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f092afa1000)
libm.so.6 => /usr/lib64/libm.so.6 (0x00007f0928cf8000)
libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f0928ae2000)
libc.so.6 => /usr/lib64/libc.so.6 (0x00007f0928720000)
/lib64/ld-linux-x86-64.so.2 (0x00007f092aef9000)
libnvidia-glsi.so.460.32.03 => /usr/lib64/libnvidia-glsi.so.460.32.03 (0x00007f092847e000)
libnvidia-tls.so.460.32.03 => /usr/lib64/libnvidia-tls.so.460.32.03 (0x00007f0928279000)
libnvidia-glcore.so.460.32.03 => /usr/lib64/libnvidia-glcore.so.460.32.03 (0x00007f0926372000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f0926034000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f0925e22000)
libcublas.so.9.0 => /usr/local/cuda-9.0/lib64/libcublas.so.9.0 (0x00007f09229ec000)
libcuda.so.1 => /usr/lib64/libcuda.so.1 (0x00007f0921304000)
libcudnn.so.7 => /home/lj/software/cudnn_7.3/lib64/libcudnn.so.7 (0x00007f090f41f000)
libcufft.so.9.0 => /usr/local/cuda-9.0/lib64/libcufft.so.9.0 (0x00007f090737e000)
libcurand.so.9.0 => /usr/local/cuda-9.0/lib64/libcurand.so.9.0 (0x00007f090341a000)
libcudart.so.9.0 => /usr/local/cuda-9.0/lib64/libcudart.so.9.0 (0x00007f09031ad000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f0902f8b000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f0902d87000)
undefined symbol: eglCreateContext (../dirt/librasterise.so)
undefined symbol: eglGetProcAddress (../dirt/librasterise.so)
undefined symbol: eglMakeCurrent (../dirt/librasterise.so)
undefined symbol: eglGetError (../dirt/librasterise.so)
undefined symbol: eglChooseConfig (../dirt/librasterise.so)
undefined symbol: eglBindAPI (../dirt/librasterise.so)
undefined symbol: eglInitialize (../dirt/librasterise.so)

how can I solve these problem?

@pmh47
Copy link
Owner

pmh47 commented Sep 3, 2021

There should be a libEGL linked, not just libEGL_nvidia. Did you have to override any paths/etc. in the build? It should pick up libEGL automatically, and that then calls into libEGL_nvidia

@dev2021-ctrl
Copy link

I am facing similar issue but getting this error

tf.load_op_library('dirt/librasterise.so')
Traceback (most recent call last):
File "", line 1, in
File "/home/ubuntu/anaconda3/envs/mgn4/lib/python3.7/site-packages/tensorflow/python/framework/load_library.py", line 61, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /usr/lib/x86_64-linux-gnu/libOpenGL.so.0: undefined symbol: _glapi_tls_Current

@pmh47 please advise

@ljiqy
Copy link
Author

ljiqy commented Sep 6, 2021

Thank you for your quick reply!
In my system it can't find EGL library automatically, so I edit CMakeCache.txt.
Now I change EGL_LIBRARIES:FILEPATH=/usr/lib64/libEGL.so.1, it can be build successfully, but when I ran python tests/square_test.py, another error shows:
2021-09-06 16:28:41.482959: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA
2021-09-06 16:28:41.774868: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties:
name: Tesla V100-PCIE-32GB major: 7 minor: 0 memoryClockRate(GHz): 1.38
pciBusID: 0000:63:00.0
totalMemory: 31.75GiB freeMemory: 31.45GiB
2021-09-06 16:28:41.994806: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 1 with properties:
name: Tesla V100-PCIE-32GB major: 7 minor: 0 memoryClockRate(GHz): 1.38
pciBusID: 0000:64:00.0
totalMemory: 31.75GiB freeMemory: 29.94GiB
2021-09-06 16:28:42.000071: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0, 1
2021-09-06 16:28:42.880030: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-09-06 16:28:42.880124: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0 1
2021-09-06 16:28:42.880138: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N Y
2021-09-06 16:28:42.880146: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 1: Y N
2021-09-06 16:28:42.880328: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 30511 MB memory) -> physical GPU (device: 0, name: Tesla V100-PCIE-32GB, pci bus id: 0000:63:00.0, compute capability: 7.0)
2021-09-06 16:28:42.880730: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:1 with 29049 MB memory) -> physical GPU (device: 1, name: Tesla V100-PCIE-32GB, pci bus id: 0000:64:00.0, compute capability: 7.0)
2021-09-06 16:28:43.528035: F /home/lj/code/3D/clothing/software/dirt/csrc/gl_common.h:46] extensions eglQueryDevicesEXT, eglQueryDeviceAttribEXT and eglGetPlatformDisplayEXT not available

@MilesTheProwler
Copy link

@ljiqy did you solve it ? I have same error like you

2021-09-06 16:28:43.528035: F /home/lj/code/3D/clothing/software/dirt/csrc/gl_common.h:46] extensions eglQueryDevicesEXT, eglQueryDeviceAttribEXT and eglGetPlatformDisplayEXT not available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants