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

Failed to link on macOS for Release builds (Debug is fine) #1143

Closed
jay3d opened this issue Jul 16, 2023 · 6 comments
Closed

Failed to link on macOS for Release builds (Debug is fine) #1143

jay3d opened this issue Jul 16, 2023 · 6 comments
Labels

Comments

@jay3d
Copy link

jay3d commented Jul 16, 2023

I'm getting the following "undefs" when linking my app with tbb dylib on macOS in Release mode:

undef: __ZN3tbb6detail2r110deallocateERNS0_2d117small_object_poolEPvmRKNS2_14execution_dataE
undef: __ZN3tbb6detail2r110initializeERNS0_2d115task_arena_baseE
undef: __ZN3tbb6detail2r110initializeERNS0_2d118task_group_contextE
undef: __ZN3tbb6detail2r114execution_slotEPKNS0_2d114execution_dataE
undef: __ZN3tbb6detail2r114notify_waitersEm
undef: __ZN3tbb6detail2r115allocate_memoryEm
undef: __ZN3tbb6detail2r115current_contextEv
undef: __ZN3tbb6detail2r115max_concurrencyEPKNS0_2d115task_arena_baseE
undef: __ZN3tbb6detail2r115throw_exceptionENS0_2d012exception_idE
undef: __ZN3tbb6detail2r116execute_and_waitERNS0_2d14taskERNS2_18task_group_contextERNS2_12wait_contextES6_
undef: __ZN3tbb6detail2r117assertion_failureEPKciS3_S3_
undef: __ZN3tbb6detail2r117deallocate_memoryEPv
undef: __ZN3tbb6detail2r122cache_aligned_allocateEm
undef: __ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE
undef: __ZN3tbb6detail2r124cache_aligned_deallocateEPv
undef: __ZN3tbb6detail2r128is_group_execution_cancelledERNS0_2d118task_group_contextE
undef: __ZN3tbb6detail2r14waitERNS0_2d112wait_contextERNS2_18task_group_contextE
undef: __ZN3tbb6detail2r15resetERNS0_2d118task_group_contextE
undef: __ZN3tbb6detail2r15spawnERNS0_2d14taskERNS2_18task_group_contextE
undef: __ZN3tbb6detail2r16createERNS0_2d114global_controlE
undef: __ZN3tbb6detail2r17destroyERNS0_2d114global_controlE
undef: __ZN3tbb6detail2r17destroyERNS0_2d118task_group_contextE
undef: __ZN3tbb6detail2r17executeERNS0_2d115task_arena_baseERNS2_13delegate_baseE
undef: __ZN3tbb6detail2r18allocateERPNS0_2d117small_object_poolEm
undef: __ZN3tbb6detail2r18allocateERPNS0_2d117small_object_poolEmRKNS2_14execution_dataE
undef: __ZN3tbb6detail2r19terminateERNS0_2d115task_arena_baseE
Undefined symbols for architecture arm64:

Debug builds link and run correctly. I'm using 2021.9.0

@isaevil
Copy link
Contributor

isaevil commented Jul 17, 2023

Hi @jay3d could you please add more details on your environment:

  1. Is that arm64 Mac?
  2. Do you build oneTBB 2021.9 from sources or you use prebuilt packages?
  3. If you have a small reproducer which gets the same issue you are facing when linking your application with oneTBB, it would be nice to get it.

@isaevil isaevil added the bug label Jul 17, 2023
@jay3d
Copy link
Author

jay3d commented Jul 17, 2023

Hi @jay3d could you please add more details on your environment:

1. Is that arm64 Mac?

2. Do you build oneTBB 2021.9 from sources or you use prebuilt packages?

3. If you have a small reproducer which gets the same issue you are facing when linking your application with oneTBB, it would be nice to get it.

Yes it's arm64 Mac.
oneTBB built from sources

I have noticed that setting TBB_ENABLE_IPO=OFF fixed that issue in release mode.

@isaevil
Copy link
Contributor

isaevil commented Jul 17, 2023

I have noticed that setting TBB_ENABLE_IPO=OFF fixed that issue in release mode.

Can you share your build environment then (compiler, version of compiler, cmake command with options)?
I see no issues when do compilation of oneTBB 2021.9 using Apple Clang 13.1.6 and then trying to link some application to TBB.

@Nekto89
Copy link
Contributor

Nekto89 commented Aug 21, 2023

I have to use "onetbb*:tools.apple:enable_visibility=True" on macOS with conan because of this.

@nofuturre
Copy link

@jay3d is this issue still relevant?

@nofuturre
Copy link

If anyone encounter this issue in the future please open new issue with a link to this one

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

4 participants