-
Notifications
You must be signed in to change notification settings - Fork 265
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
ImportError: ../../../_deps/onnxruntime-src/lib/libonnxruntime_providers_cuda.so: cannot open shared object file: No such file or directory #1030
Comments
Several Cmake warnings appeared when I installed sherpa-onnx: CMake Warning (dev) at /usr/local/cmake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:438 (message): CMake Warning (dev) at build/temp.linux-x86_64-cpython-38/_deps/pybind11-src/tools/FindPythonLibsNew.cmake:98 (find_package): Call Stack (most recent call first): |
Could you describe how you install |
git clone https://github.com/k2-fsa/sherpa-onnx |
ldd libonnxruntime_providers_cuda.so |
Please locate where
Please see also #392 (comment) |
Dynamic section at offset 0xbd8d0 contains 43 entries: |
Could you post the absolute path of this file? |
[ytc@localhost lib]$ sudo find / -name _sherpa_onnx*.so* $ sudo find / -name libonnxruntime_providers_cuda.so |
The shared library paths displayed by executing the "readelf -d _sherpa_onnx*.so*" command for these three paths are all [../../../_deps/onnxruntime-src/lib/libonnxruntime_providers_cuda.so], but in fact only one meets this path |
On Ubuntu, you can use
and post again the output
|
Dynamic section at offset 0xbd8d0 contains 43 entries: |
please switch to a new directory. Don't run it inside You can use
|
Still the same error |
I just executed “patchelf --replace-needed ../../../_deps/onnxruntime-src/lib/libonnxruntime_providers_cuda.so libonnxruntime_providers_cuda.so /home/ytc/anaconda3/envs/kaldi/lib/python3.8/site-packages/sherpa_onnx-1.9.30-py3.8-linux-x86_64.egg/_sherpa_onnx.cpython-38-x86_64-linux-gnu.so” at first, but it still reported an error, so I changed the paths of the other two shared libraries. |
Note the first time, you posted the following error:
The second time you posted the following after running
You can see that the two errors are different. Please find where |
I did it, but now I get a segmentation fault (core dumped) |
As long as I execute import shrpa_onnx, segmentation fault (core dumped) will be reported |
Could you describe what you have done? |
Could you post the exact command you have run with |
I just executed “sudo find / -name libsherpa-onnx-core.so” like this: then I run readelf -d on these path, all of these are ../../_deps/onnxruntime-src/lib/libonnxruntime_providers_cuda.so, and I run patchelf on these |
Could you post the output of |
(kaldi) [ytc@localhost ~]$ sudo find / -name libsherpa-onnx-core.so Dynamic section at offset 0x211488 contains 43 entries: Dynamic section at offset 0x211488 contains 43 entries: Dynamic section at offset 0x211488 contains 43 entries: Dynamic section at offset 0x211488 contains 43 entries: Dynamic section at offset 0x211488 contains 43 entries: |
Could you run
It will print
Then run
|
(kaldi) [ytc@localhost tmp]$ gdb --args python3 -c "import sherpa_onnx; print(sherpa_onnx.file)" Program received signal SIGSEGV, Segmentation fault. |
Please retry. You don't need to use
|
(gdb) catch throw Program received signal SIGSEGV, Segmentation fault. |
Could you run
where |
(kaldi) [ytc@localhost tmp]$ patchelf --remove-needed libonnxruntime_providers_cuda.so /home/ytc/anaconda3/envs/kaldi/lib/python3.8/site-packages/sherpa_onnx-1.9.30-py3.8-linux-x86_64.egg/sherpa_onnx/lib/libsherpa-onnx-core.so |
(kaldi) [ytc@localhost tmp]$ readelf -d /home/ytc/anaconda3/envs/kaldi/lib/python3.8/site-packages/sherpa_onnx-1.9.30-py3.8-linux-x86_64.egg/sherpa_onnx/lib/libsherpa-onnx-core.so Dynamic section at offset 0x211488 contains 42 entries: There is no libonnxruntime_providers_cuda.so |
could you run with gdb? |
(kaldi) [ytc@localhost tmp]$ gdb --args python3 -c "import sherpa_onnx; print(sherpa_onnx.file)" Program received signal SIGSEGV, Segmentation fault. |
Are you able to run sherpa-onnx with cuda using the binaries, e.g., using |
I haven't tried it, how can I do? |
Please follow |
|
Yes, you can do that. |
let me try |
How can I install sherpa_onnx-GPU offline? |
After building, you will find an exectuable
Please follow Remeber to pass |
I get this warning when I run make -j6: |
Could you post the complete logs of
(Please remove build/CMakeCache.txt before you run the above command to get logs) |
Not surprisingly, a similar error occurred (kaldi) [ytc@localhost sherpa-onnx]$ ./build/bin/sherpa-onnx-offline \
|
I remove ./build before executing cmake |
what is the output of
please see also #1030 (comment) |
(kaldi) [ytc@localhost build]$ ls -lh _deps/onnxruntime-src/lib |
|
Please run
|
(kaldi) [ytc@localhost sherpa-onnx]$ mkdir -p ../../_deps/onnxruntime-src/lib (kaldi) [ytc@localhost sherpa-onnx]$ ./build/bin/sherpa-onnx-offline \
|
Segmentation fault (core dumped) again |
Ok, so it is the issue of your environment, I think. Please follow https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html
|
(kaldi) [ytc@localhost ~]$ nvcc -V |
I followed this step to install the environment |
|
I reinstalled cuda11.8 and cudnn8.7.0 but still get the same error |
There was no error when I installed sherpa-onnx-gpu, but when I executed the command "python3 -c "import sherpa_onnx; print(sherpa_onnx.file)" an error occurred
The text was updated successfully, but these errors were encountered: