Can't build Guiconfig in nRF Connect on Mac

I have nRF Connect SDK v2.6.1 installed on a Mac, the latest toolchain installed via nRF Connect for Desktop, and VSCode with all the nRF extensions.  Everything works pretty well except that I cannot build and run the guiconfig tool.  The Python terminal window shows the following results:

* Executing task: west build -d /Users/Glen/Documents/Projects/nordic/ncs-inter/inter_less1_exer2/build -t guiconfig

-- west build: running target guiconfig
[0/1] cd /Users/Glen/Documents/Projects/nordic/ncs-inter/inter_less1_exer2/bui....6.1/zephyr/scripts/kconfig/guiconfig.py /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
Traceback (most recent call last):
File "/opt/nordic/ncs/v2.6.1/zephyr/scripts/kconfig/guiconfig.py", line 2331, in <module>
_main()
File "/opt/nordic/ncs/v2.6.1/zephyr/scripts/kconfig/guiconfig.py", line 105, in _main
menuconfig(standard_kconfig(__doc__))
File "/opt/nordic/ncs/v2.6.1/zephyr/scripts/kconfig/guiconfig.py", line 183, in menuconfig
_create_ui()
File "/opt/nordic/ncs/v2.6.1/zephyr/scripts/kconfig/guiconfig.py", line 295, in _create_ui
_root = Tk()
File "/opt/nordic/ncs/toolchains/580e4ef81c/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 2270, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
/usr/local/Cellar/tcl-tk/8.6.11_1/lib/tcl8.6 /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/[email protected]/3.9.6/lib/tcl8.6 /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/[email protected]/lib/tcl8.6 /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/[email protected]/3.9.6/library /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/[email protected]/library /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/[email protected]/tcl8.6.11/library /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/tcl8.6.11/library



This probably means that Tcl wasn't installed properly.

FAILED: CMakeFiles/guiconfig /Users/Glen/Documents/Projects/nordic/ncs-inter/inter_less1_exer2/build/CMakeFiles/guiconfig
cd /Users/Glen/Documents/Projects/nordic/ncs-inter/inter_less1_exer2/build/zephyr/kconfig && /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/cmake/3.21.0/bin/cmake -E env ZEPHYR_BASE=/opt/nordic/ncs/v2.6.1/zephyr PYTHON_EXECUTABLE=/opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 srctree=/opt/nordic/ncs/v2.6.1/zephyr KERNELVERSION=0x3056300 APPVERSION= APP_VERSION_EXTENDED_STRING= APP_VERSION_TWEAK_STRING= CONFIG_=CONFIG_ KCONFIG_CONFIG=/Users/Glen/Documents/Projects/nordic/ncs-inter/inter_less1_exer2/build/zephyr/.config ARCH=arm ARCH_DIR=/opt/nordic/ncs/v2.6.1/zephyr/arch BOARD_DIR=/opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340 BOARD_REVISION= KCONFIG_BINARY_DIR=/Users/Glen/Documents/Projects/nordic/ncs-inter/inter_less1_exer2/build/Kconfig APPLICATION_SOURCE_DIR=/Users/Glen/Documents/Projects/nordic/ncs-inter/inter_less1_exer2 ZEPHYR_TOOLCHAIN_VARIANT=zephyr TOOLCHAIN_KCONFIG_DIR=/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/cmake/zephyr TOOLCHAIN_HAS_NEWLIB=y TOOLCHAIN_HAS_PICOLIBC=y HIDE_CHILD_PARENT_CONFIG= EDT_PICKLE=/Users/Glen/Documents/Projects/nordic/ncs-inter/inter_less1_exer2/build/zephyr/edt.pickle NCS_MEMFAULT_FIRMWARE_SDK_KCONFIG=/opt/nordic/ncs/v2.6.1/nrf/modules/memfault-firmware-sdk/Kconfig ZEPHYR_NRF_MODULE_DIR=/opt/nordic/ncs/v2.6.1/nrf ZEPHYR_MCUBOOT_MODULE_DIR=/opt/nordic/ncs/v2.6.1/bootloader/mcuboot ZEPHYR_MCUBOOT_KCONFIG=/opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/Kconfig ZEPHYR_MBEDTLS_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/crypto/mbedtls ZEPHYR_MBEDTLS_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/mbedtls/Kconfig ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m ZEPHYR_TRUSTED_FIRMWARE_M_KCONFIG=/opt/nordic/ncs/v2.6.1/nrf/modules/trusted-firmware-m/Kconfig ZEPHYR_PSA_ARCH_TESTS_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/tee/tf-m/psa-arch-tests ZEPHYR_CJSON_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/cjson ZEPHYR_CJSON_KCONFIG=/opt/nordic/ncs/v2.6.1/nrf/modules/cjson/Kconfig ZEPHYR_AZURE_SDK_FOR_C_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/azure-sdk-for-c ZEPHYR_AZURE_SDK_FOR_C_KCONFIG=/opt/nordic/ncs/v2.6.1/nrf/modules/azure-sdk-for-c/Kconfig ZEPHYR_CIRRUS_LOGIC_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/hal/cirrus-logic ZEPHYR_OPENTHREAD_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/openthread ZEPHYR_OPENTHREAD_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/openthread/Kconfig ZEPHYR_MEMFAULT_FIRMWARE_SDK_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/memfault-firmware-sdk ZEPHYR_CANOPENNODE_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/canopennode ZEPHYR_CANOPENNODE_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/canopennode/Kconfig ZEPHYR_CHRE_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/chre ZEPHYR_LZ4_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/lz4 ZEPHYR_LZ4_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/lz4/Kconfig ZEPHYR_NANOPB_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/nanopb ZEPHYR_NANOPB_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/nanopb/Kconfig ZEPHYR_TF_M_TESTS_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/tee/tf-m/tf-m-tests ZEPHYR_ZSCILIB_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/zscilib ZEPHYR_CMSIS_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/hal/cmsis ZEPHYR_CMSIS_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/cmsis/Kconfig ZEPHYR_CMSIS_DSP_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/cmsis-dsp ZEPHYR_CMSIS_DSP_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/cmsis-dsp/Kconfig ZEPHYR_CMSIS_NN_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/cmsis-nn ZEPHYR_CMSIS_NN_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/cmsis-nn/Kconfig ZEPHYR_FATFS_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/fs/fatfs ZEPHYR_FATFS_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/fatfs/Kconfig ZEPHYR_HAL_NORDIC_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/hal/nordic ZEPHYR_HAL_NORDIC_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/hal_nordic/Kconfig ZEPHYR_ST_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/hal/st ZEPHYR_HAL_WURTHELEKTRONIK_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/hal/wurthelektronik ZEPHYR_LIBMETAL_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/hal/libmetal ZEPHYR_LIBLC3_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/liblc3 ZEPHYR_LIBLC3_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/liblc3/Kconfig ZEPHYR_LITTLEFS_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/fs/littlefs ZEPHYR_LITTLEFS_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/littlefs/Kconfig ZEPHYR_LORAMAC_NODE_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/loramac-node ZEPHYR_LORAMAC_NODE_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/loramac-node/Kconfig ZEPHYR_LVGL_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/gui/lvgl ZEPHYR_LVGL_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/lvgl/Kconfig ZEPHYR_MIPI_SYS_T_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/debug/mipi-sys-t ZEPHYR_NRF_HW_MODELS_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/bsim_hw_models/nrf_hw_models ZEPHYR_OPEN_AMP_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/open-amp ZEPHYR_PICOLIBC_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/picolibc ZEPHYR_SEGGER_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/debug/segger ZEPHYR_SEGGER_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/segger/Kconfig ZEPHYR_TINYCRYPT_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/crypto/tinycrypt ZEPHYR_UOSCORE_UEDHOC_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/uoscore-uedhoc ZEPHYR_UOSCORE_UEDHOC_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/uoscore-uedhoc/Kconfig ZEPHYR_ZCBOR_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/zcbor ZEPHYR_ZCBOR_KCONFIG=/opt/nordic/ncs/v2.6.1/zephyr/modules/zcbor/Kconfig ZEPHYR_NRFXLIB_MODULE_DIR=/opt/nordic/ncs/v2.6.1/nrfxlib ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR=/opt/nordic/ncs/v2.6.1/modules/lib/matter SHIELD_AS_LIST= DTS_POST_CPP=/Users/Glen/Documents/Projects/nordic/ncs-inter/inter_less1_exer2/build/zephyr/zephyr.dts.pre DTS_ROOT_BINDINGS=/opt/nordic/ncs/v2.6.1/nrf/dts/bindings?/opt/nordic/ncs/v2.6.1/zephyr/dts/bindings /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 /opt/nordic/ncs/v2.6.1/zephyr/scripts/kconfig/guiconfig.py /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /Users/Glen/Documents/Projects/nordic/ncs-inter/inter_less1_exer2/build --target guiconfig

It appears to be looking for an init.tcl file that I confirmed is not in any of the directories listed.  I confirmed that Tcl is on my Mac, version 8.5.9.

Parents
  • Hi, 

    It might be an issue with your paths as this case indicated. If you still cannot fix the problem, I would suggest to use nRF Kconfig GUI or menuconfig. 

    Regards,
    Amanda H.

  • It would appear that your toolchain uses its own versions of python and tcl, so my paths shouldn't really matter.  And unlike the other case you referenced, I don't have any TCL... environment variables that might conflict.  It really seems like there is something wrong with the SDK toolchain for the Mac.  I installed the new v2.7.0 toolchain and it has the same problem as v2.6.1.

    Does anyone at Nordic have a MacOS setup so they can check if the Guiconfig (which runs Python code that uses Tk) works or not?

  • Saxman58 said:
    Does anyone at Nordic have a MacOS setup so they can check if the Guiconfig (which runs Python code that uses Tk) works or not?

    The developers are not able to reproduce your issue. See this post might help. 

  • That post was helpful, but it made it clear that this has been a problem for Mac users for a few years and Nordic still hasn't fixed the toolchain.  One of the users said that he solved the problem by adding a simlink, so I tried a similar fix and it worked, but is a fragile patch that will break and have to be redone whenever I update to a newer toolchain.  Here's the problem and fix:

    The SDK toolchain keeps looking for Tcl 8.6.11_1 in my /usr/local/Cellar/tcl-tk directory, outside of the toolchain directories.  I have a newer version of tcl-tk there (8.6.14).  The Tcl the toolchain should be using is the one in the toolchain directories, not my setup.  So I created a simlink to redirect the toolchain back to its own Tcl setup that it should have been using to begin with.  In this case, for the 2.6.1 toolchain (580e4ef81c) this fixed the problem:

    ln -s /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/tcl-tk/8.6.11_1 /usr/local/Cellar/tcl-tk/8.6.11_1

    But as you can see, the simlink will need to be changed if I change the toolchain.  This is not ideal.

    I agree with the commentor from the post you linked that your Mac developers probably don't see the same problem as us users because they have the required 8.6.11_1 in their own /usr/local/Cellar/tcl-tk directory, so that masks the problem that the toolchain is pointing to a directory outside of the toolchain folders and thus not guaranteed to exist on user's Macs.  It should instead look within the toolchain where it knows the required Tcl files will exist.

  • Thanks for the feedback. I have forward it to the team. 

Reply Children
No Data
Related