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

Build doesnt work due to limitation of CMAKE_OBJECT_PATH_MAX #4

Open
APurohit10 opened this issue Jan 18, 2023 · 8 comments
Open

Build doesnt work due to limitation of CMAKE_OBJECT_PATH_MAX #4

APurohit10 opened this issue Jan 18, 2023 · 8 comments

Comments

@APurohit10
Copy link

cbuild doesnt work due to limitation of CMAKE_OBJECT_PATH_MAX. This happened twice, first i tried FXLS8974CF interrupt example from my downloads folder and i got same issue. I created folder on desktop and ran from there, the build worked fine. But now motion_wakeup example build doesn't work due to same limitation. Please see build log for motion_wakeup example.

C:\Users\nxa11926\Desktop\NXP_Sensor_SDK-main\examples\issdk\sensors\fxls8974cf\motion_wakeup> cbuild.exe .\fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.cprj
info cbuild: Build Invocation 1.4.0 (C) 2022 Arm Ltd. and Contributors

M650: Command completed successfully.

M652: Generated file for project build: 'C:/Users/nxa11926/Desktop/NXP_Sensor_SDK-main/examples/issdk/sensors/fxls8974cf/motion_wakeup/tmp/fxls8974cf_motion_wakeup/frdmk22f_a8974/debug/CMakeLists.txt'
-- The ASM compiler identification is ARMClang
-- Found assembler: C:/Keil_v5/ARM/ARMCLANG/bin/armclang.exe
-- Configuring done
CMake Warning in CMakeLists.txt:
The object file directory

C:/Users/nxa11926/Desktop/NXP_Sensor_SDK-main/examples/issdk/sensors/fxls8974cf/motion_wakeup/tmp/fxls8974cf_motion_wakeup/frdmk22f_a8974/debug/CMakeFiles/fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.dir/./

has 207 characters. **The maximum full path to an object file is 250
characters (see CMAKE_OBJECT_PATH_MAX). Object file

82a379cee12235e3e7c393925cefc520/fsl_adc16.o

cannot be safely placed under this directory. The build may not work
correctly.**

-- Generating done
-- Build files have been written to: C:/Users/nxa11926/Desktop/NXP_Sensor_SDK-main/examples/issdk/sensors/fxls8974cf/motion_wakeup/tmp/fxls8974cf_motion_wakeup/frdmk22f_a8974/debug
[48/48] Linking C executable C:\Users\nxa11926\Desktop\NXP_Sensor_SDK-main\ex...wakeup\frdmk22f_a8974\debug\fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.axf
FAILED: C:/Users/nxa11926/Desktop/NXP_Sensor_SDK-main/examples/issdk/sensors/fxls8974cf/motion_wakeup/out/fxls8974cf_motion_wakeup/frdmk22f_a8974/debug/fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.axf
cmd.exe /C "cd . && C:\Keil_v5\ARM\ARMCLANG\bin\armlink.exe --cpu=Cortex-M4 --scatter="C:/Users/nxa11926/Desktop/NXP_Sensor_SDK-main/boards/frdmk22f/RTE/Device/MK22FN512VLH12/MK22FN512xxx12_flash.scf" --entry=Reset_Handler --strict --info summarysizes --remove --keep=(.crp) --keep=(.FlashConfig) --diag_suppress 6314,6319 --debug --via=CMakeFiles\fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.rsp -o C:\Users\nxa11926\Desktop\NXP_Sensor_SDK-main\examples\issdk\sensors\fxls8974cf\motion_wakeup\out\fxls8974cf_motion_wakeup\frdmk22f_a8974\debug\fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.axf --list=C:\Users\nxa11926\Desktop\NXP_Sensor_SDK-main\examples\issdk\sensors\fxls8974cf\motion_wakeup\out\fxls8974cf_motion_wakeup\frdmk22f_a8974\debug\fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.axf.map && cmd.exe /C "cd /D C:\Users\nxa11926\Desktop\NXP_Sensor_SDK-main\examples\issdk\sensors\fxls8974cf\motion_wakeup\tmp\fxls8974cf_motion_wakeup\frdmk22f_a8974\debug && C:\Keil_v5\ARM\ARMCLANG\bin\fromelf.exe --i32combined --output C:/Users/nxa11926/Desktop/NXP_Sensor_SDK-main/examples/issdk/sensors/fxls8974cf/motion_wakeup/out/fxls8974cf_motion_wakeup/frdmk22f_a8974/debug/fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.hex C:/Users/nxa11926/Desktop/NXP_Sensor_SDK-main/examples/issdk/sensors/fxls8974cf/motion_wakeup/out/fxls8974cf_motion_wakeup/frdmk22f_a8974/debug/fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.axf && cd /D C:\Users\nxa11926\Desktop\NXP_Sensor_SDK-main\examples\issdk\sensors\fxls8974cf\motion_wakeup\tmp\fxls8974cf_motion_wakeup\frdmk22f_a8974\debug && C:\Keil_v5\ARM\ARMCLANG\bin\fromelf.exe --bin --output C:/Users/nxa11926/Desktop/NXP_Sensor_SDK-main/examples/issdk/sensors/fxls8974cf/motion_wakeup/out/fxls8974cf_motion_wakeup/frdmk22f_a8974/debug/fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.bin C:/Users/nxa11926/Desktop/NXP_Sensor_SDK-main/examples/issdk/sensors/fxls8974cf/motion_wakeup/out/fxls8974cf_motion_wakeup/frdmk22f_a8974/debug/fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.axf""
Fatal error: L6002U: Could not open file CMakeFiles/fxls8974cf_motion_wakeup.debug+frdmk22f_a8974.dir/48a65af2d07af921aa89cbca7c12f3e6/fsl_component_generic_list.o: No such file or directory
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
ninja: build stopped: subcommand failed.
error cbuild: error executing 'cmake' build
PS C:\Users\nxa11926\Desktop\NXP_Sensor_SDK-main\examples\issdk\sensors\fxls8974cf\motion_wakeup>

@APurohit10
Copy link
Author

Related to: Open-CMSIS-Pack/devtools#671

@RobertRostohar
Copy link
Owner

This is raised in the mentioned ticket as you have pointed out: explain how to increase the path limit, explain impact of using long names and give guidelines.

A short-term solution is to copy the repo into a directory root with a shorter name. For example "C:/Temp/Sensor" instead of "C:/Users/nxa11926/Desktop/NXP_Sensor_SDK-main". This will be probably already enough.

@APurohit10
Copy link
Author

Understood but not sure whether that will help in long run (also see comment from brondani on mentioned ticket), lets keep this open as we would like to see this issue resolved before we deploy the solution.

@purdurnr
Copy link
Collaborator

I also am now getting these warnings and it may be result of the folder structure.
I have the c:/GIT/NPX_Sensor_SDK
So very close to directory root.
However, we introduce the very nested folder within examples. CMake warning notes below is 189 characters:
C:/GIT/NXP_Sensor_SDK/examples/issdk/sensors/fxls8974cf/interrupt/tmp/fxls8974cf_interrupt/lpcxpresso54114_a8974/release/CMakeFiles/fxls8974cf_interrupt.release+lpcxpresso54114_a8974.dir/./
The tmp folder generates length based on project name, clayer combo, release, then repeats again under CMakeFiles...

@kydando
Copy link

kydando commented Jan 27, 2023

I moved my project to the same folder as Amit under desktop. My project build error changed and was identical to Amit's.
So path length is definitely affecting build results.
Do you use a Windows laptop or a Linux system? We just want to know if that is o e way to avoid path restrictions and build warnings.

@RobertRostohar
Copy link
Owner

I'm using Windows and a very short root name.
We could also consider moving the examples higher in the directory structure.

@RobertRostohar
Copy link
Owner

The path is now slightly shorter since the csolution YML files are now one level-up (develop branch).
Nevertheless, I would suggest closing this ticket, since the path limitation is a tool limitation and should be solved within the tool.

@APurohit10
Copy link
Author

We can mark this issue as dependent on Open-CMSIS-Pack/devtools#671 issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants