How to increase CMAKE_OBJECT_PATH_MAX for ros2genmsg function
75 次查看(过去 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!