Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable examples build on Windows with static hwloc #1057

Open
lukaszstolarczuk opened this issue Jan 24, 2025 · 1 comment
Open

Re-enable examples build on Windows with static hwloc #1057

lukaszstolarczuk opened this issue Jan 24, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@lukaszstolarczuk
Copy link
Contributor

Re-enable examples build on Windows with static hwloc - in other words revert this PR: #1056

This was failing intel/llvm builds - needs extra investigation, as the problem might be in UR improperly linking to hwloc, perhaps a wrong CMake path set somewhere, or an issue somewhere in intel/llvm (with Ninja builds).

@PatKamin
Copy link
Contributor

It looks like the hwloc library is not automatically built before linking hwloc with umf binaries takes place. This is the case when using Ninja single config generator (-G Ninja configuration step argument).
The Visual Studio generator currently handles this correctly.

After fetching hwloc, I propose additional build steps, like ie.:

        if(CMAKE_GENERATOR STREQUAL "Ninja")
            add_custom_command(
                COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${hwloc_targ_BINARY_DIR} -B build
                WORKING_DIRECTORY ${hwloc_targ_SOURCE_DIR}/contrib/windows-cmake/
                OUTPUT ${hwloc_targ_SOURCE_DIR}/contrib/windows-cmake/CMakeCache.txt)
            add_custom_command(
                COMMAND ${CMAKE_COMMAND} --build build
                WORKING_DIRECTORY ${hwloc_targ_SOURCE_DIR}/contrib/windows-cmake/
                OUTPUT ${hwloc_targ_SOURCE_DIR}/contrib/windows-cmake/build/lib/hwloc.lib
                DEPENDS ${hwloc_targ_SOURCE_DIR}/contrib/windows-cmake/CMakeCache.txt)
            add_custom_command(
                COMMAND ${CMAKE_COMMAND} --build build --target INSTALL
                WORKING_DIRECTORY ${hwloc_targ_SOURCE_DIR}/contrib/windows-cmake/
                OUTPUT ${hwloc_targ_BINARY_DIR}/lib/hwloc.lib
                DEPENDS ${hwloc_targ_SOURCE_DIR}/contrib/windows-cmake/build/lib/hwloc.lib)
            add_custom_target(hwloc_prod
                    DEPENDS ${hwloc_targ_BINARY_DIR}/lib/hwloc.lib)
            target_link_libraries(hwloc INTERFACE ${hwloc_targ_BINARY_DIR}/lib/hwloc.lib)
            add_dependencies(hwloc hwloc_prod)
        endif()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants