<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Build fail - Python version</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94342/build-fail---python-version</link><description>We are currently using NCS V2.0.0 to compile a project for an nRF9160. I need to create a build script for compiling the code. When I compile from VSCode everything works. Next I use nRF Connect for Desktop, Toolchain Manager and the down arrow next to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 04 Dec 2022 02:03:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94342/build-fail---python-version" /><item><title>RE: Build fail - Python version</title><link>https://devzone.nordicsemi.com/thread/398871?ContentTypeID=1</link><pubDate>Sun, 04 Dec 2022 02:03:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3969cf3-2d2d-4e6c-b56b-94c200d902b4</guid><dc:creator>hjetschko</dc:creator><description>&lt;p&gt;Hi Einar.&lt;/p&gt;
&lt;p&gt;Thank you, this solution worked very well.&lt;/p&gt;
&lt;p&gt;Regards, Hubert&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build fail - Python version</title><link>https://devzone.nordicsemi.com/thread/398533?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 12:47:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66ff5794-b318-442c-b800-75d031b7de51</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;This turns out to be caused by the TF-M build system using its own build environment, so the Python version has to be set for that as well.&lt;/p&gt;
&lt;p&gt;To do this, add these lines to ncs/[version]/nrf/modules/tfm/zephyr/CMakeLists.txt :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/commit/da20df3f5a59e26ea0887e2944e70af6d3e71ae7"&gt;https://github.com/nrfconnect/sdk-nrf/commit/da20df3f5a59e26ea0887e2944e70af6d3e71ae7&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This issue is fixed in the NCS 2.2.0 release.&lt;/p&gt;
&lt;p&gt;-Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build fail - Python version</title><link>https://devzone.nordicsemi.com/thread/398413?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2022 20:27:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f776fc3-5d81-4cd9-8f3c-f06d6dcd4ea8</guid><dc:creator>hjetschko</dc:creator><description>&lt;p&gt;Hi Einar. Thank you for the reply. I tested this, please see the new command below:&lt;/p&gt;
&lt;p&gt;west build --build-dir c:\Test\V20\build_cmd c:\Test\V20 --pristine --board nrf9160dk_nrf9160_ns -- -DNCS_TOOLCHAIN_VERSION:STRING=&amp;quot;NONE&amp;quot; -DCONF_FILE:STRING=&amp;quot;c:/Test/V20/prj.conf&amp;quot; -DPYTHON_EXECUTABLE:FILEPATH=&amp;quot;c:/ncs/toolchains/v2.0.0/opt/bin/python.exe&amp;quot;&lt;/p&gt;
&lt;p&gt;Unfortunately I get the same result. If you try to compile at_client with this command, does it work for you?&lt;/p&gt;
&lt;p&gt;Hubert&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build fail - Python version</title><link>https://devzone.nordicsemi.com/thread/398285?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2022 10:20:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47b03fa6-23bc-4949-ba67-9ef616c4d2f5</guid><dc:creator>Einarh</dc:creator><description>[quote user="hjetschko"]Found Python3: C:/Python310/python.exe (found version &amp;quot;3.10.5&amp;quot;) found components: Interpreter[/quote]
&lt;p&gt;I believe this is your issue, CMake is trying to use the wrong Python version, even though Zephyr finds the correct version in the start of your log:&lt;/p&gt;
[quote user="hjetschko"]Found Python3: C:/ncs/toolchains/v2.0.0/opt/bin/python.exe (found suitable exact version &amp;quot;3.8.2&amp;quot;) found components: Interpreter[/quote]
&lt;p&gt;You could try adding&amp;nbsp;&lt;span&gt;&lt;code&gt;-DPYTHON_EXECUTABLE:FILEPATH=&amp;quot;c:/ncs/toolchains/v2.0.0/opt/bin/python.exe&amp;quot;&lt;/code&gt; to your west build command.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Einar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build fail - Python version</title><link>https://devzone.nordicsemi.com/thread/398208?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 21:41:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d21fea63-3382-4f55-af24-0d92bc615e39</guid><dc:creator>hjetschko</dc:creator><description>&lt;p&gt;Hi Einar&lt;br /&gt;Thank you for helping me with this.&amp;nbsp;Currently we are&amp;nbsp;using V2.1.0 for everything. I did the following experiment:&lt;/p&gt;
&lt;p&gt;Created 2 folders:&lt;/p&gt;
&lt;p&gt;C:\Test\v20&lt;br /&gt;C:\Test\v21&lt;br /&gt;Into v20 I copied&amp;nbsp;C:\ncs\v2.0.0\nrf\samples\nrf9160\at_client and into v21 I copied&amp;nbsp;C:\ncs\v2.1.0\nrf\samples\nrf9160\at_client&lt;/p&gt;
&lt;p&gt;For v20, when I compile it in VSCode everthing works. Next I opened command prompt in Toolchain manager next to nRF Connect SDK v2.0.0. I copied the build command from VSCode and changed the build output folder:&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Microsoft Windows [Version 10.0.22000.1219]&lt;br /&gt;(c) Microsoft Corporation. All rights reserved.&lt;/p&gt;
&lt;p&gt;C:\ncs\v2.0.0&amp;gt;cd \test\v20&lt;/p&gt;
&lt;p&gt;C:\Test\V20&amp;gt;west build --build-dir c:\Test\V20\build_cmd c:\Test\V20 --pristine --board nrf9160dk_nrf9160_ns -- -DNCS_TOOLCHAIN_VERSION:STRING=&amp;quot;NONE&amp;quot; -DCONF_FILE:STRING=&amp;quot;c:/Test/V20/prj.conf&amp;quot;&lt;br /&gt;-- west build: generating a build system&lt;br /&gt;Loading Zephyr default modules (Zephyr base).&lt;br /&gt;-- Application: C:/Test/V20&lt;br /&gt;-- Found Python3: C:/ncs/toolchains/v2.0.0/opt/bin/python.exe (found suitable exact version &amp;quot;3.8.2&amp;quot;) found components: Interpreter&lt;br /&gt;-- Cache files will be written to: C:/ncs/v2.0.0/zephyr/.cache&lt;br /&gt;-- Zephyr version: 3.0.99 (C:/ncs/v2.0.0/zephyr)&lt;br /&gt;-- Found west (found suitable version &amp;quot;0.13.1&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)&lt;br /&gt;-- Board: nrf9160dk_nrf9160_ns, Revision: 0.7.0&lt;br /&gt;-- Found host-tools: zephyr 0.14.1 (C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk)&lt;br /&gt;-- Found dtc: C:/ncs/toolchains/v2.0.0/opt/bin/dtc.exe (found suitable version &amp;quot;1.4.7&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)&lt;br /&gt;-- Found toolchain: zephyr 0.14.1 (C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk)&lt;br /&gt;-- Found BOARD.dts: C:/ncs/v2.0.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts&lt;br /&gt;-- Generated zephyr.dts: C:/Test/V20/build_cmd/zephyr/zephyr.dts&lt;br /&gt;-- Generated devicetree_unfixed.h: C:/Test/V20/build_cmd/zephyr/include/generated/devicetree_unfixed.h&lt;br /&gt;-- Generated device_extern.h: C:/Test/V20/build_cmd/zephyr/include/generated/device_extern.h&lt;br /&gt;-- Including generated dts.cmake file: C:/Test/V20/build_cmd/zephyr/dts.cmake&lt;br /&gt;Parsing C:/ncs/v2.0.0/zephyr/Kconfig&lt;br /&gt;Loaded configuration &amp;#39;C:/ncs/v2.0.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_defconfig&amp;#39;&lt;br /&gt;Merged configuration &amp;#39;c:/Test/V20/prj.conf&amp;#39;&lt;br /&gt;Configuration saved to &amp;#39;C:/Test/V20/build_cmd/zephyr/.config&amp;#39;&lt;br /&gt;Kconfig header saved to &amp;#39;C:/Test/V20/build_cmd/zephyr/include/generated/autoconf.h&amp;#39;&lt;/p&gt;
&lt;p&gt;warning: Experimental symbol NET_SOCKETS_OFFLOAD is enabled.&lt;/p&gt;
&lt;p&gt;-- The C compiler identification is GNU 10.3.0&lt;br /&gt;-- The CXX compiler identification is GNU 10.3.0&lt;br /&gt;-- The ASM compiler identification is GNU&lt;br /&gt;-- Found assembler: C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe&lt;br /&gt;CMake Warning at C:/ncs/v2.0.0/zephyr/CMakeLists.txt:1803 (message):&lt;br /&gt;__ASSERT() statements are globally ENABLED&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Dropping partition &amp;#39;nrf_modem_lib_trace&amp;#39; since its size is 0.&lt;br /&gt;Dropping partition &amp;#39;nonsecure_storage&amp;#39; since it is empty.&lt;br /&gt;-- Configuring done&lt;br /&gt;-- Generating done&lt;br /&gt;-- Build files have been written to: C:/Test/V20/build_cmd&lt;br /&gt;-- west build: building application&lt;br /&gt;[5/246] Generating include/generated/version.h&lt;br /&gt;-- Zephyr version: 3.0.99 (C:/ncs/v2.0.0/zephyr), build: v3.0.99-ncs1&lt;br /&gt;[55/246] Generating ../../tfm/CMakeCache.txt&lt;br /&gt;&lt;span style="background-color:#ff0000;"&gt;FAILED: tfm/CMakeCache.txt&lt;/span&gt;&lt;br /&gt;cmd.exe /C &amp;quot;cd /D C:\Test\V20\build_cmd\tfm &amp;amp;&amp;amp; C:\ncs\toolchains\v2.0.0\opt\bin\cmake.exe -GNinja -DTFM_TOOLCHAIN_FILE=C:/ncs/v2.0.0/modules/tee/tf-m/trusted-firmware-m/toolchain_GNUARM.cmake -DCROSS_COMPILE=C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi -DCMAKE_BUILD_TYPE=MinSizeRel -DTFM_PLATFORM=C:/ncs/v2.0.0/nrf/modules/tfm/tfm/boards/nrf9160 -DTFM_LIB_MODEL=OFF -DBL2=FALSE -DMCUBOOT_IMAGE_NUMBER=1 -DTFM_EXCEPTION_INFO_DUMP=OFF -DTFM_PARTITION_LOG_LEVEL=TFM_PARTITION_LOG_LEVEL_SILENCE -DTFM_SPM_LOG_LEVEL=TFM_SPM_LOG_LEVEL_SILENCE -DTFM_PARTITION_PROTECTED_STORAGE=OFF -DTFM_PARTITION_INTERNAL_TRUSTED_STORAGE=OFF -DTFM_PARTITION_CRYPTO=ON -DTFM_PARTITION_INITIAL_ATTESTATION=OFF -DTFM_PARTITION_PLATFORM=ON -DTFM_PARTITION_AUDIT_LOG=OFF -DTFM_PARTITION_FIRMWARE_UPDATE=OFF -DCRYPTO_RNG_MODULE_DISABLED=FALSE -DCRYPTO_KEY_MODULE_DISABLED=TRUE -DCRYPTO_AEAD_MODULE_DISABLED=TRUE -DCRYPTO_MAC_MODULE_DISABLED=TRUE -DCRYPTO_HASH_MODULE_DISABLED=TRUE -DCRYPTO_CIPHER_MODULE_DISABLED=TRUE -DCRYPTO_ASYM_ENCRYPT_MODULE_DISABLED=TRUE -DCRYPTO_ASYM_SIGN_MODULE_DISABLED=TRUE -DCRYPTO_KEY_DERIVATION_MODULE_DISABLED=TRUE -DHAL_NORDIC_PATH=C:/ncs/v2.0.0/modules/hal/nordic -DNRF_ALLOW_NON_SECURE_RESET=ON -DCONFIG_TFM_HALT_ON_CORE_PANIC= -DSECURE_UART1=OFF -DNRF_DIR=C:/ncs/v2.0.0/nrf -DZEPHYR_BASE=C:/ncs/v2.0.0/zephyr -DCRYPTO_HW_ACCELERATOR=True -DPLATFORM_DEFAULT_UART_STDOUT=OFF -DPLATFORM_DEFAULT_ATTEST_HAL=OFF -DPLATFORM_DEFAULT_CRYPTO_KEYS=OFF -DPLATFORM_DEFAULT_ROTPK=OFF -DPLATFORM_DEFAULT_IAK=OFF -DPLATFORM_DEFAULT_NV_SEED=OFF -DPLATFORM_DEFAULT_OTP=OFF -DPLATFORM_DEFAULT_OTP_WRITEABLE=OFF -DPLATFORM_DEFAULT_PROVISIONING=OFF -DTFM_DUMMY_PROVISIONING=OFF -DCRYPTO_NV_SEED=OFF -DPLATFORM_NV_COUNTER_MODULE_DISABLED=TRUE -DPLATFORM_DEFAULT_NV_COUNTERS=OFF -DCRYPTO_STORAGE_DISABLED=TRUE -DCRYPTO_ENGINE_BUF_SIZE=1 -DNRF_SECURITY_SETTINGS=&amp;quot;ZEPHYR_DOTCONFIG=C:/Test/V20/build_cmd/zephyr/.config GCC_M_CPU=cortex-m33 ARM_MBEDTLS_PATH=C:/ncs/v2.0.0/mbedtls ZEPHYR_AUTOCONF=C:/Test/V20/build_cmd/zephyr/include/generated/autoconf.h&amp;quot; -DTFM_MBEDCRYPTO_CONFIG_PATH:STRING=nrf-config.h -DTFM_MBEDCRYPTO_PLATFORM_EXTRA_CONFIG_PATH:STRING=nrf-config-user.h -DTFM_TEST_REPO_PATH=C:/ncs/v2.0.0/modules/tee/tf-m/tf-m-tests -DMBEDCRYPTO_PATH=C:/ncs/v2.0.0/nrfxlib/nrf_security/tfm -DPSA_ARCH_TESTS_PATH=C:/ncs/v2.0.0/modules/tee/tf-m/psa-arch-tests C:/ncs/v2.0.0/modules/tee/tf-m/trusted-firmware-m&amp;quot;&lt;br /&gt;-- The C compiler identification is GNU 10.3.0&lt;br /&gt;-- The ASM compiler identification is GNU&lt;br /&gt;-- Found assembler: C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe&lt;br /&gt;-- Found Python3: C:/Python310/python.exe (found version &amp;quot;3.10.5&amp;quot;) found components: Interpreter&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt;File &amp;quot;C:\ncs\v2.0.0\modules\tee\tf-m\trusted-firmware-m\tools\tfm_parse_manifest_list.py&amp;quot;, line 12, in &amp;lt;module&amp;gt;&lt;br /&gt;from jinja2 import Environment, BaseLoader, select_autoescape, TemplateNotFound&lt;br /&gt;File &amp;quot;C:\ncs\toolchains\v2.0.0\opt\bin\Lib\site-packages\jinja2\__init__.py&amp;quot;, line 12, in &amp;lt;module&amp;gt;&lt;br /&gt;from .environment import Environment&lt;br /&gt;File &amp;quot;C:\ncs\toolchains\v2.0.0\opt\bin\Lib\site-packages\jinja2\environment.py&amp;quot;, line 46, in &amp;lt;module&amp;gt;&lt;br /&gt;from .lexer import get_lexer&lt;br /&gt;File &amp;quot;C:\ncs\toolchains\v2.0.0\opt\bin\Lib\site-packages\jinja2\lexer.py&amp;quot;, line 46, in &amp;lt;module&amp;gt;&lt;br /&gt;compile(&amp;quot;f├╖├╖&amp;quot;, &amp;quot;&amp;lt;unknown&amp;gt;&amp;quot;, &amp;quot;eval&amp;quot;)&lt;br /&gt;ImportError: Module use of python38.dll conflicts with this version of Python.&lt;br /&gt;CMake Error at tools/CMakeLists.txt:132 (message):&lt;br /&gt;File generation failed&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;-- Configuring incomplete, errors occurred!&lt;br /&gt;See also &amp;quot;C:/Test/V20/build_cmd/tfm/CMakeFiles/CMakeOutput.log&amp;quot;.&lt;br /&gt;See also &amp;quot;C:/Test/V20/build_cmd/tfm/CMakeFiles/CMakeError.log&amp;quot;.&lt;br /&gt;ninja: build stopped: subcommand failed.&lt;br /&gt;FATAL ERROR: command exited with status 1: &amp;#39;C:\ncs\toolchains\v2.0.0\opt\bin\cmake.EXE&amp;#39; --build &amp;#39;c:\Test\V20\build_cmd&amp;#39;&lt;/p&gt;
&lt;p&gt;C:\Test\V20&amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;It looks like it always fail while compiling TFM as part of the project. When I compare the&amp;nbsp;build_vs\tfm\CMakeCache.txt and&amp;nbsp;build_cmd\tfm\CMakeCache.txt there are a couple of differences but the one that I think gives the biggest clue is in the VSCode one there is this line:&lt;/p&gt;
&lt;p&gt;//Path to a program.&lt;br /&gt;PYTHON_PREFER_EXECUTABLE:FILEPATH=C:/ncs/toolchains/v2.0.0/opt/bin/python.exe&lt;/p&gt;
&lt;p&gt;This line is missing in in the build_cmd folder. I have attached both files.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried the same with V2.1.0 and I get the same results.&lt;/p&gt;
&lt;p&gt;Thanks again for looking into this.&lt;/p&gt;
&lt;p&gt;Hubert&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/CMakeCache_5F00_buildvs.txt"&gt;devzone.nordicsemi.com/.../CMakeCache_5F00_buildvs.txt&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/CMakeCache_5F00_buildcmd.txt"&gt;devzone.nordicsemi.com/.../CMakeCache_5F00_buildcmd.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build fail - Python version</title><link>https://devzone.nordicsemi.com/thread/398043?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 09:41:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dc9b678-ab67-408a-8b1b-217a64d94ef3</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;Is it correct that you are using 2.0.0 in VS Code and 2.1.0 in the command prompt?&lt;/p&gt;
&lt;p&gt;If this is correct, have you tried using 2.0.0 in the command prompt also?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>