oneTBB icon indicating copy to clipboard operation
oneTBB copied to clipboard

Fix: ld: warning: cannot export hidden symbol typeinfo for tbb::detail::r1::unsafe_wait…

Open phprus opened this issue 2 years ago • 10 comments

… 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

phprus avatar Mar 05 '22 10:03 phprus

cc @anton-potapov

phprus avatar Mar 13 '22 12:03 phprus

@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 avatar Mar 14 '22 07:03 anton-potapov

@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.

phprus avatar Mar 14 '22 08:03 phprus

Xcode 14, same warning:

ld: warning: cannot export hidden symbol typeinfo for tbb::detail::r1::unsafe_wait from CMakeFiles/tbb.dir/exception.cpp.o

phprus avatar Sep 26 '22 18:09 phprus

@pavelkumbrasev, @isaevil what do you think about this PR?

phprus avatar Dec 27 '22 12:12 phprus

@pavelkumbrasev, @isaevil, @kboyarinov ping?

phprus avatar Jan 29 '23 12:01 phprus

@phprus So is it only a warning?

pavelkumbrasev avatar Jan 30 '23 07:01 pavelkumbrasev

@pavelkumbrasev This is a warning. All oneTBB tests pass successfully. But, I don't know if it affects anything else.

phprus avatar Jan 30 '23 08:01 phprus

Xcode 14.3 Beta 2 has same warning.

phprus avatar Mar 12 '23 10:03 phprus

More correct solution: #1114

phprus avatar Jun 03 '23 17:06 phprus