How to increase CMAKE_OBJECT_PATH_MAX for ros2genmsg function
조회 수: 70 (최근 30일)
이전 댓글 표시
I am working on windows 10.
I have enabled long paths and confirmed they are enabled in the registry.
I cannot shorten the name or directory path any further. The package name is a little long at 20 characters, but it is a actively worked on externally managed package so I cannot change it.
********* has 198 characters. The maximum full path to an object file is 250 characters (see CMAKE_OBJECT_PATH_MAX). Object file ********* cannot be safely placed under this directory. The build may not work correctly.
the path name in question it wants to use has 238 characters auto generated. This leaves me with 22 characters for whatever directories on my local machine. I am working collaboratively in a series of dropbox folders, so I would prefer not to move it around.
There NEEDs to be a way around this limitation. Please let me know if you have a solution or workaround other than changing the package name and paths.
댓글 수: 0
채택된 답변
Hari Krishna Kakarla
2022년 10월 7일
편집: Hari Krishna Kakarla
2022년 10월 7일
Hi Samuel,
I have enabled long paths by following this link: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later and confirmed they are enabled in registry after rebooting the machine. The issue persists after doing this work around as well.
I understand that you don't want to shorten your package names or paths. To work around this issue work in a working directory which is does not have a long absolute path to start with. You can also use a tool like "subst" to map your long path to a drive letter. For example in a Windows cmd.exe prompt run:
subst W: <folder path where your custom message packages exists>
And then in MATLAB use W:\ as your working directory and do ros2genmsg in W:\ drive. That should solve your problem. Incase If the issue still persists, please attach the build log of the ros2genmsg.
Thanks
Hari
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Custom Message Support에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!