diff --git a/apps/therock.cfg b/apps/therock.cfg index e590655..a357a49 100644 --- a/apps/therock.cfg +++ b/apps/therock.cfg @@ -17,8 +17,9 @@ CMD_EXEC_DIR=${RCB_APP_SRC_DIR} CMD_CLEAN=RCB_CALLBACK__DELETE_APP_SRC_SUBDIR build RCB_CALLBACK__RESET_APP_SRC_REPOSITORY -CMD_PRE_CONFIG = ./rcb_pre_config.sh -CMD_CONFIG = ./rcb_config.sh -CMD_BUILD = ./rcb_build.sh +CMD_PRE_CONFIG = ./rcb_pre_config.py +CMD_CONFIG = ./rcb_config.py +CMD_BUILD = ./rcb_build.py # this file can be used for verifying that rocm_sdk build is ready -CMD_INSTALL = echo "rockbuilder_therock: ${RCB_APP_VERSION}" > ${RCB_APP_SRC_DIR}/build/dist/rocm/.info/rcb_rocm_sdk_src_version +CMD_INSTALL_LINUX = echo "rockbuilder_therock: ${RCB_APP_VERSION}" > ${RCB_APP_SRC_DIR}/build/dist/rocm/.info/rcb_rocm_sdk_src_version +CMD_INSTALL_WINDOWS = echo set "rockbuilder_therock: ${RCB_APP_VERSION}" > ${RCB_APP_SRC_DIR}\build\dist\rocm\.info\rcb_rocm_sdk_src_version \ No newline at end of file diff --git a/lib_python/repo_management.py b/lib_python/repo_management.py index e4ff63c..db380a3 100644 --- a/lib_python/repo_management.py +++ b/lib_python/repo_management.py @@ -56,6 +56,10 @@ def _exec_subprocess_cmd(self, exec_cmd, exec_dir): ret = True if exec_cmd is not None: exec_dir = self._replace_env_variables(exec_dir) + first_token = exec_cmd.split()[0] if exec_cmd.strip() else "" + if first_token.endswith(".py"): + python_cmd = "python" if self.is_posix == False else "python3" + exec_cmd = python_cmd + " " + exec_cmd print("exec_cmd: " + exec_cmd + ", exec_dir: " + exec_dir) # capture_output=True --> can print output after process exist, not possible to see the output during the build time # capture_output=False --> can print output only during build time diff --git a/patches/therock/release/therock/base/0001-helper-scripts-to-init-config-and-build-therock.patch b/patches/therock/release/therock/base/0001-helper-scripts-to-init-config-and-build-therock.patch index c76c23c..7653805 100644 --- a/patches/therock/release/therock/base/0001-helper-scripts-to-init-config-and-build-therock.patch +++ b/patches/therock/release/therock/base/0001-helper-scripts-to-init-config-and-build-therock.patch @@ -1,7 +1,7 @@ -From 0d57383e222d54431975788d8ced7b193fdce579 Mon Sep 17 00:00:00 2001 +From 093328301924b6425ddf97415e8196b9f7ec6d3b Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Tue, 16 Sep 2025 17:02:28 -0700 -Subject: [PATCH 1/4] helper scripts to init, config and build therock +Subject: [PATCH 1/8] helper scripts to init, config and build therock Signed-off-by: Mika Laitio --- @@ -119,7 +119,7 @@ index 0000000..09a68f8 +python ./build_tools/fetch_sources.py diff --git a/rcb_pre_config.sh b/rcb_pre_config.sh new file mode 100755 -index 0000000..5bcb0ec +index 0000000..29c47d2 --- /dev/null +++ b/rcb_pre_config.sh @@ -0,0 +1,24 @@ diff --git a/patches/therock/release/therock/base/0002-clr-and-hip-fixes-for-compiler-warnings.patch b/patches/therock/release/therock/base/0002-clr-and-hip-fixes-for-compiler-warnings.patch index 0a4900a..f82943e 100644 --- a/patches/therock/release/therock/base/0002-clr-and-hip-fixes-for-compiler-warnings.patch +++ b/patches/therock/release/therock/base/0002-clr-and-hip-fixes-for-compiler-warnings.patch @@ -1,7 +1,7 @@ -From 3080ad06c3954af05ca4ef8b428c1ef11ee3720d Mon Sep 17 00:00:00 2001 +From 0122553474cadd3a47067ebf8063c9cbcc9ae6db Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 8 Oct 2025 00:14:39 +0000 -Subject: [PATCH 2/4] clr and hip fixes for compiler warnings +Subject: [PATCH 2/8] clr and hip fixes for compiler warnings Fix warnings that are showed when building for example the clr project itself or other projects like miopen @@ -31,7 +31,7 @@ Signed-off-by: Mika Laitio diff --git a/patches/amd-mainline/rocm-systems/0004-clr-and-hip-fix-various-build-warnings.patch b/patches/amd-mainline/rocm-systems/0004-clr-and-hip-fix-various-build-warnings.patch new file mode 100644 -index 00000000..da185ef2 +index 0000000..da185ef --- /dev/null +++ b/patches/amd-mainline/rocm-systems/0004-clr-and-hip-fix-various-build-warnings.patch @@ -0,0 +1,86 @@ diff --git a/patches/therock/release/therock/base/0003-set-LLVM_DEFAULT_TARGET_TRIPLE-if-specified.patch b/patches/therock/release/therock/base/0003-set-LLVM_DEFAULT_TARGET_TRIPLE-if-specified.patch index 0b00c1d..8057435 100644 --- a/patches/therock/release/therock/base/0003-set-LLVM_DEFAULT_TARGET_TRIPLE-if-specified.patch +++ b/patches/therock/release/therock/base/0003-set-LLVM_DEFAULT_TARGET_TRIPLE-if-specified.patch @@ -1,7 +1,7 @@ -From be0e6aa2ecbc75d14934ec4510812fb4e1afd6fa Mon Sep 17 00:00:00 2001 +From dcc97adfea807e1f9b5a29af76129680b6629d7f Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Thu, 27 Nov 2025 03:52:07 +0000 -Subject: [PATCH 3/4] set LLVM_DEFAULT_TARGET_TRIPLE if specified +Subject: [PATCH 3/8] set LLVM_DEFAULT_TARGET_TRIPLE if specified Set target triple when compiling the amd-llvm if environment variable @@ -14,10 +14,10 @@ Signed-off-by: Mika Laitio 1 file changed, 3 insertions(+) diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt -index 9db31320..d31e76c5 100644 +index eee0b5d..35224dc 100644 --- a/compiler/CMakeLists.txt +++ b/compiler/CMakeLists.txt -@@ -10,6 +10,9 @@ if(THEROCK_ENABLE_COMPILER) +@@ -13,6 +13,9 @@ if(THEROCK_ENABLE_COMPILER) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") list(APPEND _extra_llvm_cmake_args "-DLLVM_ENABLE_PEDANTIC=OFF") endif() diff --git a/patches/therock/release/therock/base/0004-rccl-add-more-amd-gpus.patch b/patches/therock/release/therock/base/0004-rccl-add-more-amd-gpus.patch index 29b3af0..1bf64a8 100644 --- a/patches/therock/release/therock/base/0004-rccl-add-more-amd-gpus.patch +++ b/patches/therock/release/therock/base/0004-rccl-add-more-amd-gpus.patch @@ -1,7 +1,7 @@ -From 5bc2ee3b57b152f052742a50e4bd9ba55bc86bc7 Mon Sep 17 00:00:00 2001 +From c4ee5a76694504ac0c25a3edda8db651a5819b10 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Thu, 25 Sep 2025 13:34:38 -0700 -Subject: [PATCH 4/4] rccl add more amd gpus +Subject: [PATCH 4/8] rccl add more amd gpus - disable trace_hwreg assembly command s_getreg_b32 HW_REG_HW_ID for gpus and igpus's that @@ -18,7 +18,7 @@ Signed-off-by: Mika Laitio diff --git a/patches/amd-mainline/rccl/0001-rccl-add-more-amd-gpus.patch b/patches/amd-mainline/rccl/0001-rccl-add-more-amd-gpus.patch new file mode 100644 -index 00000000..d5397916 +index 0000000..d539791 --- /dev/null +++ b/patches/amd-mainline/rccl/0001-rccl-add-more-amd-gpus.patch @@ -0,0 +1,67 @@ diff --git a/patches/therock/release/therock/base/0005-gfx90a-xnack.patch b/patches/therock/release/therock/base/0005-gfx90a-xnack.patch new file mode 100644 index 0000000..c2bff46 --- /dev/null +++ b/patches/therock/release/therock/base/0005-gfx90a-xnack.patch @@ -0,0 +1,58 @@ +From 36609d5868d2447929aea796dafcb07303fd675b Mon Sep 17 00:00:00 2001 +From: Mika Laitio +Date: Mon, 9 Mar 2026 19:41:21 -0700 +Subject: [PATCH 5/8] gfx90a xnack+ + +Signed-off-by: Mika Laitio +--- + cmake/therock_sanitizers.cmake | 6 +++--- + rcb_config.sh | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/cmake/therock_sanitizers.cmake b/cmake/therock_sanitizers.cmake +index 318ab72..13773e4 100644 +--- a/cmake/therock_sanitizers.cmake ++++ b/cmake/therock_sanitizers.cmake +@@ -29,7 +29,7 @@ function(therock_sanitizer_configure + endif() + + # Our own toolchains get ASAN enabled consistently. +- # ASAN: Full host+device address sanitizer (xnack+ GPU targets for gfx942, gfx950) ++ # ASAN: Full host+device address sanitizer (xnack+ GPU targets for gfx90a, gfx942, gfx950) + # HOST_ASAN: Host-only address sanitizer (no device-side instrumentation) + set(_stanza) + if(_sanitizer STREQUAL "ASAN" OR _sanitizer STREQUAL "HOST_ASAN") +@@ -51,7 +51,7 @@ function(therock_sanitizer_configure + # Device-side ASAN: Only for full ASAN mode, not HOST_ASAN. + # Filter GPU_TARGETS to enable xnack+ mode only for gfx targets that support it. + if(_sanitizer STREQUAL "ASAN") +- string(APPEND _stanza "list(TRANSFORM GPU_TARGETS REPLACE \"^(gfx942|gfx950)$\" \"\\\\1:xnack+\")\n") ++ string(APPEND _stanza "list(TRANSFORM GPU_TARGETS REPLACE \"^(gfx90a|gfx942|gfx950)$\" \"\\\\1:xnack+\")\n") + string(APPEND _stanza "set(AMDGPU_TARGETS \"\${GPU_TARGETS}\")\n") + string(APPEND _stanza "message(STATUS \"Override ASAN GPU_TARGETS = \${GPU_TARGETS}\")\n") + else() +@@ -77,7 +77,7 @@ function(therock_sanitizer_configure + string(APPEND _stanza "add_link_options($<$:-fsanitize=thread>\n") + string(APPEND _stanza " $<$,$,$>>:-shared-libsan>)\n") + # Filter GPU_TARGETS to enable xnack+ mode only for gfx targets that support it. +- string(APPEND _stanza "list(TRANSFORM GPU_TARGETS REPLACE \"^(gfx942|gfx950)$\" \"\\\\1:xnack+\")\n") ++ string(APPEND _stanza "list(TRANSFORM GPU_TARGETS REPLACE \"^(gfx90a|gfx942|gfx950)$\" \"\\\\1:xnack+\")\n") + string(APPEND _stanza "set(AMDGPU_TARGETS \"\${GPU_TARGETS}\")\n") + string(APPEND _stanza "message(STATUS \"Override TSAN GPU_TARGETS = \${GPU_TARGETS}\")\n") + # Action at a distance: Signal that the sub-project should extend its build and install +diff --git a/rcb_config.sh b/rcb_config.sh +index afd7a6d..5c18937 100755 +--- a/rcb_config.sh ++++ b/rcb_config.sh +@@ -7,7 +7,7 @@ echo "rcb_config.sh python activated" + CMAKE_VERSION_OUTPUT=$(cmake --version) + echo "rcb_config.sh CMAKE_VERSION: ${CMAKE_VERSION_OUTPUT}" + echo "rcb_config.sh therock cmake config command started" +-cmake -B build -GNinja -DTHEROCK_AMDGPU_FAMILIES=${RCB_AMDGPU_TARGETS} . ++cmake -B build -GNinja -DTHEROCK_VERBOSE=1 -DTHEROCK_SANITIZER=ASAN -DTHEROCK_AMDGPU_FAMILIES=${RCB_AMDGPU_TARGETS} . + RES=$? + echo "rcb_config.sh therock cmake config command done, res: $RES" + exit $RES +-- +2.43.0 + diff --git a/patches/therock/release/therock/base/0006-rocm-systems-ASAN-patches.patch b/patches/therock/release/therock/base/0006-rocm-systems-ASAN-patches.patch new file mode 100644 index 0000000..e96cbac --- /dev/null +++ b/patches/therock/release/therock/base/0006-rocm-systems-ASAN-patches.patch @@ -0,0 +1,246 @@ +From ebad9f6fbafbe4b46f6f43fcc2dfdfe552d7d918 Mon Sep 17 00:00:00 2001 +From: Mika Laitio +Date: Mon, 9 Mar 2026 17:52:06 -0700 +Subject: [PATCH 6/8] rocm-systems ASAN patches + +Patches to fix linking errors on ASAN builds for +1) rocrtst +2) aqlprofile +3) roctracer + +Fixes following type of errors + +1) rocrtst +rocrtst ':xnack+" gpu-id parsing fix + +Parsing of the gpu id fails if the gpu-name +contains colon separated features lile ":xnack+" + +rocm-systems/projects/rocr-runtime/rocrtst/suites/test_common/kernels/cu_mask_kernels.cl:3:5: error: expected end of line in preprocessor expression +5.1 3 | #if ROCRTST_GPU < 0x1000 +5.1 | ^ +5.1 :1:26: note: expanded from macro 'ROCRTST_GPU' +5.1 1 | #define ROCRTST_GPU 0x950:xnack+ +5.1 | ^ +5.1 rocm-systems/projects/rocr-runtime/rocrtst/suites/test_common/kernels/cu_mask_kernels.cl:6:20: error: invalid token at start of a preprocessor expression +5.1 6 | #if (ROCRTST_GPU == 0x908) || (ROCRTST_GPU == 0x90a) || (ROCRTST_GPU == 0x940) +5.1 | ^ +5.1 2 errors generated. + +2) aqlprofiler + +46.5 ld.lld: error: undefined symbol: __asan_unregister_elf_globals +46.5 >>> referenced by workload.cpp +46.5 >>> test/integration/CMakeFiles/testv2.dir/workload.cpp.o:(asan.module_dtor) +46.5 +46.5 ld.lld: error: undefined symbol: __asan_stack_free_7 +46.5 >>> referenced by agent.cpp:162 +46.5 >>>(/therock/rocm-systems/projects/aqlprofile/test/integration/agent.cpp:162) +46.5 >>> test/integration/CMakeFiles/testv2.dir/agent.cpp.o: +46.5 >>> (AgentInfo::get_agent_handle_cb(hsa_agent_s, void*)) +46.5 >>> referenced by agent.cpp:162 +46.5 >>> (/therock/rocm-systems/projects/aqlprofile/test/integration/agent.cpp:162) +46.5 >>> test/integration/CMakeFiles/testv2.dir/agent.cpp.o: +46.5 >>>(AgentInfo::get_agent_handle_cb(hsa_agent_s, void*)) + +3) roctracer + +33.2 [40/42] Linking HIP executable test/MatrixTranspose_ctest +33.2 FAILED: test/MatrixTranspose_ctest +... +33.2 ld.lld: error: undefined symbol: __asan_option_detect_stack_use_after_return +33.2 >>> referenced by MatrixTranspose.c:46 (test/MatrixTranspose.c:46) +33.2 >>> test/CMakeFiles/MatrixTranspose_ctest.dir/MatrixTranspose.c.o:(SPRINT) +33.2 >>> referenced by MatrixTranspose.c:322 (test/MatrixTranspose.c:322) +33.2 >>> test/CMakeFiles/MatrixTranspose_ctest.dir/MatrixTranspose.c.o:(activity_callback) +33.2 >>> referenced by MatrixTranspose.c:353 (test/MatrixTranspose.c:353) +33.2 >>> test/CMakeFiles/MatrixTranspose_ctest.dir/MatrixTranspose.c.o:(init_tracing) +33.2 +33.2 ld.lld: error: undefined symbol: __asan_stack_malloc_1 +33.2 >>> referenced by MatrixTranspose.c:46 (test/MatrixTranspose.c:46) +33.2 >>> test/CMakeFiles/MatrixTranspose_ctest.dir/MatrixTranspose.c.o:(SPRINT) +33.2 >>> referenced by MatrixTranspose.c:353 (test/MatrixTranspose.c:353) +33.2 >>> test/CMakeFiles/MatrixTranspose_ctest.dir/MatrixTranspose.c.o:(init_tracing) + +Signed-off-by: Mika Laitio +--- + ...005-rocrtst-xnack-gpu-id-parsing-fix.patch | 53 +++++++++++++++++++ + .../0006-aqlprofile-linking-fix.patch | 46 ++++++++++++++++ + ...acer-ASAN-linking-error-fix-on-tests.patch | 52 ++++++++++++++++++ + 3 files changed, 151 insertions(+) + create mode 100644 patches/amd-mainline/rocm-systems/0005-rocrtst-xnack-gpu-id-parsing-fix.patch + create mode 100644 patches/amd-mainline/rocm-systems/0006-aqlprofile-linking-fix.patch + create mode 100644 patches/amd-mainline/rocm-systems/0007-roctracer-ASAN-linking-error-fix-on-tests.patch + +diff --git a/patches/amd-mainline/rocm-systems/0005-rocrtst-xnack-gpu-id-parsing-fix.patch b/patches/amd-mainline/rocm-systems/0005-rocrtst-xnack-gpu-id-parsing-fix.patch +new file mode 100644 +index 0000000..67c03a6 +--- /dev/null ++++ b/patches/amd-mainline/rocm-systems/0005-rocrtst-xnack-gpu-id-parsing-fix.patch +@@ -0,0 +1,53 @@ ++From 1976891520907e396e923f70735face30374f74c Mon Sep 17 00:00:00 2001 ++From: Mika Laitio ++Date: Mon, 9 Mar 2026 17:28:33 -0700 ++Subject: [PATCH] rocrtst ':xnack+" gpu-id parsing fix ++ ++Parsing of the gpu id fails if the gpu-name ++contains colon separated features lile ":xnack+" ++ ++rocm-systems/projects/rocr-runtime/rocrtst/suites/test_common/kernels/cu_mask_kernels.cl:3:5: error: expected end of line in preprocessor expression ++5.1 3 | #if ROCRTST_GPU < 0x1000 ++5.1 | ^ ++5.1 :1:26: note: expanded from macro 'ROCRTST_GPU' ++5.1 1 | #define ROCRTST_GPU 0x950:xnack+ ++5.1 | ^ ++5.1 rocm-systems/projects/rocr-runtime/rocrtst/suites/test_common/kernels/cu_mask_kernels.cl:6:20: error: invalid token at start of a preprocessor expression ++5.1 6 | #if (ROCRTST_GPU == 0x908) || (ROCRTST_GPU == 0x90a) || (ROCRTST_GPU == 0x940) ++5.1 | ^ ++5.1 2 errors generated. ++ ++Signed-off-by: Mika Laitio ++--- ++ .../rocrtst/suites/test_common/CMakeLists.txt | 10 +++++++++- ++ 1 file changed, 9 insertions(+), 1 deletion(-) ++ ++diff --git a/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt b/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt ++index 571ba709cb..4dc866a1b2 100644 ++--- a/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt +++++ b/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt ++@@ -404,6 +404,14 @@ function(build_kernel S_NAME TARG_DEV) ++ set(TARG_NAME "${S_NAME}_hsaco.${TARG_DEV}") ++ set(HSACO_TARG_LIST ${HSACO_TARG_LIST} "${KERNEL_DIR}/${SNAME_KERNEL}" PARENT_SCOPE) ++ string(SUBSTRING ${TARG_DEV} 3 -1 gfxNum) +++ # gpu-name stored to TARG_DEV may contain additional features after base name separated by semicolon. +++ # If the gpu name is for example: "gfx942:xnack+", then we need to remove also characters starting +++ # from the colon to be able to parse the GPU ID as a hex number. +++ string(FIND "${gfxNum}" ":" COLON_POS) +++ if(NOT COLON_POS EQUAL -1) +++ string(SUBSTRING "${gfxNum}" 0 ${COLON_POS} gfxNum) +++ endif() +++ message(STATUS "gfxNum: ${gfxNum}") ++ separate_arguments(CLANG_ARG_LIST UNIX_COMMAND ++ "-D ROCRTST_GPU=0x${gfxNum} -x cl -target amdgcn-amd-amdhsa -include ${OPENCL_INC_DIR}/opencl-c.h -mcpu=${TARG_DEV} ${BITCODE_ARGS} -cl-std=CL${OPENCL_VER} -mcode-object-version=4 ${CL_FILE_LIST} -o ${KERNEL_DIR}/${SNAME_KERNEL}") ++ add_custom_command(OUTPUT "${KERNEL_DIR}/${SNAME_KERNEL}" COMMAND ${CLANG} ${CLANG_ARG_LIST} DEPENDS ${CL_FILE_LIST} ${CLANG} COMMENT "BUILDING ${KERNEL_DIR}/${SNAME_KERNEL}" VERBATIM) ++@@ -693,4 +701,4 @@ install(TARGETS ${ROCRTST} ++ ++ install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/lib DESTINATION lib/rocrtst ) ++ ++-include ( CPack ) ++\ No newline at end of file +++include ( CPack ) ++-- ++2.43.0 ++ +diff --git a/patches/amd-mainline/rocm-systems/0006-aqlprofile-linking-fix.patch b/patches/amd-mainline/rocm-systems/0006-aqlprofile-linking-fix.patch +new file mode 100644 +index 0000000..36b8e13 +--- /dev/null ++++ b/patches/amd-mainline/rocm-systems/0006-aqlprofile-linking-fix.patch +@@ -0,0 +1,46 @@ ++From 618d2463e9969603db67d86ccd66b9299312a697 Mon Sep 17 00:00:00 2001 ++From: Mika Laitio ++Date: Mon, 9 Mar 2026 23:22:45 -0700 ++Subject: [PATCH] aqlprofile linking fix ++ ++Fixes linking errors on tests for ASAN builds. ++ ++46.5 ld.lld: error: undefined symbol: __asan_unregister_elf_globals ++46.5 >>> referenced by workload.cpp ++46.5 >>> test/integration/CMakeFiles/testv2.dir/workload.cpp.o:(asan.module_dtor) ++46.5 ++46.5 ld.lld: error: undefined symbol: __asan_stack_free_7 ++46.5 >>> referenced by agent.cpp:162 ++46.5 >>>(/therock/rocm-systems/projects/aqlprofile/test/integration/agent.cpp:162) ++46.5 >>> test/integration/CMakeFiles/testv2.dir/agent.cpp.o: ++46.5 >>> (AgentInfo::get_agent_handle_cb(hsa_agent_s, void*)) ++46.5 >>> referenced by agent.cpp:162 ++46.5 >>> (/therock/rocm-systems/projects/aqlprofile/test/integration/agent.cpp:162) ++46.5 >>> test/integration/CMakeFiles/testv2.dir/agent.cpp.o: ++46.5 >>>(AgentInfo::get_agent_handle_cb(hsa_agent_s, void*)) ++ ++Signed-off-by: Mika Laitio ++--- ++ projects/aqlprofile/test/integration/CMakeLists.txt | 6 ++++++ ++ 1 file changed, 6 insertions(+) ++ ++diff --git a/projects/aqlprofile/test/integration/CMakeLists.txt b/projects/aqlprofile/test/integration/CMakeLists.txt ++index 0eb5a927ce..e145ec576f 100644 ++--- a/projects/aqlprofile/test/integration/CMakeLists.txt +++++ b/projects/aqlprofile/test/integration/CMakeLists.txt ++@@ -63,6 +63,12 @@ add_executable(testv2) ++ target_sources(testv2 PRIVATE main.cpp workload.cpp counter.cpp agent.cpp) ++ target_include_directories(testv2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/core/include/ ${HSA_RUNTIME_INC_PATH} /opt/rocm/include) ++ target_link_libraries(testv2 PRIVATE hsa-runtime64::hsa-runtime64 ${AQLPROFILE_TARGET}) +++if ( ENABLE_ASAN_PACKAGING ) +++ message(STATUS "ENABLE_ASAN_PACKAGING") +++ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=address" ) +++ set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address" ) +++ set ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address" ) +++endif() ++ target_compile_definitions(testv2 PUBLIC AMD_INTERNAL_BUILD) ++ ++ # Add a PRELOAD environment with libintercept ++-- ++2.43.0 ++ +diff --git a/patches/amd-mainline/rocm-systems/0007-roctracer-ASAN-linking-error-fix-on-tests.patch b/patches/amd-mainline/rocm-systems/0007-roctracer-ASAN-linking-error-fix-on-tests.patch +new file mode 100644 +index 0000000..2a1f89e +--- /dev/null ++++ b/patches/amd-mainline/rocm-systems/0007-roctracer-ASAN-linking-error-fix-on-tests.patch +@@ -0,0 +1,52 @@ ++From 961f2ca98e50c6b3654a0ffab7c48340909c80ce Mon Sep 17 00:00:00 2001 ++From: Mika Laitio ++Date: Tue, 10 Mar 2026 12:54:17 -0700 ++Subject: [PATCH 3/3] roctracer ASAN linking error fix on tests ++ ++Fixes a following type of errors when ASAN is enabled. ++ ++33.2 [40/42] Linking HIP executable test/MatrixTranspose_ctest ++33.2 FAILED: test/MatrixTranspose_ctest ++... ++33.2 ld.lld: error: undefined symbol: __asan_option_detect_stack_use_after_return ++33.2 >>> referenced by MatrixTranspose.c:46 (test/MatrixTranspose.c:46) ++33.2 >>> test/CMakeFiles/MatrixTranspose_ctest.dir/MatrixTranspose.c.o:(SPRINT) ++33.2 >>> referenced by MatrixTranspose.c:322 (test/MatrixTranspose.c:322) ++33.2 >>> test/CMakeFiles/MatrixTranspose_ctest.dir/MatrixTranspose.c.o:(activity_callback) ++33.2 >>> referenced by MatrixTranspose.c:353 (test/MatrixTranspose.c:353) ++33.2 >>> test/CMakeFiles/MatrixTranspose_ctest.dir/MatrixTranspose.c.o:(init_tracing) ++33.2 ++33.2 ld.lld: error: undefined symbol: __asan_stack_malloc_1 ++33.2 >>> referenced by MatrixTranspose.c:46 (test/MatrixTranspose.c:46) ++33.2 >>> test/CMakeFiles/MatrixTranspose_ctest.dir/MatrixTranspose.c.o:(SPRINT) ++33.2 >>> referenced by MatrixTranspose.c:353 (test/MatrixTranspose.c:353) ++33.2 >>> test/CMakeFiles/MatrixTranspose_ctest.dir/MatrixTranspose.c.o:(init_tracing) ++ ++Signed-off-by: Mika Laitio ++--- ++ projects/roctracer/test/CMakeLists.txt | 9 +++++++++ ++ 1 file changed, 9 insertions(+) ++ ++diff --git a/projects/roctracer/test/CMakeLists.txt b/projects/roctracer/test/CMakeLists.txt ++index 95563d5b9f..b68e69bb00 100644 ++--- a/projects/roctracer/test/CMakeLists.txt +++++ b/projects/roctracer/test/CMakeLists.txt ++@@ -22,6 +22,15 @@ ++ ++ get_property(HSA_RUNTIME_INCLUDE_DIRECTORIES TARGET hsa-runtime64::hsa-runtime64 PROPERTY INTERFACE_INCLUDE_DIRECTORIES) ++ +++if ( ENABLE_ASAN_PACKAGING ) +++ message(STATUS "ENABLE_ASAN_PACKAGING") +++ #set ( CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG} -fno-omit-frame-pointer -fsanitize=address " ) +++ #set ( CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG "${CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG} -fsanitize=address " ) +++ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=address" ) +++ set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address" ) +++ set ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address" ) +++endif() +++ ++ # Set the HIP language runtime link flags as FindHIP does not set them. ++ set(CMAKE_EXECUTABLE_RUNTIME_HIP_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG}) ++ set(CMAKE_EXECUTABLE_RUNTIME_HIP_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP}) ++-- ++2.43.0 ++ +-- +2.43.0 + diff --git a/patches/therock/release/therock/base/0007-aqlprofile-and-roctracer-add-ASAN-build-check.patch b/patches/therock/release/therock/base/0007-aqlprofile-and-roctracer-add-ASAN-build-check.patch new file mode 100644 index 0000000..73d87b1 --- /dev/null +++ b/patches/therock/release/therock/base/0007-aqlprofile-and-roctracer-add-ASAN-build-check.patch @@ -0,0 +1,49 @@ +From f2a829ddc0779c10b71308eafba18724606fc766 Mon Sep 17 00:00:00 2001 +From: Mika Laitio +Date: Mon, 9 Mar 2026 23:23:19 -0700 +Subject: [PATCH 7/8] aqlprofile and roctracer add ASAN build check + +Fixes linking errors on tests when ASAN build is enabled. + +Signed-off-by: Mika Laitio +--- + profiler/CMakeLists.txt | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt +index 2215fb2..f20fc01 100644 +--- a/profiler/CMakeLists.txt ++++ b/profiler/CMakeLists.txt +@@ -23,6 +23,13 @@ if(THEROCK_ENABLE_ROCPROFV3) + list(APPEND _rocprofiler_sdk_optional_deps rocprof-trace-decoder) + endif() + ++ set(ENABLE_ASAN_PACKAGING OFF) ++ # Enable ASAN for Comgr when THEROCK_SANITIZER is set to ASAN or HOST_ASAN ++ if(THEROCK_SANITIZER STREQUAL "ASAN" OR THEROCK_SANITIZER STREQUAL "HOST_ASAN") ++ set(ENABLE_ASAN_PACKAGING ON) ++ message(STATUS "ENABLE_ASAN_PACKAGING for aqlprofile (THEROCK_SANITIZER=${THEROCK_SANITIZER})") ++ endif() ++ + ############################################################################## + # aqlprofile + ############################################################################## +@@ -33,6 +40,7 @@ if(THEROCK_ENABLE_ROCPROFV3) + BACKGROUND_BUILD + CMAKE_ARGS + -DAQLPROFILE_BUILD_TESTS=${THEROCK_BUILD_TESTING} ++ -DENABLE_ASAN_PACKAGING=${ENABLE_ASAN_PACKAGING} + -DHIP_PLATFORM="amd" + COMPILER_TOOLCHAIN + amd-hip +@@ -175,6 +183,7 @@ if(THEROCK_ENABLE_ROCPROFV3) + amd-hip + CMAKE_ARGS + -DHIP_PLATFORM=amd ++ -DENABLE_ASAN_PACKAGING=${ENABLE_ASAN_PACKAGING} + INTERFACE_INCLUDE_DIRS + # All old clients of roctx64 expect to just be able to find its include + # with no further qualification. Bad design, but also deprecated, so meh. +-- +2.43.0 + diff --git a/patches/therock/release/therock/base/0008-use-python-script-for-therock-instead-of-sh-bat.patch b/patches/therock/release/therock/base/0008-use-python-script-for-therock-instead-of-sh-bat.patch new file mode 100644 index 0000000..0908dfe --- /dev/null +++ b/patches/therock/release/therock/base/0008-use-python-script-for-therock-instead-of-sh-bat.patch @@ -0,0 +1,374 @@ +From 64db9ffa825bd1e712e146db4435ee1bcf7a1242 Mon Sep 17 00:00:00 2001 +From: Mika Laitio +Date: Tue, 10 Mar 2026 21:30:00 -0700 +Subject: [PATCH 8/8] use python script for therock instead of sh bat + +Combine rcb_pre_config, rcb_config and rcb_build +bat and sh files to python scripts so that same +file can be used both on linux and windows. + +Signed-off-by: Mika Laitio +--- + rcb_build.bat | 8 ----- + rcb_build.py | 44 ++++++++++++++++++++++++ + rcb_build.sh | 13 ------- + rcb_config.bat | 8 ----- + rcb_config.py | 64 ++++++++++++++++++++++++++++++++++ + rcb_config.sh | 13 ------- + rcb_pre_config.bat | 26 -------------- + rcb_pre_config.py | 86 ++++++++++++++++++++++++++++++++++++++++++++++ + rcb_pre_config.sh | 24 ------------- + 9 files changed, 194 insertions(+), 92 deletions(-) + delete mode 100644 rcb_build.bat + create mode 100644 rcb_build.py + delete mode 100755 rcb_build.sh + delete mode 100644 rcb_config.bat + create mode 100644 rcb_config.py + delete mode 100755 rcb_config.sh + delete mode 100644 rcb_pre_config.bat + create mode 100644 rcb_pre_config.py + delete mode 100755 rcb_pre_config.sh + +diff --git a/rcb_build.bat b/rcb_build.bat +deleted file mode 100644 +index a2fd930..0000000 +--- a/rcb_build.bat ++++ /dev/null +@@ -1,8 +0,0 @@ +-set "VENV_NAME=.venv" +-set "SCRIPT_DIR=%~dp0" +- +-cd /d "%SCRIPT_DIR%" +- +-echo Activating python virtual environment: "%VENV_NAME%" +-call "%VENV_NAME%\Scripts\activate.bat" +-cmake --build build +diff --git a/rcb_build.py b/rcb_build.py +new file mode 100644 +index 0000000..417e56a +--- /dev/null ++++ b/rcb_build.py +@@ -0,0 +1,44 @@ ++#!/usr/bin/env python3 ++ ++import os ++import platform ++import subprocess ++import sys ++ ++IS_WINDOWS = (platform.system() == "Windows") ++ ++ ++def activate_venv(venv_name): ++ venv_path = os.path.abspath(venv_name) ++ if IS_WINDOWS: ++ bin_dir = os.path.join(venv_path, "Scripts") ++ else: ++ bin_dir = os.path.join(venv_path, "bin") ++ if not os.path.isdir(bin_dir): ++ print(f"rcb_build.py python venv activation skipped ({bin_dir} not found)") ++ return ++ os.environ["VIRTUAL_ENV"] = venv_path ++ os.environ["PATH"] = bin_dir + os.pathsep + os.environ.get("PATH", "") ++ os.environ.pop("PYTHONHOME", None) ++ print(f"rcb_build.py python venv activated: {venv_path}") ++ ++ ++def main(): ++ script_dir = os.path.dirname(os.path.abspath(__file__)) ++ os.chdir(script_dir) ++ print(f"rcb_build.py current directory: {os.getcwd()}") ++ ++ activate_venv(".venv") ++ ++ result = subprocess.run(["cmake", "--version"], capture_output=True, text=True) ++ cmake_version = result.stdout.strip() ++ print(f"rcb_build.py CMAKE_VERSION: {cmake_version}") ++ ++ print("rcb_build.py therock cmake build command started") ++ result = subprocess.run(["cmake", "--build", "build"]) ++ print(f"rcb_build.py therock cmake build command done, res: {result.returncode}") ++ sys.exit(result.returncode) ++ ++ ++if __name__ == "__main__": ++ main() +diff --git a/rcb_build.sh b/rcb_build.sh +deleted file mode 100755 +index f5605ab..0000000 +--- a/rcb_build.sh ++++ /dev/null +@@ -1,13 +0,0 @@ +-#!/usr/bin/env bash +- +-export CUR_DIR=$PWD +-echo "rcb_build.sh current directory: $CUR_DIR" +-source ./.venv/bin/activate +-echo "rcb_build.sh python activated" +-CMAKE_VERSION_OUTPUT=$(cmake --version) +-echo "rcb_build.sh CMAKE_VERSION: ${CMAKE_VERSION_OUTPUT}" +-echo "rcb_build.sh therock cmake build command started" +-cmake --build build +-RES=$? +-echo "rcb_build.sh therock cmake build command done, res: $RES" +-exit $RES +diff --git a/rcb_config.bat b/rcb_config.bat +deleted file mode 100644 +index 39e807c..0000000 +--- a/rcb_config.bat ++++ /dev/null +@@ -1,8 +0,0 @@ +-set "VENV_NAME=.venv" +-set "SCRIPT_DIR=%~dp0" +- +-cd /d "%SCRIPT_DIR%" +- +-echo Activating python virtual environment: "%VENV_NAME%" +-call "%VENV_NAME%\Scripts\activate.bat" +-cmake -B build -GNinja -DTHEROCK_AMDGPU_TARGETS=%RCB_AMDGPU_TARGETS% . +diff --git a/rcb_config.py b/rcb_config.py +new file mode 100644 +index 0000000..27deff5 +--- /dev/null ++++ b/rcb_config.py +@@ -0,0 +1,64 @@ ++#!/usr/bin/env python3 ++ ++import os ++import platform ++import subprocess ++import sys ++ ++IS_WINDOWS = (platform.system() == "Windows") ++ ++def activate_venv(venv_name): ++ venv_path = os.path.abspath(venv_name) ++ if IS_WINDOWS: ++ bin_dir = os.path.join(venv_path, "Scripts") ++ else: ++ bin_dir = os.path.join(venv_path, "bin") ++ if not os.path.isdir(bin_dir): ++ print(f"rcb_config.py python venv activation skipped ({bin_dir} not found)") ++ return ++ os.environ["VIRTUAL_ENV"] = venv_path ++ os.environ["PATH"] = bin_dir + os.pathsep + os.environ.get("PATH", "") ++ os.environ.pop("PYTHONHOME", None) ++ print(f"rcb_config.py python venv activated: {venv_path}") ++ ++ ++def main(): ++ script_dir = os.path.dirname(os.path.abspath(__file__)) ++ os.chdir(script_dir) ++ print(f"rcb_config.py current directory: {os.getcwd()}") ++ ++ activate_venv(".venv") ++ ++ result = subprocess.run(["cmake", "--version"], capture_output=True, text=True) ++ cmake_version = result.stdout.strip() ++ print(f"rcb_config.py CMAKE_VERSION: {cmake_version}") ++ ++ amdgpu_targets = os.environ.get("RCB_AMDGPU_TARGETS", "") ++ cmake_cmd = [ ++ "cmake", ++ "-B", "build", ++ "-GNinja", ++ ] ++ cmake_cmd.append("-DTHEROCK_VERBOSE=1") ++ asan_gpu_families = {"gfx90a", "gfx942", "gfx950"} ++ sanitizer = os.environ.get("RCB_THEROCK_SANITIZER", "") ++ if sanitizer: ++ cmake_cmd.append(f"-DTHEROCK_SANITIZER={sanitizer}") ++ elif amdgpu_targets in asan_gpu_families: ++ answer = input(f"RCB_THEROCK_SANITIZER is not set and target is {amdgpu_targets}. " ++ "Enable ASAN build? [y/N]: ").strip().lower() ++ if answer == "y": ++ cmake_cmd.append("-DTHEROCK_SANITIZER=ASAN") ++ cmake_cmd.append(f"-DTHEROCK_AMDGPU_FAMILIES={amdgpu_targets}") ++ if IS_WINDOWS: ++ cmake_cmd.append("-DTHEROCK_AMDGPU_DIST_BUNDLE_NAME=windows") ++ cmake_cmd.append(".") ++ ++ print(f"rcb_config.py, config_cmd: {cmake_cmd}") ++ result = subprocess.run(cmake_cmd) ++ print(f"rcb_config.py therock config done, res: {result.returncode}") ++ sys.exit(result.returncode) ++ ++ ++if __name__ == "__main__": ++ main() +diff --git a/rcb_config.sh b/rcb_config.sh +deleted file mode 100755 +index 5c18937..0000000 +--- a/rcb_config.sh ++++ /dev/null +@@ -1,13 +0,0 @@ +-#!/usr/bin/env bash +- +-export CUR_DIR=$PWD +-echo "rcb_config.sh current directory: $CUR_DIR" +-source ./.venv/bin/activate +-echo "rcb_config.sh python activated" +-CMAKE_VERSION_OUTPUT=$(cmake --version) +-echo "rcb_config.sh CMAKE_VERSION: ${CMAKE_VERSION_OUTPUT}" +-echo "rcb_config.sh therock cmake config command started" +-cmake -B build -GNinja -DTHEROCK_VERBOSE=1 -DTHEROCK_SANITIZER=ASAN -DTHEROCK_AMDGPU_FAMILIES=${RCB_AMDGPU_TARGETS} . +-RES=$? +-echo "rcb_config.sh therock cmake config command done, res: $RES" +-exit $RES +diff --git a/rcb_pre_config.bat b/rcb_pre_config.bat +deleted file mode 100644 +index 09a68f8..0000000 +--- a/rcb_pre_config.bat ++++ /dev/null +@@ -1,26 +0,0 @@ +-set "VENV_NAME=.venv" +-set "SCRIPT_DIR=%~dp0" +- +-cd /d "%SCRIPT_DIR%" +- +-if not exist "%VENV_NAME%\Scripts\activate.bat" ( +- echo Creating python virtual environment: "%VENV_NAME%" +- python -m venv "%VENV_NAME%" +- if errorlevel 1 ( +- echo Error: Failed to create python virtual environment. Exiting. +- exit /b 1 +- ) +- echo Activating python virtual environment: "%VENV_NAME%" +- call "%VENV_NAME%\Scripts\activate.bat" +- python.exe -m pip install --upgrade pip +- pip install -r requirements.txt +- pip install windows-curses +- pip install "dvc[s3]" +- pip install "cmake>=3.28.0,<4.0.0" +- echo Python virtual environment created and enabled: "%VENV_NAME%" +-) else ( +- call "%VENV_NAME%\Scripts\activate.bat" +- echo Python virtual environment enabled: "%VENV_NAME%" +-) +-pip install "dvc[s3]" +-python ./build_tools/fetch_sources.py +diff --git a/rcb_pre_config.py b/rcb_pre_config.py +new file mode 100644 +index 0000000..9944be3 +--- /dev/null ++++ b/rcb_pre_config.py +@@ -0,0 +1,86 @@ ++#!/usr/bin/env python3 ++ ++import os ++import platform ++import subprocess ++import sys ++ ++IS_WINDOWS = (platform.system() == "Windows") ++ ++ ++def run_cmd(cmd, description=None, check=True): ++ if description: ++ print(f"rcb_pre_config.py {description}") ++ result = subprocess.run(cmd) ++ if check and result.returncode != 0: ++ print(f"rcb_pre_config.py command failed (res: {result.returncode}): {cmd}") ++ sys.exit(result.returncode) ++ return result.returncode ++ ++ ++def create_and_activate_venv(venv_name): ++ venv_path = os.path.abspath(venv_name) ++ if IS_WINDOWS: ++ bin_dir = os.path.join(venv_path, "Scripts") ++ else: ++ bin_dir = os.path.join(venv_path, "bin") ++ venv_exists = os.path.isdir(bin_dir) ++ if not venv_exists: ++ print(f"rcb_pre_config.py creating python virtual environment: {venv_name}") ++ python_cmd = "python" if IS_WINDOWS else "python3" ++ run_cmd([python_cmd, "-m", "venv", venv_name]) ++ os.environ["VIRTUAL_ENV"] = venv_path ++ os.environ["PATH"] = bin_dir + os.pathsep + os.environ.get("PATH", "") ++ os.environ.pop("PYTHONHOME", None) ++ print(f"rcb_pre_config.py python virtual environment activated: {venv_path}") ++ return venv_exists ++ ++ ++def install_packages(venv_already_existed): ++ if not venv_already_existed: ++ run_cmd([sys.executable, "-m", "pip", "install", "--upgrade", "pip"], ++ "upgrading pip") ++ run_cmd([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"], ++ "installing requirements.txt") ++ if IS_WINDOWS: ++ run_cmd([sys.executable, "-m", "pip", "install", "windows-curses"], ++ "installing windows-curses") ++ run_cmd([sys.executable, "-m", "pip", "install", "dvc[s3]"], ++ "installing dvc[s3]") ++ run_cmd([sys.executable, "-m", "pip", "install", "cmake>=3.28.0,<4.0.0"], ++ "installing cmake") ++ else: ++ run_cmd([sys.executable, "-m", "pip", "install", "dvc[s3]"], ++ "installing dvc[s3]") ++ ++ ++def fetch_sources(): ++ print("rcb_pre_config.py therock source fetch started") ++ res = run_cmd([sys.executable, "./build_tools/fetch_sources.py"], check=False) ++ if res != 0: ++ print(f"rcb_pre_config.py first attempt for submodule source code fetch failed: {res}") ++ print("rcb_pre_config.py resetting submodules and trying refresh again") ++ run_cmd(["git", "submodule", "foreach", "git", "reset", "--hard"], check=False) ++ res = run_cmd([sys.executable, "./build_tools/fetch_sources.py"], check=False) ++ return res ++ ++ ++def main(): ++ script_dir = os.path.dirname(os.path.abspath(__file__)) ++ os.chdir(script_dir) ++ print(f"rcb_pre_config.py current directory: {os.getcwd()}") ++ ++ venv_already_existed = create_and_activate_venv(".venv") ++ install_packages(venv_already_existed) ++ ++ result = subprocess.run(["cmake", "--version"], capture_output=True, text=True) ++ cmake_version = result.stdout.strip() ++ print(f"rcb_pre_config.py CMAKE_VERSION: {cmake_version}") ++ ++ res = fetch_sources() ++ print(f"rcb_pre_config.py done, res: {res}") ++ sys.exit(res) ++ ++ ++if __name__ == "__main__": ++ main() +diff --git a/rcb_pre_config.sh b/rcb_pre_config.sh +deleted file mode 100755 +index 29c47d2..0000000 +--- a/rcb_pre_config.sh ++++ /dev/null +@@ -1,24 +0,0 @@ +-#!/usr/bin/env bash +- +-export CUR_DIR=$PWD +-echo "rcb_pre_config.sh current directory: $CUR_DIR" +-python3 -m venv ./.venv && source ./.venv/bin/activate +-echo "rcb_pre_config.sh python activated" +-pip install --upgrade pip +-pip install -r ./requirements.txt +-pip install "dvc[s3]" +-pip install "cmake>=3.28.0,<4.0.0" +-CMAKE_VERSION_OUTPUT=$(cmake --version) +-echo "rcb_pre_config.sh CMAKE_VERSION: ${CMAKE_VERSION_OUTPUT}" +-echo "rcb_pre_config.sh therock source fetch started" +-python ./build_tools/fetch_sources.py +-RES=$? +-if [ $RES -ne 0 ]; then +- echo "First attempt for submodule source cofe fetch failed: $RES" +- echo "Resetting submodules and trying refresh again" +- git submodule foreach git reset --hard +- python ./build_tools/fetch_sources.py +- RES=$? +-fi +-echo "rcb_pre_config.sh, res: $RES" +-exit $RES +-- +2.49.0.windows.1 + diff --git a/rockbuilder.py b/rockbuilder.py index 1b3c534..e685527 100755 --- a/rockbuilder.py +++ b/rockbuilder.py @@ -407,8 +407,8 @@ def _check_cpu_count_env_variable(): def _check_distro_specific_environment_variables(): is_posix = not any(platform.win32_ver()) + distro_info = {} if is_posix: - distro_info = {} os_release_path = '/etc/os-release' if os.path.exists(os_release_path): try: