-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Use gcc visibility attribute #1114
Conversation
@pavelkumbrasev, @isaevil what do you think about this PR? |
Rebased. Removed
experiment. Move flags into cmake script (Suggested by @ilya-lavrenov). |
Append commit form PR #799 (issue #713).
Error:
Failed test |
ping? |
1 similar comment
ping? |
Rebased. |
Any news on this PR? |
ping? |
2175e57
to
9314fcf
Compare
I think the documentation build error is out of scope for this PR: |
@phprus Looks like the changes break ABI on MacOS, because symbols are now different:
And |
Demangled:
Symbols with this PR:
Symbols without this PR (current master, commit 9314fcf):
Without patch typeinfo for tbb::detail::r1::unsafe_wait is not exported and this exception is not captured correctly. Clang:
For get this error build this PR without commit "Fix: ld: warning: cannot export hidden symbol typeinfo for tbb::detail::r1::unsafe_wait" (36f0108) |
Symbols from release binary:
Default build (RelWithDebInfo):
Without PR:
With PR:
I can't reproduce your environment and bug on local. |
@phprus When you refer to "Without PR" you still mean this PR but without changes to The diff I've sent is current Can you try compare symbols on Mac, but disable global visibility flags in Notify: @pavelkumbrasev |
@isaevil See comment #1114 (comment) for symbol comparation. |
Legacy macOS 10.15 (x86_64), AppleClang 12.0.0.12000032: Commit 88f73bb (current master without this PR):
As you can see, the symbols type is |
Rebased to resolve conflicts with current master. |
I admire your patience @phprus 😅 . I would also love to see this feature merged one day... |
I believe this comment is still on the table. oneTBB should preserve backward compatibility. |
You are right! On my tests, commit 2887a2f ( My previous comment about it: Please check ABI compatibility in your environment. |
@isaevil could you please take a look ? |
@isaevil could you please check ABI on macOS for the current version of PR? |
CI errors is not related with this PR:
|
I have the same issue. I'm trying to build onetbb with gcc 14.x on macOS. So, I really appreciate the effort to get this in the next version. What about the failing test? Is this known to be flaky? Can the CI be rerun? |
@isaevil Anything blocking this PR for being merged beside the reviews? Would be really great if this would make it to the next version. |
@saschasc I am going to validate the patch in terms of testing failures/ABI compatibility this or next week. |
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
d591c39
to
6835407
Compare
@isaevil rebased. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've compared ABI between current master branch and this PR on Linux and MacOS and seems like it is now the same. Workaround for unsafe_wait
on MacOS seems to work as well.
@pavelkumbrasev what do you think?
Since visibility attribute in a sense duplicate Def files we will need to discuss removal of Def files. |
During the review of this PR or separately? |
I think separately, we will need to discuss it within the team. |
@pavelkumbrasev what do you think about this PR? |
It looks good, we just need to define a plan for removing the Def files. |
Thanks a lot for this PR and the reviews. Is it already known when the next release of oneTBB will be available. For macOS it would be great to have a fixed version as soon as possible. Thanks! |
FYI @omalyshe |
Description
According to GCC symbols visibility wiki page as such (with
__attribute__ ((visibility ("default")))
exported symbols should be explicitly marked, to allow compilating with-fvisibility=hidden
flag.Previous PR: #786, #799
Fixes #779, #713
Type of change
Choose one or multiple, leave empty if none of the other choices apply
Add a respective label(s) to PR if you have permissions
Tests
Documentation
Breaks backward compatibility
Notify the following users
List users with
@
to send notificationsOther information