I am compiling v8 on win10 pro 20H2 build.
I had already fetch the source code
and used gn gen --ide=vs out\x64_proj
command under v8\src
directory to generate visual studio projects.
there are some small problems during process above,such as env variables, proxy. but I fixed them.
when I start to compile gn_all
project in my vs2019 , some error appeared.
most of them is very similar:
1>In file included from ../../../src/base/debug/stack_trace_win.cc:17:
1>In file included from D:\Windows Kits\10\Include\10.0.19041.0\um\windows.h:172:
1>In file included from D:\Windows Kits\10\Include\10.0.19041.0\um\winbase.h:43:
1>In file included from D:\Windows Kits\10\Include\10.0.19041.0\um\fileapifromapp.h:20:
1>D:\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error : unknown type name 'FILE_INFO_BY_HANDLE_CLASS'
1> _In_ FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
^
I google this symbol and find it in minwinbase.h
:
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
typedef enum _FILE_INFO_BY_HANDLE_CLASS {
FileBasicInfo,
FileStandardInfo,
FileNameInfo,
FileRenameInfo,
FileDispositionInfo,
FileAllocationInfo,
FileEndOfFileInfo,
FileStreamInfo,
FileCompressionInfo,
FileAttributeTagInfo,
FileIdBothDirectoryInfo,
FileIdBothDirectoryRestartInfo,
FileIoPriorityHintInfo,
FileRemoteProtocolInfo,
FileFullDirectoryInfo,
FileFullDirectoryRestartInfo,
#if (NTDDI_VERSION >= NTDDI_WIN8)
FileStorageInfo,
FileAlignmentInfo,
FileIdInfo,
FileIdExtdDirectoryInfo,
FileIdExtdDirectoryRestartInfo,
#endif
#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
FileDispositionInfoEx,
FileRenameInfoEx,
#endif
#if (NTDDI_VERSION >= NTDDI_WIN10_19H1)
FileCaseSensitiveInfo,
FileNormalizedNameInfo,
#endif
MaximumFileInfoByHandleClass
} FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
#endif
I guess it was the version macro problem to cause this enum not included.
so I create another project to print NTDDI_VERSION
, but it return 0xa0000008
which is greater than all macro appear above.
then I try to just comment these macro out, and it works, vs continue to compile antother files, and meet some new errors.
but appearently this is just a temporary patch, not a root cause, and the new errors seems also have do with this:
1>../../../src/base/debug/stack_trace_win.cc(173,12): error : use of undeclared identifier 'RtlCaptureStackBackTrace'
1> count_ = CaptureStackBackTrace(0, arraysize(trace_), trace_, nullptr);
1> ^
1>D:\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(118,31): note: expanded from macro 'CaptureStackBackTrace'
1>#define CaptureStackBackTrace RtlCaptureStackBackTrace
1>../../../src/base/platform/platform-win32.cc(841,11): error : use of undeclared identifier 'IsWindows10OrGreater'
1> if (IsWindows10OrGreater())
I guess it was that some buildtools didn't configure correctly, but I have no idea what it could be. Anyone have some ideas?