nRF Connect SDK v3.4.0 - Windows 11 - Fails to compile builds with error CMAKE_BINARY_DIR length (109) exceeds 90 characters

Hello,

Under Windows 11 Pro, nRF Connect SDK v3.4.0 fails to compile builds with error "CMAKE_BINARY_DIR length (109) exceeds 90 characters."

The same build on Windows 11 Pro & NCS v3.3.3 (and previous releases) builds successfully. Also, the same source builds successfully under macOS Sequoia.

I'm not sure why the errors occurs, as Windows 11 MAX_PATH  length is 260 characters.

Appreciate if someone in Support can assist. Thank you.



Kind Regards.

Parents
  • Hi Kind, 

    Under Windows 11 Pro, nRF Connect SDK v3.4.0 fails to compile builds with error "CMAKE_BINARY_DIR length (109) exceeds 90 characters."

    The error is caused by https://github.com/nrfconnect/sdk-trusted-firmware-m/blob/ncs-v3.4.0/CMakeLists.txt#L57. It was added by this commit https://github.com/nrfconnect/sdk-trusted-firmware-m/commit/015320bb4d5972f4ee95fa41b52d4c59965932a9, which affects v3.4.0.  

    Your path (~109 chars) is ~19 characters over the TF-M limit (90 chars). Please try to shorten your path. 

    Regards,
    Amanda H.

  • Hi Amanda,

    Thank you for your very quick response. Yes, I can resolve the issue in NCS 3.4.0 by reducing the path length. However, it is likely to occur again as a lot of project paths well exceed 90 characters though probably short of 128.

    This wasn't any issue under Windows 11 until NCS 3.4.0. NCS 3.3.3 and previous releases don't have this arbitrary restriction of 90 characters. Also, it's not an issue under macOS.

    The commit states that "There are tools that can't use long path during build on Windows system." What specific tools are being referenced here?

    I'm certain that other users are going to come across the same issue under Windows 11 with NCS 3.4.0 LTS.

    Is there any reason for selecting the value of 90? Why not 128 characters or a little higher, or revert back to NCS 3.3.3?

    Please reach out to development and convey that potentially a large number of user projects may be impacted by this change, and kindly request a higher value than 90 (e.g. 128). Thank you.

    Kind Regards,
    Ravi

  • Unfortunately, this change was not made by us, and since the commit message didn't specify which specific tools it refers to, we cannot help much here. Please use a shorter path indeed.

  • Hi Amanda,

    Under Windows 11, I'm trying to use the shorter paths as possible with the project close to the "C" drive. However, I'm still seeing similar messages from "memfault-firmware-sdk".

    In the latest modified "Asset Tracker Template" for nrf9151dk build under Windows 11, as you can see "memfault-firmware-sdk" introduces a pretty long path that causes the warning message.

    Although in this case the flash to nRF9151DK work. However, as per the warning message, the build may not work properly.

    For NCS development under Windows 11, Is there any other recommendation that Nordic can provide that would resolve the issue, other than removing Memfault from the firmware?

    As mentioned before, this path issue does not exist on macOS. Our primary dev environment is macOS but have recently got some builds done under Windows 11.

    In reviewing several "CMAKE_OBJECT_PATH_MAX" issues on DevZone, it appears that under Windows 11, nRF Connect SDK development will be an issue for us. We cannot simply shorten the path for all out projects.

    Nordic should offer a resolution rather than a workaround. Thank you.

    Regards,
    Ravi

Reply
  • Hi Amanda,

    Under Windows 11, I'm trying to use the shorter paths as possible with the project close to the "C" drive. However, I'm still seeing similar messages from "memfault-firmware-sdk".

    In the latest modified "Asset Tracker Template" for nrf9151dk build under Windows 11, as you can see "memfault-firmware-sdk" introduces a pretty long path that causes the warning message.

    Although in this case the flash to nRF9151DK work. However, as per the warning message, the build may not work properly.

    For NCS development under Windows 11, Is there any other recommendation that Nordic can provide that would resolve the issue, other than removing Memfault from the firmware?

    As mentioned before, this path issue does not exist on macOS. Our primary dev environment is macOS but have recently got some builds done under Windows 11.

    In reviewing several "CMAKE_OBJECT_PATH_MAX" issues on DevZone, it appears that under Windows 11, nRF Connect SDK development will be an issue for us. We cannot simply shorten the path for all out projects.

    Nordic should offer a resolution rather than a workaround. Thank you.

    Regards,
    Ravi

Children
No Data
Related