<?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>ccache no longer works for NCS in Windows with newer versions of ccache</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116573/ccache-no-longer-works-for-ncs-in-windows-with-newer-versions-of-ccache</link><description>There was no problem when the current version of ccache was 4.6.1. However, the current version of ccache, 4.10.2, behaves differently with the --specs option. It will do nothing at all with NCS. To correct this, I make this change 
 diff --git a/cmake</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Nov 2024 14:46:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116573/ccache-no-longer-works-for-ncs-in-windows-with-newer-versions-of-ccache" /><item><title>RE: ccache no longer works for NCS in Windows with newer versions of ccache</title><link>https://devzone.nordicsemi.com/thread/512616?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2024 14:46:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f3eb393-20a8-42d0-a20c-d4a3c7095d8b</guid><dc:creator>Burt</dc:creator><description>&lt;p&gt;Thanks, Charlie, at least now I know the reason for no built in ccache in the Windows Toolchain. I&amp;#39;ll say that this is one of those cases where a well-intentioned and generally smart policy ends up giving a non-optimal result. Anyway, it&amp;#39;s too bad that some remarks could not be included in the nRF Connect SDK documentation (installation section); a helpful hint like, &amp;quot;although not officially supported, some users may wish to install ccache externally, and we recommend version 4.8.2 (rather than the latest version) for maximum compatibility with Zephyr&amp;quot; maybe adding &amp;quot;Use at your own risk.&amp;quot;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m only making such an issue out of this because:&lt;/p&gt;
&lt;p&gt;1. At first, I didn&amp;#39;t realize I needed to add my own ccache, but when I did, I always would add the latest version.&lt;br /&gt;2. Strange but I didn&amp;#39;t realize for a long time that my ccache wasn&amp;#39;t doing anything. (Maybe it was when I first installed ccache.)&lt;br /&gt;3. It was time consuming figuring out the trick to make the latest version work.&lt;br /&gt;4. My bad, I didn&amp;#39;t look at what version was in the Linux toolchain. I actually thought you folks had used a customized version.&lt;br /&gt;5. Windows builds are slow enough that any extra help is a good thing.&lt;br /&gt;6. My colleague never takes my advice if it is an addition to what you provide!&lt;/p&gt;
&lt;p&gt;The good news is that this ticket has 86 views so some people will know all their options (if they use Windows!)&lt;/p&gt;
&lt;p&gt;I will close the ticket now. Thanks again for giving me the official word from the Toolchain developers.&lt;/p&gt;
&lt;p&gt;Burt&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ccache no longer works for NCS in Windows with newer versions of ccache</title><link>https://devzone.nordicsemi.com/thread/512561?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2024 11:52:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f82e2028-0f65-4afd-8626-2a7a98e24b88</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Burt,&lt;/p&gt;
&lt;p&gt;After discussing with our toolchain maintainers, I have the following information to share:&lt;/p&gt;
&lt;p&gt;The reason ccache is not included in the NCS toolchain for Windows is that it has never fully supported Windows, including&lt;span style="font-family:inherit;"&gt; &lt;/span&gt;&lt;a style="font-family:inherit;" href="https://web.archive.org/web/20230702181749/https://ccache.dev/platform-compiler-language-support.html"&gt;4.8.2&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="https://ccache.dev/platform-compiler-language-support.html"&gt;latest&amp;nbsp;&lt;span style="font-family:inherit;"&gt;version(4.10.2 currently).&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2766.pastedimage1732794591193v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Probably works, may work or is partially supported. Not part of the test procedure before a new release. Bug fixing and testing largely depend on contributions from the community.&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;While developers are welcome to manually include and test ccache on Windows, we encourage using the same version included in the Linux toolchain for consistency. The specific software versions included in the toolchain can be found here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/scripts/tools-versions-linux.yml" target="_new"&gt;&lt;span&gt;Linux&lt;/span&gt;&lt;span&gt; Toolchain&lt;/span&gt;&lt;span&gt; Versions&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/scripts/tools-versions-win10.yml" target="_new"&gt;&lt;span&gt;Windows&lt;/span&gt;&lt;span&gt; Toolchain&lt;/span&gt;&lt;span&gt; Versions&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let me know if you have additional questions or need further clarification.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Best regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Charlie&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ccache no longer works for NCS in Windows with newer versions of ccache</title><link>https://devzone.nordicsemi.com/thread/511702?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2024 14:54:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4445113-7939-4054-b6dc-abe2fab4aa98</guid><dc:creator>Burt</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;I agree with you up to where you say that this relates to zephyr/scripts/west_commands/build.py. Perhaps you are conflating ccache with the CMake cache that is referenced in build.py.&lt;/p&gt;
&lt;p&gt;A more interesting question would be why we find for example ncs/toolchains/e9dba88316/usr/bin/ccache in the Linux case but do not find for example a C:\ncs\toolchains\c57af46cb7\usr\bin\ccache.exe in the Windows case. Are not the contents of the various ncs/toolchains put together by NS based on input from zephyr but customized by NS? I&amp;nbsp;see this as a primarily NS issue at this time, as you could include the same version of ccache in the Windows toolchain as the one which works for Linux; granted if you put the latest version of ccache into either Linux or Windows then we&amp;#39;d have to ask Zephyr to fix zephyr/cmake/modules/ccache.cmake. There is an argument for either method, I&amp;#39;d say, but currently your Windows users are at a disadvantage because most probably are not looking so closely to see that ccache is either absent or not doing its job.&lt;/p&gt;
&lt;p&gt;Burt&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ccache no longer works for NCS in Windows with newer versions of ccache</title><link>https://devzone.nordicsemi.com/thread/511678?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2024 14:02:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c962f1a-9453-4c0f-9cdd-1137f02019c4</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Burt,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for sharing your knowledge. I found that Windows indeed does not have ccache installed by default.&lt;/p&gt;
&lt;p&gt;I’m not entirely sure why Linux-like systems include it while Windows does not. However, I believe the &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues"&gt;Issues · zephyrproject-rtos/zephyr&lt;/a&gt;&amp;nbsp; would be a better place to discuss this topic, as it relates to &lt;code&gt;zephyr/scripts/west_commands/build.py&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ccache no longer works for NCS in Windows with newer versions of ccache</title><link>https://devzone.nordicsemi.com/thread/511532?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2024 15:21:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00c7a0e3-e124-416f-92aa-5972c24debb4</guid><dc:creator>Burt</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;I believe you are referring to the Linux version of NCS 2.8.0, which includes the ccache version you mention. Maybe Mac, too; I forget.&lt;/p&gt;
&lt;p&gt;The Windows version of the toolchains do not include ccache. I don&amp;#39;t recall where in the documentation for installing NCS on Windows do they explicitly mention ccache, but in general I believe Chocolatey is recommended for bringing in some tools, and I believe Chocolatey would bring in the 4.10.2.&lt;/p&gt;
&lt;p&gt;Can you verify that ccache is pulled in when following the documentation instructions to install NCS on Windows? Does it happen automatically when using VS Code and otherwise does not get pulled in? I just always remember to make certain I have it, whether or not I found it in the instructions.&lt;/p&gt;
&lt;p&gt;In Windows, if you execute the 2 command sequence:&lt;/p&gt;
&lt;p&gt;set VERBOSE=1&lt;br /&gt;west build ...&lt;/p&gt;
&lt;p&gt;you can look at some of the C file compilations to see if ccache is being invoked.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If ccache is invoked, you can see if it is caching by running a pristine build, then issuing &amp;quot;ccache -z&amp;quot; to zero out statistics, then run the pristine build again, then run &amp;quot;ccache -s -v&amp;quot; and you should see hundreds of cache hits in the statistics printed out; otherwise, you know it is not working. You shouldn&amp;#39;t see any instances of &amp;quot;not cached due to bad parameter&amp;quot; or something to that effect&lt;/p&gt;
&lt;p&gt;Thanks, Charlie.&lt;/p&gt;
&lt;p&gt;Burt&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ccache no longer works for NCS in Windows with newer versions of ccache</title><link>https://devzone.nordicsemi.com/thread/511481?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2024 12:52:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53598020-c40f-4c11-9022-cc10b22eff7e</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Burt,&lt;/p&gt;
&lt;p&gt;Thank you for reporting your observation. I apologize, as I am not very familiar with ccache, but I am trying to better understand your issue.&lt;/p&gt;
&lt;p&gt;I see that NCS 2.8.0 uses ccache version 4.8.2 by default. Are you using an environment set up with the latest ccache version 4.10.2?&lt;/p&gt;
&lt;p&gt;If that’s the case, I encourage you to use the default toolchain whenever possible. We will ensure that the build process is compatible with the newer toolchain and ccache 4.10.2 in future updates.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Charlie&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>