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

Issues with Long Pathnames #671

Closed
ReinhardKeil opened this issue Jan 18, 2023 · 7 comments
Closed

Issues with Long Pathnames #671

ReinhardKeil opened this issue Jan 18, 2023 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ReinhardKeil
Copy link
Collaborator

There are still issues with long pathnames that we should address. This issues result in CMake errors such as:
**The maximum full path to an object file is 250 characters (see CMAKE_OBJECT_PATH_MAX)

Potential solutions:

For users:

in CMSIS-Toolbox 2.0

  • Try to reduce the path components in the tmp directory, i.e. instead of:

    C:\w\AWS_MQTT_MutualAuth_SW_Framework\tmp\Demo\WiFi\Release\CMakeFiles\Demo.Release+WiFi.dir\....
    

    Just:

    C:\w\AWS_MQTT_MutualAuth_SW_Framework\tmp\Demo\WiFi\Release\CMakeFiles\dir\....
    
  • Use relative paths in build script, i.e. instead of:

    set(PRJ_DIR "C:/w/AWS_MQTT_MutualAuth_SW_Framework")
    set(OUT_DIR "C:/w/AWS_MQTT_MutualAuth_SW_Framework/out/Demo/WiFi/Release")
    set(INT_DIR "C:/w/AWS_MQTT_MutualAuth_SW_Framework/tmp/Demo/WiFi/Release")
    

    Just:

    set(PRJ_DIR ".")
    set(OUT_DIR "./out/Demo/WiFi/Release")
    set(INT_DIR "./tmp/Demo/WiFi/Release")
    
@ReinhardKeil ReinhardKeil self-assigned this Jan 18, 2023
@ReinhardKeil ReinhardKeil added documentation Improvements or additions to documentation cmsis-toolbox 2 Features in scope for "stable" baseline CMSIS-Toolbox labels Jan 18, 2023
@brondani
Copy link
Collaborator

It seems enabling the long path in Windows is not sufficient for some tools.
For example armlink complains about a missing object file:

Fatal error: L6002U: Could not open file CMakeFiles/fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.dir/a6d0b102fc087752ef65621176909b6b/fsl_component_generic_list.o: No such file or directory

Even if the file is there:

$ less CMakeFiles/fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.dir/a6d0b102fc087752ef65621176909b6b/fsl_component_generic_list.o
"CMakeFiles/fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.dir/a6d0b102fc087752ef65621176909b6b/fsl_component_generic_list.o" may be a binary file.

For the time being to cope with such limitation paths leading to object files should be kept as short as possible, for example by customizing intdir or by using the csolution --output option.

The "use of relative paths in build script" doesn't help, CMake always generates full path for object files, independently of source paths being relative. From CMAKE_OBJECT_PATH_MAX:
CMake computes for every source file an object file name that is unique to the source file and deterministic with respect to the full path to the source file. This allows multiple source files in a target to share the same name if they lie in different directories without rebuilding when one is added or removed.

@tarek-bochkati
Copy link
Contributor

well, I'm jumping here to highlight that a fix from ninja side is merged upstream.
internally we switched to latest ninja master branch, and it resolved our issues with long path.
please refer to: ninja-build/ninja#2225

any way, optimizing the generated paths into the generated cmakelists is more than welcome.

@jkrech
Copy link
Member

jkrech commented Feb 28, 2023

@tarek-bochkati looks like no official release of ninja was made since this change got merged.

@ReinhardKeil
Copy link
Collaborator Author

ReinhardKeil commented Apr 13, 2023

I'm trying to address this with documentation, but run into issues.

My attempt:

This ends with a ninja error at this command:

cbuild c:\w\A1234567890B123456789C0123456789D0123456789E0123456789F0123456789G0123456789H01234567890IH01234567890JH01234567890\NXP_Sensor_SDK\examples\issdk\sensors\fxas21002\poll_spi\fxas21002_poll_spi.debug+frdmk22f_agmp03.cprj

@tarek-bochkati @jkrech is there a way to get a version of ninja with the fix that is described above?

@jkrech
Copy link
Member

jkrech commented Apr 13, 2023

@ReinhardKeil The last official release is still from Aug. 2022 so you would need to create a build from master branch.

@ReinhardKeil
Copy link
Collaborator Author

can confirm that new ninja version would solve the build issue. Remaining issues are described here #838

@jkrech jkrech assigned jkrech and unassigned ReinhardKeil Jul 4, 2023
@jkrech jkrech removed the cmsis-toolbox 2 Features in scope for "stable" baseline CMSIS-Toolbox label Jul 7, 2023
grasci-arm pushed a commit to ARM-software/devtools that referenced this issue Aug 8, 2023
…file without <sauNumRegions> element under <cpu> Open-CMSIS-Pack#1082 (Open-CMSIS-Pack#671)

fixed:
- check for initialized value of sau num regions
JonatanAntoni pushed a commit to ARM-software/devtools that referenced this issue Aug 9, 2023
…file without <sauNumRegions> element under <cpu> Open-CMSIS-Pack#1082 (Open-CMSIS-Pack#671)

fixed:
- check for initialized value of sau num regions
JonatanAntoni pushed a commit that referenced this issue Aug 9, 2023
…file without <sauNumRegions> element under <cpu> #1082 (#671)

fixed:
- check for initialized value of sau num regions
@brondani
Copy link
Collaborator

brondani commented Nov 7, 2023

See #838.

@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
documentation Improvements or additions to documentation
Projects
No open projects
Development

No branches or pull requests

4 participants