Title
#windows
a

Andrea

08/19/2022, 11:03 AM
Hi everyone, does anyone get the same error trying to fetch aws submodules on windows:
Submodule path 'libraries/cmake/source/aws-sdk-cpp/src/aws-sdk-cpp/crt/aws-crt-cpp/crt/aws-c-common': checked out 'c258a154bb89db73eff60a467a0750ee5435ebc6'
fatal: failed to read object b652295078e26f8444c72ee3088f6a1230624827: Filename too long
I have few of these error. Ofc long paths are set (also on git) any help to fix this is appreciated!
s

sharvil

08/19/2022, 1:30 PM
hey..I have successfully compiled on windows with my path being
C:\osquery
.. this is sadly bit of a known issue
1:31 PM
there is also a registry key on windows which enables long path names:
Windows 10
The initial directory is assumed to be C:\

Note: Windows and msbuild have traditionally had a 260 character max path limit. If you encounter problems with the long paths generated by CMake, we recommend building in a shorter path, like C:\Projects\osquery. If that still isn't working, since Windows 10 since Version 1607 there is a registry key that can enable longer paths. From an elevated command prompt:

REG ADD HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f

After changing that key, reboot your build machine and re-attempt the build.
https://osquery.readthedocs.io/en/latest/development/building/#windows-10
Mike Myers

Mike Myers

08/19/2022, 6:02 PM
I build from
C:\Projects\osquery
without problems but YMMV