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

Change libonnxruntime.so's SONAME: remove the minor and patch version. #21339

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

snnn
Copy link
Member

@snnn snnn commented Jul 12, 2024

Description

Resolve #21281 and #10589 .

  1. Change libonnxruntime.so's SONAME: remove the minor and patch version.

By default when creating an ELF shared object, linker will set the file's internal DT_SONAME field to the specified name which is the file name plus SOVERSION . For example, the file name for our library is libonnxruntime.so. And by default SOVERSION is the lib's VERSION number, which is something like 1.19.0. So the DT_SONAME field in libonnxruntime.so is something like libonnxruntime.so.1.18.0. You can use readelf tool to examine it.

readelf -d libonnxruntime.so | grep SONAME
 0x000000000000000e (SONAME)             Library soname: [libonnxruntime.so.1.18.0]

When an executable is linked with a shared object which has a DT_SONAME field, then when the executable is run the dynamic linker will attempt to load the shared object specified by the DT_SONAME field rather than using the file name(which is libonnxruntime.so) given to the linker.

After this change, the SONAME will be shorten to "libonnxruntime.so.1" instead.

  1. Set default version strings for Windows DLLs, to resolve ORT library files are missing versions. #10589

baijumeswani
baijumeswani previously approved these changes Jul 12, 2024
@snnn snnn merged commit e5f18ba into main Jul 15, 2024
98 of 100 checks passed
@snnn snnn deleted the snnn/p99999 branch July 15, 2024 21:21
snnn added a commit that referenced this pull request Jul 17, 2024
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

Successfully merging this pull request may close these issues.

C++ library SONAME without full version number ORT library files are missing versions.
2 participants