diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 39e76310cd..8d3eff5d7b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -296,8 +296,49 @@ jobs: - name: Build all run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS - - name: Dump binary dependents + - name: Show contents of bin directory working-directory: ${{github.workspace}}/build + run: ls ./bin/${{matrix.build_type}}/ + + - name: Show contents of lib directory + working-directory: ${{github.workspace}}/build + run: ls ./lib/${{matrix.build_type}}/ + + - name: Show contents of PATH env var + run: $Env:PATH + + - name: Append build bin and lib dir to PATH env + run: $env:PATH = "${{github.workspace}}/build/bin/${{matrix.build_type}};${{github.workspace}}/build/lib/${{matrix.build_type}};$env:PATH" + + - name: Check system32 dir + run: ls "C:\Windows\System32\" + + - name: Check VC tools dir + run: ls "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64\" + + - name: Check VC redist libs dir1 + run: ls "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.40.33807\debug_nonredist\x64\" + + - name: Check VC redist libs dir2 + run: ls "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.40.33807\debug_nonredist\x64\Microsoft.VC143.DebugCRT" + + - name: Check Windows Kits dir + run: ls "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.UniversalCRT.Debug\" + + - name: Show contents of PATH env var again + run: $Env:PATH + + - name: Dumpbin hello_world.exe output + working-directory: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/" + run: ./dumpbin.exe /DEPENDENTS ${{github.workspace}}/build/bin/${{matrix.build_type}}/hello_world.exe + + - name: Dumpbin ur_loader.dll output + working-directory: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/" + run: ./dumpbin.exe /DEPENDENTS ${{github.workspace}}/build/bin/${{matrix.build_type}}/ur_loader.dll + + - name: Run single failing test example-hello-world + working-directory: ${{github.workspace}}/build + run: ctest -R "example-hello" -C ${{matrix.build_type}} --verbose - name: Test working-directory: ${{github.workspace}}/build diff --git a/examples/hello_world/CMakeLists.txt b/examples/hello_world/CMakeLists.txt index 8fd9bda19d..1b917966d6 100644 --- a/examples/hello_world/CMakeLists.txt +++ b/examples/hello_world/CMakeLists.txt @@ -15,6 +15,7 @@ if(MSVC) VS_DEBUGGER_COMMAND_ARGUMENTS "" VS_DEBUGGER_WORKING_DIRECTORY "$(OutDir)" ) + set_target_properties (${NAME} PROPERTIES PREFIX "../") endif() target_link_libraries(${TARGET_NAME} PRIVATE diff --git a/source/common/CMakeLists.txt b/source/common/CMakeLists.txt index 3c885a0c7c..4a1a5395e0 100644 --- a/source/common/CMakeLists.txt +++ b/source/common/CMakeLists.txt @@ -40,7 +40,7 @@ if (UR_STATIC_ADAPTER_L0) if (UMF_BUILD_SHARED_LIBRARY) message(STATUS "Static adapter is not compatible with shared UMF, switching to fully statically linked UMF") set(UMF_BUILD_SHARED_LIBRARY OFF) - set(UMF_DISABLE_HWLOC ON) + set(UMF_DISABLE_HWLOC OFF) endif() endif() diff --git a/source/common/windows/ur_lib_loader.cpp b/source/common/windows/ur_lib_loader.cpp index f062cfc560..39110501b7 100644 --- a/source/common/windows/ur_lib_loader.cpp +++ b/source/common/windows/ur_lib_loader.cpp @@ -27,9 +27,7 @@ void LibLoader::freeAdapterLibrary(HMODULE handle) { std::unique_ptr LibLoader::loadAdapterLibrary(const char *name) { - logger::info( - "Trying to load a library from {}", - name); + logger::info("Trying to load a library from {}", name); auto handle = std::unique_ptr( LoadLibraryExA(name, nullptr, 0)); logger::info("loaded adapter 0x{} ({})", handle, name); @@ -37,6 +35,7 @@ LibLoader::loadAdapterLibrary(const char *name) { } void *LibLoader::getFunctionPtr(HMODULE handle, const char *func_name) { + logger::info("Getting function ptr for {}", func_name); return reinterpret_cast(GetProcAddress(handle, func_name)); } diff --git a/source/loader/windows/adapter_search.cpp b/source/loader/windows/adapter_search.cpp index b514897d91..0097cf8139 100644 --- a/source/loader/windows/adapter_search.cpp +++ b/source/loader/windows/adapter_search.cpp @@ -25,7 +25,7 @@ namespace ur_loader { std::optional getLoaderLibPath() { HMODULE hModule = NULL; char pathStr[MAX_PATH_LEN_WIN]; - + logger::info("Getting loader library path!"); if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, reinterpret_cast(&getLoaderLibPath), diff --git a/test/loader/CMakeLists.txt b/test/loader/CMakeLists.txt index 692a5f5d1d..c74c57e221 100644 --- a/test/loader/CMakeLists.txt +++ b/test/loader/CMakeLists.txt @@ -5,7 +5,7 @@ add_test(NAME example-hello-world COMMAND hello_world DEPENDS hello_world) set_tests_properties(example-hello-world PROPERTIES LABELS "loader" - ENVIRONMENT "UR_ADAPTERS_FORCE_LOAD=\"$\"" + # ENVIRONMENT "UR_ADAPTERS_FORCE_LOAD=\"$\"" ) add_subdirectory(adapter_registry)