HWLoc Version detection fails
HWloc detection fails on my system and the wrong #ifdef
branch is used.
I have version 2.1.0+dfsg-3
installed from Debian packages.
Here is the relevant CMake Log:
-- Found hwloc: /usr/lib/x86_64-linux-gnu/libhwloc.so
HWLOC_VERSION=
VERSION LESS THAN 2
And here is the actual compilation issue:
[ 18%] Building CXX object flowvr/flowvr-base/src/CMakeFiles/flowvr-base.dir/topo.cpp.o
flowvr/flowvr-base/src/topo.cpp: In member function ‘std::deque<hwloc_bitmap_s*> flowvr::Topo::getL2GroupSet() const’:
flowvr/flowvr-base/src/topo.cpp:163:59: error: ‘HWLOC_OBJ_CACHE’ was not declared in this scope; did you mean ‘HWLOC_OBJ_L5CACHE’?
163 | if( obj->first_child && obj->first_child->type != HWLOC_OBJ_CACHE )
| ^~~~~~~~~~~~~~~
| HWLOC_OBJ_L5CACHE
flowvr/flowvr-base/src/topo.cpp:177:23: error: ‘HWLOC_OBJ_CACHE’ was not declared in this scope; did you mean ‘HWLOC_OBJ_L5CACHE’?
177 | if(child->type == HWLOC_OBJ_CACHE)
| ^~~~~~~~~~~~~~~
| HWLOC_OBJ_L5CACHE
Looking at HWLoc documentation, they provide a dedicated #define
for this: HWLOC_API_VERSION