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

[Build] Getting issue with ONNX Runtime library name #21763

Closed
mc-nv opened this issue Aug 15, 2024 · 4 comments
Closed

[Build] Getting issue with ONNX Runtime library name #21763

mc-nv opened this issue Aug 15, 2024 · 4 comments
Labels
build build issues; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot

Comments

@mc-nv
Copy link
Contributor

mc-nv commented Aug 15, 2024

Describe the issue

Trying to compile ONNX Runtime using rel-1.19.0 vs rel-1.18.0
Getting successful compilation results but link chain of binaries is different
rel-1.18.0:

root@50b647a109ef:/opt/onnxruntime# ll /workspace/build/Release/libonnxruntime.so*
lrwxrwxrwx 1 root root       24 Jun 24 16:17 /workspace/build/Release/libonnxruntime.so -> libonnxruntime.so.1.18.0*
-rwxr-xr-x 1 root root 24707248 Jun 24 16:17 /workspace/build/Release/libonnxruntime.so.1.18.0*

rel-1.19.0:

root@ec9d237bd43b:/opt/onnxruntime# ll /workspace/build/Release/libonnxruntime.so*
lrwxrwxrwx 1 root root       19 Aug 13 23:12 /workspace/build/Release/libonnxruntime.so -> libonnxruntime.so.1*
lrwxrwxrwx 1 root root       24 Aug 13 23:12 /workspace/build/Release/libonnxruntime.so.1 -> libonnxruntime.so.1.19.0*
-rwxr-xr-x 1 root root 25694920 Aug 13 23:12 /workspace/build/Release/libonnxruntime.so.1.19.0*

Urgency

Suppose it need to be fixed before release.

Target platform

LINUX

Build script

./build.sh --config Release --skip_submodule_sync --parallel --build_shared_lib     --build_dir /workspace/build --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='60;61;70;75;80;86;90'  --update --build --use_cuda --cuda_home "/usr/local/cuda" --cudnn_home "/usr/local/cudnn-9.3/cuda" --use_tensorrt --use_tensorrt_builtin_parser --tensorrt_home "/usr/src/tensorrt" --allow_running_as_root --use_openvino CPU

in our scenario libonnxruntime.so will be copy out to /tmp/tritonbuild/onnxruntime/build/onnxruntime/lib and application will be linked against that folder:

[100%] Linking CXX shared library libtriton_onnxruntime.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/triton-onnxruntime-backend.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O3 -DNDEBUG -Wl,--version-script libtriton_onnxruntime.ldscript -shared -Wl,-soname,libtriton_onnxruntime.so -o libtriton_onnxruntime.so "CMakeFiles/triton-onnxruntime-backend.dir/src/onnxruntime.cc.o" "CMakeFiles/triton-onnxruntime-backend.dir/src/onnxruntime_loader.cc.o" "CMakeFiles/triton-onnxruntime-backend.dir/src/onnxruntime_utils.cc.o"   -L/tmp/tritonbuild/onnxruntime/build/onnxruntime/lib  -Wl,-rpath,"\${ORIGIN}" _deps/repo-core-build/libtritonserver.so _deps/repo-backend-build/libtritonbackendutils.a -lonnxruntime /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so -lopenvino _deps/repo-common-build/src/libtritonasyncworkqueue.a /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcudart.so _deps/repo-backend-build/libkernel_library_new.a /usr/local/cuda-12.6/targets/x86_64-linux/lib/libcupti.so 
gmake[2]: Leaving directory '/tmp/tritonbuild/onnxruntime/build'

Error / output

Linking against directory will pick the names out of file header and if it not present application won't be running properly.
Could you please standardize link chain for artifact.

rel-1.18.0:

root@50b647a109ef:/opt/onnxruntime# readelf -V /workspace/build/Release/libonnxruntime.so.1.18.0 | grep libonnxr*
  000000: Rev: 1  Flags: BASE  Index: 1  Cnt: 1  Name: libonnxruntime.so.1.18.0

rel-1.19.0:

root@3fd42308d0cd:/opt/onnxruntime# readelf -V /workspace/build/Release/libonnxruntime.so.1.19.0 | grep libonnxr*
  000000: Rev: 1  Flags: BASE  Index: 1  Cnt: 1  Name: libonnxruntime.so.1

Visual Studio Version

No response

GCC / Compiler Version

No response

@mc-nv mc-nv added the build build issues; typically submitted using template label Aug 15, 2024
@mc-nv
Copy link
Contributor Author

mc-nv commented Aug 15, 2024

cc: @pranavsharma , @yf711

@yf711
Copy link
Contributor

yf711 commented Aug 15, 2024

@prathikr @MaanavD

Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Sep 15, 2024
@snnn
Copy link
Member

snnn commented Oct 22, 2024

The change was expected. See: #21339

It was asked by a customer.

@snnn snnn closed this as completed Oct 22, 2024
@snnn snnn closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

3 participants