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

Will using different versions of the library conflict with each other and cause undefined behavior? #1320

Open
balleb6545anickk opened this issue Mar 1, 2024 · 3 comments

Comments

@balleb6545anickk
Copy link

I wrote a dynamic link library for customers to use. My dynamic link library itself will dynamically link to TBB. The customer's executable program links to the dynamic link library I provided, and the customer's executable program itself will also link to TBB but with different versions. Will there be any conflicts? (Can it be linked to the correct version? For example, the dynamic link library I provided should be linked to TBB v1.0, and the customer's own executable program should be linked to TBB v2.0).

Platform: Both window and linux need to be considered.

@pavelkumbrasev
Copy link
Contributor

Both you and your customers use oneTBB (not the old TBB)?
We support backward compatibility so when customer's library will load newer version of oneTBB it will also be used for your library.

@balleb6545anickk
Copy link
Author

Both you and your customers use oneTBB (not the old TBB)? We support backward compatibility so when customer's library will load newer version of oneTBB it will also be used for your library.

Can you explain the linking process more clearly? I can ensure that the dynamic link library I provide uses oneTBB. But I can't estimate the customer's behavior.

@pavelkumbrasev
Copy link
Contributor

When you compile your library using TBB headers certain amount of symbols will be expected during linking stage (from TBB).
For example if your library is built and linked with oneTBB 2021.2 all later versions of library will have the same list of symbols as 2021.2 (+ something new) that is done to support backward compatibility.

  1. Let's say your library is linked with oneTBB 2021.10 and your customers use oneTBB 2021.11. During runtime loader will load oneTBB 2021.11 which will indeed satisfy required symbols from your library.
  2. Let's say your library is linked with oneTBB 2021.10 and your customers use oneTBB 2021.2. During runtime loader will load oneTBB 2021.2 which may not satisfy required symbols from your library.

So it's better to clarify what version of TBB your customers are using so you can adjust and use the same or earlier versions respectively.

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

No branches or pull requests

2 participants