oneTBB
oneTBB copied to clipboard
Fix: ld: warning: cannot export hidden symbol typeinfo for tbb::detail::r1::unsafe_wait…
… from CMakeFiles/tbb.dir/exception.cpp.o
Signed-off-by: Vladislav Shchapov [email protected]
Description
macOS 12.1 Xcode 13.2.1
Linker warning:
ld: warning: cannot export hidden symbol typeinfo for tbb::detail::r1::unsafe_wait from CMakeFiles/tbb.dir/exception.cpp.o
Fixes #713
- [x] - git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details)
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
- [x] bug fix - change that fixes an issue
- [ ] new feature - change that adds functionality
- [ ] tests - change in tests
- [ ] infrastructure - change in infrastructure and CI
- [ ] documentation - documentation update
Tests
- [ ] added - required for new features and some bug fixes
- [x] not needed
Documentation
- [ ] updated in # - add PR number
- [ ] needs to be updated
- [x] not needed
Breaks backward compatibility
- [ ] Yes
- [x] No
- [ ] Unknown
Notify the following users
List users with @
to send notifications
Other information
cc @anton-potapov
@phprus, thanks for the contribution! One thing bothers me a lot here - It seems we miss an understanding of what really is going on here, i,e, what forcing the compiler to issue the warning? is it known compiler bug/feature? Or our code breaking (probably unwritten) rules here?
@anton-potapov
unsafe_wait
does not export any symbols from libtbb.dylib.
I think because of this the compiler/linker from xcode makes typeinfo hidden.
Xcode 14, same warning:
ld: warning: cannot export hidden symbol typeinfo for tbb::detail::r1::unsafe_wait from CMakeFiles/tbb.dir/exception.cpp.o
@pavelkumbrasev, @isaevil what do you think about this PR?
@pavelkumbrasev, @isaevil, @kboyarinov ping?
@phprus So is it only a warning?
@pavelkumbrasev This is a warning. All oneTBB tests pass successfully. But, I don't know if it affects anything else.
Xcode 14.3 Beta 2 has same warning.
More correct solution: #1114