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

Why do all of the generated libraries for libtbb and libtbbmalloc store the SONAME in the metadata as libtbb.so.12 (on glnxa64)? #1507

Open
tcormackMW opened this issue Sep 5, 2024 · 1 comment
Labels

Comments

@tcormackMW
Copy link

I am running into some problems in my build and use of tbb as a result of the shared libraries generated by tbb all storing libtbb.so.12 as their SONAME (as opposed to their respective names -- libtbb.so, libtbb.so.12, libtbb.so.12.14) -- for example:

I understand this has been used in the past as a way to ensure that linker lines don't have to change and the versioned libraries will be referenced, however I don't understand the need for this given that tbb by default outputs 3 libraries (on linux and mac) that symlink to each other.

$ readelf -a libtbb.so
.....
Dynamic section at offset 0x3b878 contains 30 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
0x000000000000000e (SONAME) Library soname: [libtbb.so.12]
.....

@isaevil
Copy link
Contributor

isaevil commented Jan 30, 2025

@tcormackMW Essentially, TBB outputs only one real library: that would be libtbb.so.<major binary version>.<minor binary version>. The others are just symlinks to it:
libtbb.so -> libtbb.so.12 (to use -ltbb)
libtbb.so.12 -> libtbb.so.12.14

To preserve binary compatibility across the same major version and different minor versions of that major version we store libtbb.so.12 as the actual SONAME to be used by applications in NEEDED section.

What problems do observe during the build of your application?

FYI @kboyarinov

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

No branches or pull requests

2 participants