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 onetbb not like static library? #646

Closed
zhanglistar opened this issue Nov 10, 2021 · 2 comments
Closed

Why onetbb not like static library? #646

zhanglistar opened this issue Nov 10, 2021 · 2 comments
Assignees
Labels

Comments

@zhanglistar
Copy link

zhanglistar commented Nov 10, 2021

image

When I do
cmake -DBUILD_SHARED_LIBS=OFF ..

What's the problem with static library?

Thanks for your reply.

@zhanglistar zhanglistar changed the title Why onetbb not provide static library? Why onetbb not like static library? Nov 10, 2021
@anton-potapov anton-potapov self-assigned this Nov 10, 2021
@alexey-katranov
Copy link
Contributor

The static library is not a problem itself; however, there are some scenarios when the static linkage approach can lead to the issues. The most typical problem if static and dynamic or static and static libraries are mixed in one application. In the good case, it will be a performance problem, in the worst case, something will mysteriously fail (e.g. due to symbol conflicts).
Based on our experience with Intel OpenMP runtime (that provides and tries to support static build), we faced a lot of performance and correctness issues due to user configurations.

Therefore, we do not recommend using the static library. If you are Ok to cope with possible and unforeseen issues, we do not block the static build (in any case, it is an open source and any block can be removed). Moreover, we can consider reasonable improvements even for the static configuration if it can help someone.

@zhanglistar
Copy link
Author

The static library is not a problem itself; however, there are some scenarios when the static linkage approach can lead to the issues. The most typical problem if static and dynamic or static and static libraries are mixed in one application. In the good case, it will be a performance problem, in the worst case, something will mysteriously fail (e.g. due to symbol conflicts). Based on our experience with Intel OpenMP runtime (that provides and tries to support static build), we faced a lot of performance and correctness issues due to user configurations.

Therefore, we do not recommend using the static library. If you are Ok to cope with possible and unforeseen issues, we do not block the static build (in any case, it is an open source and any block can be removed). Moreover, we can consider reasonable improvements even for the static configuration if it can help someone.

Thanks for your reply.

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

3 participants