Skip to content

Build fails with hwloc.h header missing on static linking #1065

@PatKamin

Description

@PatKamin

When attempting to build the project with the hwloc static linking enabled and hwloc library not installed in the system, the build process fails due to a missing hwloc.h header.

Environment Information

  • UMF version (hash commit or a tag): 0.11.0-dev1.git23.g9255e19
  • OS(es) version(s): ubuntu-24.04
  • compiler: gcc 13.3.0
  • libhwloc-dev not installed

Reproduction of the bug:

cmake -B build -DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_SHARED_LIBRARY=ON -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON -DUMF_BUILD_CUDA_PROVIDER=ON -DUMF_FORMAT_CODE_STYLE=OFF -DUMF_DEVELOPER_MODE=ON -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON -DUMF_TESTS_FAIL_ON_SKIP=ON -DUMF_DISABLE_HWLOC=OFF -DUMF_LINK_HWLOC_STATICALLY=ON
cmake --build build -j6

How often bug is revealed:

always

Actual behavior:

Build failure:

In file included from umf/test/memspaces/memspace_fixtures.hpp:18,
            from umf/test/memspaces/memspace_numa.cpp:6:
umf/src/umf_hwloc.h:21:10: fatal error: hwloc.h: No such file or directory

Expected behavior:

Header from the fetched hwloc is found. Build succeeds without libhwloc library installed in OS.

Additional information about Priority and Help Requested:

Are you willing to submit a pull request with a proposed change? Yes

Requested priority: Medium

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions