Created attachment 266718 [details] Patch for onetbb * Sync variables with Porters Handbook GitHub Section * Remove USES= tar:tgz (incorrect) * Replace USES= localbase with localbase:ldflags (cosmetic but fits better with CMake) * Use a separate section for USE_GITHUB (similar to what Porters Handbook suggests) * Only build unit tests when requested instead of all the time which makes overall build a lot slower * Adjust port Makefile to more closely follow Porters Handbook Compile and runtime tested on FreeBSD 14.3-RELEASE (amd64) (make, make check-plist, make test) Poudriere testport OK 13.5-RELEASE (amd64) Poudriere testport OK 13.5-RELEASE (i386) Poudriere testport OK 14.3-RELEASE (amd64)
I should also add that multiple unit tests fails on 14.3-RELEASE (amd64) unrelated to this patch
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=21ced109339993e4ca894fa5cc0f92a3f252cfb6 commit 21ced109339993e4ca894fa5cc0f92a3f252cfb6 Author: Daniel Engberg <diizzy@FreeBSD.org> AuthorDate: 2026-01-09 11:42:06 +0000 Commit: Ganael LAPLANCHE <martymac@FreeBSD.org> CommitDate: 2026-01-09 11:45:02 +0000 devel/onetbb: Improve port - Only build unit tests when requested to make overall build faster - Adjust port Makefile to more closely follow Porters Handbook - Remove USES= tar:tgz (incorrect) - Replace USES= localbase with localbase:ldflags - Use a separate section for USE_GITHUB PR: 292088 devel/onetbb/Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
Hello Daniel, Committed, thanks! Regarding failing tests, it seems several ones are failing due to /proc entry not well parsed ("Invalid /proc/self/status format"). A few others are just failing. I'll see if I can do something. I'll close that PR in the meantinme, feel free to re-open it if necessary. Best regards, Ganael.
> it seems several ones are failing due to /proc entry not well parsed > ("Invalid /proc/self/status format") Well, probably not the root cause as this is just an assertion :/ Cheers, Ganael.
Hi, Sounds great, I'm seeing this on a amd64 14.3-RELEASE box The following tests FAILED: 17 - test_parallel_invoke (Subprocess aborted) 23 - test_task_group (Subprocess aborted) 29 - test_resumable_tasks (SEGFAULT) 63 - test_hw_concurrency (ILLEGAL) 66 - test_global_control (Subprocess aborted) 67 - test_task (SEGFAULT) 71 - test_arena_constraints (Subprocess aborted) 74 - test_tbb_header (Failed) 105 - conformance_resumable_tasks (SEGFAULT) 129 - test_malloc_regression (Subprocess aborted) 131 - test_malloc_compliance (Subprocess aborted) 132 - test_malloc_used_by_lib (Subprocess aborted) 133 - test_malloc_lib_unload (Subprocess aborted) 135 - test_malloc_whitebox (Subprocess aborted) Perhaps we could try to at least document these upstream in worst case as I suspect that not only FreeBSD is affected?
Hello Daniel, I am preparing a patch that leads me to the following errors remaining : -- 95% tests passed, 7 tests failed out of 139 Total Test time (real) = 92.66 sec The following tests FAILED: 29 - test_resumable_tasks (SEGFAULT) 63 - test_hw_concurrency (ILLEGAL) 66 - test_global_control (Subprocess aborted) 67 - test_task (SEGFAULT) 74 - test_tbb_header (Failed) 105 - conformance_resumable_tasks (SEGFAULT) 131 - test_malloc_compliance (Subprocess aborted) -- I still have to improve it, stay tuned. Next, I plan to report those remaining errors upstream to see if someone can help. Best regards, Ganael.
Looks great, thanks for working on this! Sound like a good idea reporting upstream so they're at least aware and possible have more people looking at the remaining issues.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a1399edaf1110054ac66575198d5a6e2a69d206d commit a1399edaf1110054ac66575198d5a6e2a69d206d Author: Ganael LAPLANCHE <martymac@FreeBSD.org> AuthorDate: 2026-01-12 11:15:17 +0000 Commit: Ganael LAPLANCHE <martymac@FreeBSD.org> CommitDate: 2026-01-12 11:27:48 +0000 devel/onetbb: Fix procfs-related failing tests 'make test' failed with the following errors: 17 - test_parallel_invoke (Subprocess aborted) 23 - test_task_group (Subprocess aborted) 29 - test_resumable_tasks (SEGFAULT) 63 - test_hw_concurrency (ILLEGAL) 66 - test_global_control (Subprocess aborted) 67 - test_task (SEGFAULT) 71 - test_arena_constraints (Subprocess aborted) 74 - test_tbb_header (Failed) 105 - conformance_resumable_tasks (SEGFAULT) 129 - test_malloc_regression (Subprocess aborted) 131 - test_malloc_compliance (Subprocess aborted) 132 - test_malloc_used_by_lib (Subprocess aborted) 133 - test_malloc_lib_unload (Subprocess aborted) 135 - test_malloc_whitebox (Subprocess aborted) Fix tests 17,23,71,129,132,133,135 by using kinfo_getproc(3) instead of /proc/self/status, whose format differs from Linux. The following tests are still failing: 29 - test_resumable_tasks (SEGFAULT) 63 - test_hw_concurrency (ILLEGAL) 66 - test_global_control (Subprocess aborted) 67 - test_task (SEGFAULT) 74 - test_tbb_header (Failed) 105 - conformance_resumable_tasks (SEGFAULT) 131 - test_malloc_compliance (Subprocess aborted) and will be investigated. PR: 292088 Reported by: diizzy devel/onetbb/Makefile | 1 + devel/onetbb/files/patch-test_CMakeLists.txt (new) | 24 +++++++++++++++ .../files/patch-test_common_memory_usage.h (new) | 34 ++++++++++++++++++++++ 3 files changed, 59 insertions(+)
Hello Daniel, First (local, but I will send it upstream) patch committed. I'll try to see if I can fix other errors. Cheers, Ganael.
FYI: https://github.com/uxlfoundation/oneTBB/pull/1945
See also: https://github.com/uxlfoundation/oneTBB/issues/1949 regarding other failing tests.
(In reply to Ganael LAPLANCHE from comment #11) Great! Thanks for looking into these issues! :)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=387cd38cf64f73a605a30bb578759416ceb8b2ee commit 387cd38cf64f73a605a30bb578759416ceb8b2ee Author: Ganael LAPLANCHE <martymac@FreeBSD.org> AuthorDate: 2026-01-22 16:24:37 +0000 Commit: Ganael LAPLANCHE <martymac@FreeBSD.org> CommitDate: 2026-01-22 16:24:37 +0000 devel/onetbb: Fix more tests Fix/improve the following tests (see patches for details): 29 - test_resumable_tasks (SEGFAULT) 63 - test_hw_concurrency (ILLEGAL) 66 - test_global_control (Subprocess aborted) 67 - test_task (SEGFAULT) 74 - test_tbb_header (Failed) 105 - conformance_resumable_tasks (SEGFAULT) 131 - test_malloc_compliance (Subprocess aborted) This leads to a single test still failing: 63 - test_hw_concurrency (Subprocess aborted) because get_cpuset_indices() is not working on FreeBSD. PR: 292088 Reported by: diizzy devel/onetbb/Makefile | 2 +- ...ch-include_oneapi_tbb_detail__exception.h (new) | 26 ++++++++++++++++++++++ .../onetbb/files/patch-src_tbb_co_context.h (new) | 23 +++++++++++++++++++ ...tch-test_common_utils_concurrency_limit.h (new) | 24 ++++++++++++++++++++ ...test_tbbmalloc_test_malloc_compliance.cpp (new) | 17 ++++++++++++++ 5 files changed, 91 insertions(+), 1 deletion(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c8af973fb559ebd09ebfede81d7ad6f2e7ddd456 commit c8af973fb559ebd09ebfede81d7ad6f2e7ddd456 Author: Ganael LAPLANCHE <martymac@FreeBSD.org> AuthorDate: 2026-01-24 16:23:26 +0000 Commit: Ganael LAPLANCHE <martymac@FreeBSD.org> CommitDate: 2026-01-24 16:23:26 +0000 devel/onetbb: Fix the last failing test Fix the following test: 63 - test_hw_concurrency (ILLEGAL) by using sched_getaffinity(). PR: 292088 Reported by: diizzy devel/onetbb/Makefile | 2 +- ...common_utils_concurrency_limit.h-affinity (new) | 57 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-)
Hi Daniel, Every test seem to pass right now :) I've reported the last patch upstream here: https://github.com/uxlfoundation/oneTBB/pull/1950 I'll close that PR for now, thanks again for having reported those issues! Ganael.
A test is still failing on i386, see: https://github.com/uxlfoundation/oneTBB/issues/1967 I would be glad to get comments on this, as it seems to be related to a FreeBSD-only patch, that may be not needed anymore. Thanks, Ganael.
I am closing this as the port improvements submitted by diizzy@ have been committed by maintainer martymac@FreeBSD.org across multiple commits. All tests pass on amd64. The remaining i386 test failure is tracked upstream as GitHub issue #1967 and is not a ports issue.
(In reply to Ganael LAPLANCHE from comment #15) Awesome, thanks for looking into this!