<?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>Cannot Replicate Build in Docker Environment</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84013/cannot-replicate-build-in-docker-environment</link><description>I&amp;#39;m working on automating some of our builds for the nRF5340 in our CI, and 
 
 Currently, we can build these locally (on MacOS) with the NCS Connect VSCode toolchain, version 1.4.99-dev1 (historical reasons). 
 
 I&amp;#39;m able to demonstrate builds from command</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Jan 2022 07:23:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84013/cannot-replicate-build-in-docker-environment" /><item><title>RE: Cannot Replicate Build in Docker Environment</title><link>https://devzone.nordicsemi.com/thread/349872?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 07:23:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f238f77f-ddb2-419a-8c7b-fecb138f5a3b</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote userid="112940" url="~/f/nordic-q-a/84013/cannot-replicate-build-in-docker-environment/349848#349848"]Are there other&amp;nbsp;differences that app developers should be aware of when trying to move a project build to CI? [/quote]
&lt;p&gt;As you say, we do not have any documentation on this at this moment. &lt;/p&gt;
&lt;p&gt;If you or anyone else struggle with using the nRF Connect SDK as for CI, feel free to open a new DevZone ticket, and we will assist with your issues.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot Replicate Build in Docker Environment</title><link>https://devzone.nordicsemi.com/thread/349848?ContentTypeID=1</link><pubDate>Wed, 26 Jan 2022 20:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a7fcc7a-e9e2-4cd1-9d82-eea9e5b0baa2</guid><dc:creator>milburn_lge</dc:creator><description>&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/members/sigurd-hellesvik"&gt;Sigurd Hellesvik&lt;/a&gt; thanks for the suggestion!&lt;br /&gt;&lt;br /&gt;Before I was able to try that out, I saw one item that looked interesting in the sample projects.&amp;nbsp;Many have &lt;code&gt;source &amp;quot;Kconfig.zephyr&amp;quot;&lt;/code&gt; at the top of the Kconfig file. I did not have that in my project.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I added it, and the build started working in Docker. Keep in mind, there were no other changes to the project -- and it built fine in VSCode without adding `source &amp;quot;Kconfig.zephyr&amp;quot;` to the Kconfig file in my project.&lt;br /&gt;&lt;br /&gt;Do you have a list or reference for what the NCS/VSCode build steps introduce that might not be included by default&amp;nbsp;when using&amp;nbsp;`west build -p -b ...` in a fresh nrf-sdk install?&lt;br /&gt;&lt;br /&gt;Its odd, because the build *works fine* when built from NCS/VSCode, but failed&amp;nbsp;&lt;strong&gt;until&lt;/strong&gt; I added `source Kconfig.zephyr` to the top of a `Kconfig` file at the root of my application.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Are there other&amp;nbsp;differences that app developers should be aware of when trying to move a project build to CI? This is not discussed in the documentation currently, unless I am missing it. Thanks!&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot Replicate Build in Docker Environment</title><link>https://devzone.nordicsemi.com/thread/349546?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 13:22:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:730b4ede-2fc6-4bd9-874f-82d4891ad070</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Could you try to set up nrf-connect-sdk using the &lt;a href="https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect#setting-up-the-environment"&gt;Matter nRF Connect Lighting Example Application&lt;/a&gt; Docker Setup tutorial?&lt;br /&gt;It would be interresting to see if this works for you, and the difference between that and your docker attempt.&lt;/p&gt;
&lt;p&gt;If that docker setup explanation solves your whole problem, that would be a bonus.&lt;br /&gt;If not, let me know, and I will look closer at your issue.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot Replicate Build in Docker Environment</title><link>https://devzone.nordicsemi.com/thread/349381?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 22:14:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf65a9c2-31ea-4760-be70-8ddb9c50bd9b</guid><dc:creator>milburn_lge</dc:creator><description>&lt;p&gt;edit: did not realize markdown code blocks don&amp;#39;t work. Here is an edited version:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;ncs -&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;nrf&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;nrfxlib&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;zephyr&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;apprepo&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;However, after a few days of on-and-off experimenting with this, it seems like there are some differences in the way that command line operates in the `nrf-sdk` installed in the Docker environment, vs the way the SDK installs and operates when installed as part of the VSCode extension.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the Docker image, I&amp;#39;ve tried both setting up a manual image based on&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_assistant.html#gs-app-gsa"&gt;these instructions&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and Ubuntu 20.04, as well as the `fw-nrfconnect-nrf-docker` image (&lt;a href="https://github.com/coderbyheart/fw-nrfconnect-nrf-docker)"&gt;github.com/.../fw-nrfconnect-nrf-docker)&lt;/a&gt;. In both cases, I see the same result when I attempt to build:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unsuccessful build in Docker using nrf-sdk:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;root@c97d33dc36a3:/apprepo# west -v build -p always -b nrf5340dk_nrf5340_cpuapp&lt;/p&gt;
&lt;div&gt;
&lt;pre&gt;&lt;br /&gt;&lt;span&gt;ZEPHYR_BASE=/zephyr (origin: env)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;-- west build: making build dir /apprepo/build pristine&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;cmake version 3.20.5 is OK; minimum version is 3.13.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Running CMake: /usr/local/bin/cmake -DBINARY_DIR=/apprepo/build -DSOURCE_DIR=/apprepo -P /zephyr/cmake/pristine.cmake&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;-- west build: generating a build system&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;cmake version 3.20.5 is OK; minimum version is 3.13.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Running CMake: /usr/local/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/apprepo/build -S/apprepo -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Including boilerplate (Zephyr base): /zephyr/cmake/app/boilerplate.cmake&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;-- Application: /apprepo&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;-- Zephyr version: 2.7.0 (/zephyr), build: v2.7.0-ncs1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;-- Found Python3: /usr/bin/python3.8 (found suitable exact version &amp;quot;3.8.10&amp;quot;) found components: Interpreter&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;-- Found west (found suitable version &amp;quot;0.12.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;CMake Error at /zephyr/cmake/zephyr_module.cmake:61 (message):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;ERROR: &amp;quot;kconfig&amp;quot; key in /apprepo/drivers/zephyr/module.yml has value&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&amp;quot;Kconfig&amp;quot; which does not point to a valid Kconfig file.&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;However, this same&amp;nbsp;application, on the host machine, builds fine when I simply navigate into `apprepo` and run `west -v build -p -b nrf5340dk_nrf5340_cpuapp:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Successful build on Host&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;pre&gt;&lt;span&gt;➜ ~/Projects/drydock/parentdir/i2c-lsm6dsl-driver git:(dev-add-nrf-connect-sdk-docker-build-image) ✗ west -v build -p -b nrf5340dk_nrf5340_cpuapp&lt;br /&gt;ZEPHYR_BASE=/Users/joshua.milburn/Projects/drydock/parentdir/zephyr (origin: configfile)&lt;br /&gt;-- west build: generating a build system&lt;br /&gt;cmake version 3.22.1 is OK; minimum version is 3.13.1&lt;br /&gt;Running CMake: /usr/local/bin/cmake -DWEST_PYTHON=/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -B/Users/joshua.milburn/Projects/drydock/parentdir/i2c-lsm6dsl-driver/build -S/Users/joshua.milburn/Projects/drydock/parentdir/i2c-lsm6dsl-driver -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp&lt;br /&gt;Including boilerplate (Zephyr base): /Users/joshua.milburn/Projects/drydock/parentdir/zephyr/cmake/app/boilerplate.cmake&lt;br /&gt;CMake Deprecation Warning at /Users/joshua.milburn/Projects/drydock/parentdir/zephyr/cmake/app/boilerplate.cmake:37 (cmake_policy):&lt;br /&gt;The OLD behavior for policy CMP0079 will be removed from a future version&lt;br /&gt;of CMake.&lt;br /&gt;&lt;br /&gt;The cmake-policies(7) manual explains that the OLD behaviors of all&lt;br /&gt;policies are deprecated and that a policy should be set to OLD only under&lt;br /&gt;specific short-term circumstances. Projects should be ported to the NEW&lt;br /&gt;behavior and not rely on setting a policy to OLD.&lt;br /&gt;Call Stack (most recent call first):&lt;br /&gt;/Users/joshua.milburn/Projects/drydock/parentdir/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)&lt;br /&gt;/Users/joshua.milburn/Projects/drydock/parentdir/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)&lt;br /&gt;CMakeLists.txt:38 (find_package)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Application: /Users/joshua.milburn/Projects/drydock/parentdir/i2c-lsm6dsl-driver&lt;br /&gt;-- Using NCS Toolchain 1.4.0 for building. (/opt/nordic/ncs/v1.8.0/toolchain/cmake)&lt;br /&gt;-- Zephyr version: 2.4.99 (/Users/joshua.milburn/Projects/drydock/parentdir/zephyr)&lt;br /&gt;-- Found Python3: /opt/nordic/ncs/v1.8.0/toolchain/bin/python3 (found suitable exact version &amp;quot;3.9.6&amp;quot;) found components: Interpreter&lt;br /&gt;-- Found west (found suitable version &amp;quot;0.12.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;... (build log truncated, but this results in binaries being built that I can flash to the device)&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>