Skip to content

cmake: xt-ld: all builds fail, unknown CMake command "compiler_file_path" #95085

@laurenmurphyx64

Description

@laurenmurphyx64

Describe the bug

Unable to build with xt-ld toolchain due to use of compiler_file_path in cmake/linker/xt-ld/target.cmake causing the error "Unknown CMake command 'compiler_file_path'". Introduced by d77b58a in #94359.

I'm not well-versed in CMake and couldn't figure out how to fix this. Trying to add an include...

include(${TOOLCHAIN_ROOT}/cmake/compiler/target_template.cmake)

...only results in another error warning.

CMake Error at /home/laurenmu/zephyrproject/zephyr/cmake/compiler/target_template.cmake:16 (get_property):
  get_property could not find TARGET zephyr_interface.  Perhaps it has not
  yet been created.
Call Stack (most recent call first):
  /home/laurenmu/zephyrproject/zephyr/cmake/compiler/target_template.cmake:53 (compiler_simple_options)
  /home/laurenmu/zephyrproject/zephyr/cmake/linker/xt-ld/target.cmake:16 (compiler_file_path)
  /home/laurenmu/zephyrproject/zephyr/cmake/modules/FindTargetTools.cmake:104 (include)
  /home/laurenmu/zephyrproject/zephyr/cmake/modules/kernel.cmake:25 (find_package)
  /home/laurenmu/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:140 (include)
  /home/laurenmu/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/laurenmu/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)


CMake Error at /home/laurenmu/zephyrproject/zephyr/cmake/compiler/target_template.cmake:16 (get_property):
  get_property could not find TARGET zephyr_interface.  Perhaps it has not
  yet been created.
Call Stack (most recent call first):
  /home/laurenmu/zephyrproject/zephyr/cmake/compiler/target_template.cmake:53 (compiler_simple_options)
  /home/laurenmu/zephyrproject/zephyr/cmake/linker/xt-ld/target.cmake:17 (compiler_file_path)
  /home/laurenmu/zephyrproject/zephyr/cmake/modules/FindTargetTools.cmake:104 (include)
  /home/laurenmu/zephyrproject/zephyr/cmake/modules/kernel.cmake:25 (find_package)
  /home/laurenmu/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:140 (include)
  /home/laurenmu/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/laurenmu/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)

Regression

  • This is a regression.

Steps to reproduce

export XTENSA_TOOLCHAIN_PATH=$HOME/xtensa/XtDevTools/install/tools
export XTENSAD_LICENSE_FILE=[REDACTED]
export XTENSA_CORE=ace30_LX7HiFi4_PIF
export ZEPHYR_TOOLCHAIN_VARIANT=xt-clang
export TOOLCHAIN_VER=RI-2022.10-linux
west build -p -b intel_adsp/ace30/ptl/sim samples/hello_world

Relevant log output

-- west build: making build dir /home/laurenmu/zephyrproject/zephyr/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/laurenmu/zephyrproject/zephyr/samples/hello_world
-- CMake version: 3.28.3
-- Found Python3: /home/laurenmu/zephyrproject/.venv/bin/python3 (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter 
-- Cache files will be written to: /home/laurenmu/.cache/zephyr
-- Zephyr version: 4.2.99 (/home/laurenmu/zephyrproject/zephyr)
-- Found west (found suitable version "1.3.0", minimum required is "0.14.0")
-- Board: intel_adsp, qualifiers: ace30/ptl/sim
-- Found host-tools: zephyr 0.17.0 (/home/laurenmu/zephyr-sdk-0.17.0)
-- Found toolchain: xt-clang (/home/laurenmu/xtensa/XtDevTools/install/tools)
-- Found Dtc: /home/laurenmu/zephyr-sdk-0.17.0/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6") 
-- Found BOARD.dts: /home/laurenmu/zephyrproject/zephyr/boards/intel/adsp/intel_adsp_ace30_ptl_sim.dts
-- Generated zephyr.dts: /home/laurenmu/zephyrproject/zephyr/build/zephyr/zephyr.dts
-- Generated pickled edt: /home/laurenmu/zephyrproject/zephyr/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: /home/laurenmu/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/devicetree_generated.h
/home/laurenmu/zephyrproject/zephyr/build/zephyr/zephyr.dts:618.16-621.5: Warning (simple_bus_reg): /soc/timer: missing or empty reg/ranges property

warning: DAI_SSP_HAS_POWER_CONTROL (defined at boards/intel/adsp/Kconfig.defconfig:7,
drivers/dai/intel/ssp/Kconfig.ssp:16) was assigned the value 'y' but got the value 'n'. Check these
unsatisfied dependencies: (DAI_INTEL_SSP || (DAI_INTEL_SSP && DAI)) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_DAI_SSP_HAS_POWER_CONTROL and/or look up
DAI_SSP_HAS_POWER_CONTROL in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.

Parsing /home/laurenmu/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/laurenmu/zephyrproject/zephyr/boards/intel/adsp/intel_adsp_ace30_ptl_sim_defconfig'
Merged configuration '/home/laurenmu/zephyrproject/zephyr/samples/hello_world/prj.conf'
Configuration saved to '/home/laurenmu/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/laurenmu/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/autoconf.h'
CMake Error at /home/laurenmu/zephyrproject/zephyr/cmake/linker/xt-ld/target.cmake:16 (compiler_file_path):
  Unknown CMake command "compiler_file_path".
Call Stack (most recent call first):
  /home/laurenmu/zephyrproject/zephyr/cmake/modules/FindTargetTools.cmake:104 (include)
  /home/laurenmu/zephyrproject/zephyr/cmake/modules/kernel.cmake:25 (find_package)
  /home/laurenmu/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:140 (include)
  /home/laurenmu/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/laurenmu/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!

Impact

Major – Severely degrades functionality; workaround is difficult or unavailable.

Environment

  • OS: Ubuntu 24.04
  • SDK: host-tools: zephyr 0.17.0, xt-clang (see log above)
  • b50b5b4

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    RegressionSomething, which was working, does not anymorearea: Build Systemarea: ToolchainsToolchainsbugThe issue is a bug, or the PR is fixing a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions