Skip to content

disable libstdc++ TBB backend for examples and tests - #346

Merged
dietmarkuehl merged 2 commits into
bemanproject:mainfrom
m-fila:libstdc++_tbb
Nov 18, 2026
Merged

dietmarkuehl merged 2 commits into
bemanproject:mainfrom
m-fila:libstdc++_tbb

Conversation

@m-fila

@m-fila m-fila commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

On systems with TBB and libstdc++ errors like the following are produced for tests:

exec-bulk.test.cpp:(.text._ZN3tbb6detail2d122small_object_allocator10deallocateINS1_9tree_nodeEEEvPT_RKNS1_14execution_dataE[_ZN3tbb6detail2d122small_object_allocator10deallocateINS1_9tree_nodeEEEvPT_RKNS1_14execution_dataE]+0x40): undefined reference to `tbb::detail::r1::deallocate(tbb::detail::d1::small_object_pool&, void*, unsigned long, tbb::detail::d1::execution_data const&)'

because libstdc++ <execution> was implemented with TBB and require linking it.
For the tests and examples in this repo, I propose to add a compile check whether and std parallel algorithm compiles and links without issues. If not then link TBB.

@m-fila
m-fila marked this pull request as draft November 18, 2026 13:53
@coveralls

coveralls commented Nov 18, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 92.722%. remained the same — m-fila:libstdc++_tbb into bemanproject:main

@Cra3z

Cra3z commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

I think it would be better to use -D_GLIBCXX_USE_TBB_PAR_BACKEND=0 so that the parts of the examples and tests that use PSTL do not use TBB.

@m-fila

m-fila commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Nice, thank you

@m-fila
m-fila marked this pull request as ready for review November 18, 2026 15:09
@m-fila m-fila changed the title link TBB if libstdc++ uses it disable libstdc++ TBB backend in for examples and tests Nov 18, 2026
@m-fila m-fila changed the title disable libstdc++ TBB backend in for examples and tests disable libstdc++ TBB backend for examples and tests Nov 18, 2026
@dietmarkuehl
dietmarkuehl merged commit dd7ecf6 into bemanproject:main Nov 18, 2026
42 checks passed
@m-fila
m-fila deleted the libstdc++_tbb branch November 18, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants