Closed
Description
Summary
when tbbbind is enabled, there is following build error:
[9/49] Building CXX object src/tbbbind/CMakeFiles/tbbbind_2_5.dir/tbb_bind.cpp.o
FAILED: src/tbbbind/CMakeFiles/tbbbind_2_5.dir/tbb_bind.cpp.o
/usr/bin/c++ -D__TBBBIND_BUILD -IoneTBB/src/tbbbind/../../include -isystem hwloc/install/include -isystem /usr/include/libxml2 -O3 -DNDEBUG -std=c++11 -flto=auto -fno-fat-lto-objects -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -flifetime-dse=1 -Wall -Wextra -Werror -Wfatal-errors -D__TBB_GNU_ASM_VERSION=2042 -mrtm -mwaitpkg -fstack-clash-protection -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -ffile-prefix-map=oneTBB/= -ffile-prefix-map=..//= -MD -MT src/tbbbind/CMakeFiles/tbbbind_2_5.dir/tbb_bind.cpp.o -MF src/tbbbind/CMakeFiles/tbbbind_2_5.dir/tbb_bind.cpp.o.d -o src/tbbbind/CMakeFiles/tbbbind_2_5.dir/tbb_bind.cpp.o -c oneTBB/src/tbbbind/tbb_bind.cpp
oneTBB/src/tbbbind/tbb_bind.cpp: In member function ‘void tbb::detail::r1::system_topology::core_types_topology_parsing()’:
oneTBB/src/tbbbind/tbb_bind.cpp:209:103: error: cannot convert ‘std::nullptr_t’ to ‘long unsigned int’
209 | if (!hwloc_cpukinds_get_info(topology, core_type, current_mask, &efficiency, nullptr, nullptr, 0)
| ^~~~~~~
| |
| std::nullptr_t
compilation terminated due to -Wfatal-errors.
[41/49] Building CXX object src/tbb/CMakeFiles/tbb.dir/arena.cpp.o
The build can pass if we make following change:
diff --git a/src/tbbbind/tbb_bind.cpp b/src/tbbbind/tbb_bind.cpp
index 143d1433..b8356b48 100644
--- a/src/tbbbind/tbb_bind.cpp
+++ b/src/tbbbind/tbb_bind.cpp
@@ -206,7 +206,7 @@ private:
hwloc_cpuset_t& current_mask = core_types_affinity_masks_list[core_type];
current_mask = hwloc_bitmap_alloc();
- if (!hwloc_cpukinds_get_info(topology, core_type, current_mask, &efficiency, nullptr, nullptr, 0)
+ if (!hwloc_cpukinds_get_info(topology, core_type, current_mask, &efficiency, nullptr, 0)
&& efficiency >= 0
) {
hwloc_bitmap_and(current_mask, current_mask, process_cpu_affinity_mask);
Version
head commit is 45c2298
Environment
Provide any environmental details that you consider significant for reproducing the issue.
The following information is important:
- intel GNR
- Ubuntu 24.04
- /usr/bin/c++ --version
c++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0