dirt
dirt copied to clipboard
No such file or directory
i installed dirt successfully,but when i ran import dirt,it will appear this
import dirt Traceback (most recent call last): File "
", line 1, in File "dirt/init.py", line 2, in from rasterise_ops import rasterise, rasterise_batch File "dirt/rasterise_ops.py", line 7, in _rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so') File "/home/longway/.local/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library lib_handle = py_tf.TF_LoadLibrary(library_filename, status) File "/home/longway/.local/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in exit c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.NotFoundError: dirt/librasterise.so: cannot open shared object file: No such file or directory @pmh47 can you hello me?my environment is cuda8.0+cudnn6.0+tensorflow-gpu1.4.0+gcc4.9
import dirt
Traceback (most recent call last):
File "tests/square_test.py", line 4, in
@pmh47
I have thesame problem as DomhnallBoyle. Any luck?
I haven't been able to reproduce this. Please check first whether librasterise.so actually exists at the path listed in the error. If it doesn't exist, then your install failed somehow. If it does exist, then run ldd dirt/librasterise.so
(giving the full path if needed) and paste the output here. Please also specify any parameters you needed to change to make the install work, in case this broke something else.
I will try your suggestion tommorow and o will also try to include "add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)" in the cmake from earlier issues. Thanks
Yes @pmh47, librasterise.so did not exist at the path listed in my error, I checked the local pip site-packages for dirt and it was in fact there instead. I fixed it by just copying over the missing file. I am however getting a new error now:
import dirt
Traceback (most recent call last):
File "
I realise this is already defined in #3 where you referred to using nvidia's libGL rather than mesa's. I can't seem to find where the nvidia libGL is on the system. I am using a docker instance with nvidia-docker for GPU support. I've already tried downloading the GL/gl.h and GL/glext.h files. Is there anything I can do to solve this? Thanks in advance.
My docker setup is as follows: python 2.7.12 nvidia driver version: 390.116 CUDA 9.0 tensorflow-gpu 1.12 cmake 3.14.5 gcc 5.4
I followed your advise. I ran ldd dirt/librasterise.so
linux-vdso.so.1 (0x00007ffd0b8a7000)
libEGL.so.1 => /usr/lib/x86_64-linux-gnu/libEGL.so.1 (0x00007f1e5ac95000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f1e5aa09000)
libtensorflow_framework.so => /home/peter/anaconda3/envs/EnvPy2.7/lib/python2.7/site-packages/tensorflow/libtensorflow_framework.so (0x00007f1e598e8000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1e596e0000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1e594c1000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1e592bd000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1e58edd000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1e58b3f000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1e58927000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1e58536000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1e5b19a000)
libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f1e58280000)
libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f1e5804f000)
libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1 (0x00007f1e56ee0000)
libcudnn.so.7 => /usr/local/cuda/lib64/libcudnn.so.7 (0x00007f1e3dbb6000)
libcudart.so.10.0 => /usr/local/cuda/lib64/libcudart.so.10.0 (0x00007f1e3d93c000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f1e3d604000)
libnvidia-fatbinaryloader.so.430.14 => /usr/lib/x86_64-linux-gnu/libnvidia-fatbinaryloader.so.430.14 (0x00007f1e3d3b6000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f1e3d18e000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f1e3cf8a000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f1e3cd84000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f1e3cb6f000)
The librasterise.so is well compiled and its using the correct virtual environment tensorflow.
My error is :
Traceback (most recent call last):
File "tests/square_test.py", line 4, in
- When i tried to check all the symbols inside the librasterise.so, the undefined symbol is well and present but somehow py_tf.TF_LoadLibrary couldnt load it correctly.
@DomhnallBoyle See https://hub.docker.com/r/nvidia/opengl/ for nvidia's GL docker image; I haven't tried this, but it looks like it contains all the pieces required by DIRT.
If you use the 1.0-glvnd-devel
variant (rather than base
), you probably need to explicitly request the GLVND bindings, by applying this patch to dirt/csrc/CMakeLists.txt:
diff --git a/csrc/CMakeLists.txt b/csrc/CMakeLists.txt
index e69ba8d..da51276 100644
--- a/csrc/CMakeLists.txt
+++ b/csrc/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.8) # 3.8 gives us built-in CUDA support
project(dirt LANGUAGES CXX CUDA)
-find_package(OpenGL REQUIRED)
+find_package(OpenGL REQUIRED COMPONENTS OpenGL)
# Search for EGL; nvidia drivers ship the library but not headers, so we redistribute those
find_path(EGL_INCLUDE_DIR NAMES EGL/egl.h PATHS ${CMAKE_CURRENT_SOURCE_DIR}/../external REQUIRED)
@@ -39,7 +39,7 @@ add_library(
)
target_compile_features(rasterise PUBLIC cxx_std_11)
-target_link_libraries(rasterise ${EGL_LIBRARIES} ${OPENGL_LIBRARIES} ${Tensorflow_LIBRARY})
+target_link_libraries(rasterise ${EGL_LIBRARIES} OpenGL::OpenGL ${Tensorflow_LIBRARY})
# Put the compiled library in the python package folder, rather than whatever build folder is being used
set_target_properties(
@fasogbon See the last two posts on #10 for the solution to that error.
Thanks! Your suggestions for release build worked perfectly fine
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math -D_GLIBCXX_USE_CXX11_ABI=0")
Thanks @pmh47, I'll give that a try. @fasogbon, how did you fix the original error of librasterise.so not existing in the directory?
@pmh47 thanks for your advice, I used the https://hub.docker.com/r/nvidia/cudagl docker devel image with nvidia-docker and did not need to change anything in the dirt/csrc/CMakeLists.txt to install dirt. The only issue I had was the missing librasterise.so and string_view.h problem from #23
i installed dirt successfully,but when i ran import dirt,it will appear this
import dirt Traceback (most recent call last): File "", line 1, in File "dirt/init.py", line 2, in from rasterise_ops import rasterise, rasterise_batch File "dirt/rasterise_ops.py", line 7, in _rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so') File "/home/longway/.local/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library lib_handle = py_tf.TF_LoadLibrary(library_filename, status) File "/home/longway/.local/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in exit c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.NotFoundError: dirt/librasterise.so: cannot open shared object file: No such file or directory @pmh47 can you hello me?my environment is cuda8.0+cudnn6.0+tensorflow-gpu1.4.0+gcc4.9
I have the same question as yours,how did you resolve it? @Weipeilang