Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmsis-toolbox] Windows: long pathname support #838

Closed
ReinhardKeil opened this issue Apr 14, 2023 · 5 comments
Closed

[cmsis-toolbox] Windows: long pathname support #838

ReinhardKeil opened this issue Apr 14, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@ReinhardKeil
Copy link
Collaborator

For solving #671 the following issues are open:

  • new ninja version should be included in ctools
  • new arm linker is required to support long pathnames

Changes to build tools:

When [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] "LongPathsEnabled"=dword:00000001

@ReinhardKeil ReinhardKeil added the enhancement New feature or request label Apr 14, 2023
@jkrech jkrech changed the title Windows Host: Long pathname support (changes to build tools) [cmsis-toolbox] Windows: long pathname support Jul 4, 2023
@brondani
Copy link
Collaborator

brondani commented Jul 7, 2023

I still face issues even with ninja 1.11.1 when running the reproducer described in #671 (comment):

CMake Error:
  Running
   'C:/ProgramData/chocolatey/bin/ninja.exe' '-C' 'C:/w/A1234567890B123456789C0123456789D0123456789E0123456789F0123456789G0123456789H01234567890IH01234567890JH01234567890/NXP_Sensor_SDK/examples/issdk/sensors/fxas21002/tmp/fxas21002_fifo/frdmk22f_agmp03/debug/CMakeFiles/CMakeScratch/TryCompile-1oopss' '-t' 'recompact'
  failed with:
ninja: error: loading 'build.ninja': The system cannot find the path specified.

Environment:

$ systeminfo
...
OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19045 N/A Build 19045

$ csolution list environment
...
Long pathname support=enabled

$ ninja --version
1.11.1

Indeed the related ninja-build GH issue has been reopened on March 4th:
ninja-build/ninja#1900
See also CMake issue:
https://gitlab.kitware.com/cmake/cmake/-/issues/22435

Anyway at the present date it seems the microsoft vcpkg registry provides only ninja 1.10.2

$ vcpkg version
vcpkg package management program version 2023-06-22-f19f3d9939100085fe2f7e41502d60b08e2083b6

$ vcpkg find artifact ninja
...
microsoft:tools/ninja-build/ninja 1.10.2  Ninja is a small build system with a focus on speed.

On a side note the CMake variable CMAKE_OBJECT_PATH_MAX impacts only the hashing mechanism for generating object files with shorter paths. Increasing it does not help to solve the issue, at best it just evidences native tools that don't cope with long paths.

Further info: the ninja issue appears even when using ninja 1.12.0.git built from sources.
Now it is more evident because it happens already in the CMake Compiler Detection phase, which was skipped in CMSIS-Build versions lower than 1.6.0.

@tarek-bochkati
Copy link
Contributor

@brondani could you retry with the latest ninja master HEAD
for every commit merge in ninja github an action is launched to test & compile ninja
a binary artifcat is kept and could be downloaded, for example herein: https://github.com/ninja-build/ninja/actions/runs/5111036290

@brondani
Copy link
Collaborator

@tarek-bochkati Testing the binary artifact that you pointed with the above mentioned reproducer still leads to long path issue:

 Run Build Command(s): D:/tmp/ninja-win/ninja.exe -v cmTC_a3946
    ninja: error: Stat(C:/w/A1234567890B123456789C0123456789D0123456789E0123456789F0123456789G0123456789H01234567890IH01234567890JH01234567890/NXP_Sensor_SDK/examples/issdk/sensors/fxas21002/tmp/fxas21002_fifo/evkmimxrt1060_agmp03/debug/CMakeFiles/CMakeScratch/TryCompile-ws87g7/testCCompiler.c): Filename longer than 260 characters

@brondani
Copy link
Collaborator

brondani commented Sep 8, 2023

The following PR, submitted to the ninja-build repository, addresses the Filename longer than 260 characters error:
ninja-build/ninja#2321

Binaries:
ninja-linux.zip
ninja-windows.zip

@brondani
Copy link
Collaborator

brondani commented Nov 7, 2023

From our side this issue is concluded.
The PR submitted to ninja-build was approved and merged.
External requirements, namely the Arm Compiler 6.21 and the ninja release 1.12.0 (no due date) are out of scope of cmsis-toolbox 2.2.0.

@brondani brondani closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

3 participants