Summary
src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt references the wrong CMake variable in its XRT_EDGE branch, causing the configure step to fail for any build that sets -DXRT_EDGE=ON. The non-edge / native PCIe build path is unaffected. Reproduced against current master as well as the 202610.2.23.0_Canonical tag.
Reproduction
Configure XRT with XRT_EDGE enabled — anything that exercises the edge build path triggers it. Minimal repro on a native arm64 host (also reproduces via cross-compile or by manually forcing -DXRT_EDGE=ON):
$ cmake -S src -B build -DXRT_EDGE=ON -DXRT_AIE_BUILD=ON
...
-- add_subdirectory(xbmgmt2)
CMake Error at xrt/XRT/src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt:68 (target_compile_definitions):
Cannot specify compile definitions for target "PRIVATE" which is not built
by this project.
Root cause
src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt:68:
if (NOT XRT_EDGE)
target_compile_definitions(${XBMGMT2_NAME} PRIVATE ENABLE_NATIVE_SUBCMDS_AND_REPORTS)
else()
target_compile_definitions(${XBUTIL2_NAME} PRIVATE ENABLE_DEFAULT_ONE_DEVICE_OPTION)
endif()
XBUTIL2_NAME is set in the sibling src/runtime_src/core/tools/xbutil2/CMakeLists.txt:63 (set(XBUTIL2_NAME "xrt-smi")) — that's a directory-local scope and is not visible inside xbmgmt2/. In this scope the variable expands to an empty string, and CMake parses the call as target_compile_definitions(PRIVATE ENABLE_DEFAULT_ONE_DEVICE_OPTION), which fails because there's no target name.
The if (NOT XRT_EDGE) branch on line 66 correctly uses ${XBMGMT2_NAME}, so this looks like a copy/paste from xbutil2/CMakeLists.txt:78 where the variable rename was missed.
Impact
- Any configure with
-DXRT_EDGE=ON fails before generation completes — the build doesn't produce xbmgmt, xrt-smi, or any other target in runtime_src.
- Native PCIe builds (
-DXRT_EDGE unset / OFF) are not affected: the else-branch isn't entered.
- Affects current
master and the 202610.2.23.0_Canonical release tag (and presumably every earlier release where the XRT_EDGE branch existed in this file).
Suggested fix
--- a/src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt
+++ b/src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt
@@ -65,7 +65,7 @@ add_executable(${XBMGMT2_NAME} ${XBMGMT_V2_SRCS})
if (NOT XRT_EDGE)
target_compile_definitions(${XBMGMT2_NAME} PRIVATE ENABLE_NATIVE_SUBCMDS_AND_REPORTS)
else()
- target_compile_definitions(${XBUTIL2_NAME} PRIVATE ENABLE_DEFAULT_ONE_DEVICE_OPTION)
+ target_compile_definitions(${XBMGMT2_NAME} PRIVATE ENABLE_DEFAULT_ONE_DEVICE_OPTION)
endif()
Environment
- Distro: Ubuntu 26.04 LTS (arm64)
- CMake: 4.1.2
- XRT tag:
202610.2.23.0_Canonical (also reproduced on master HEAD)
- Reproducer:
cmake -DXRT_EDGE=ON -DXRT_AIE_BUILD=ON (sbuild / native build, no cross-compile required to trigger the configure-time error)
Reported while packaging XRT for Ubuntu (source package xrt).
Summary
src/runtime_src/core/tools/xbmgmt2/CMakeLists.txtreferences the wrong CMake variable in itsXRT_EDGEbranch, causing the configure step to fail for any build that sets-DXRT_EDGE=ON. The non-edge / native PCIe build path is unaffected. Reproduced against currentmasteras well as the202610.2.23.0_Canonicaltag.Reproduction
Configure XRT with
XRT_EDGEenabled — anything that exercises the edge build path triggers it. Minimal repro on a native arm64 host (also reproduces via cross-compile or by manually forcing-DXRT_EDGE=ON):Root cause
src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt:68:XBUTIL2_NAMEis set in the siblingsrc/runtime_src/core/tools/xbutil2/CMakeLists.txt:63(set(XBUTIL2_NAME "xrt-smi")) — that's a directory-local scope and is not visible insidexbmgmt2/. In this scope the variable expands to an empty string, and CMake parses the call astarget_compile_definitions(PRIVATE ENABLE_DEFAULT_ONE_DEVICE_OPTION), which fails because there's no target name.The
if (NOT XRT_EDGE)branch on line 66 correctly uses${XBMGMT2_NAME}, so this looks like a copy/paste fromxbutil2/CMakeLists.txt:78where the variable rename was missed.Impact
-DXRT_EDGE=ONfails before generation completes — the build doesn't producexbmgmt,xrt-smi, or any other target inruntime_src.-DXRT_EDGEunset /OFF) are not affected: the else-branch isn't entered.masterand the202610.2.23.0_Canonicalrelease tag (and presumably every earlier release where theXRT_EDGEbranch existed in this file).Suggested fix
Environment
202610.2.23.0_Canonical(also reproduced onmasterHEAD)cmake -DXRT_EDGE=ON -DXRT_AIE_BUILD=ON(sbuild / native build, no cross-compile required to trigger the configure-time error)Reported while packaging XRT for Ubuntu (source package
xrt).