-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
osquery Windows build fails with error C3892 #6655
Comments
Hi @spacelg, from the error you've copied here I only see sources which are related to RocksDB, not osquery itself. |
Hi @Smjert , Thanks for your reply. I tried to build RocksDB with latest RocksDB reversion 9d8eb77. It can build pass. For above error C3892: '_First': you cannot assign to a variable that is const. Found that only failed to compile ..\rocksdb\src\db\external_sst_file_ingestion_job.cc as below: F:\gitP\facebook\osquery\build\libs\src\rocksdb>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\CL.exe" /c /IF:\gitP\facebook\osquery\libraries\cmake\source\rocksdb\src /IF:\gitP\facebook\osquery\libraries\cmake\source\rocksdb\src\util /IF:\gitP\facebook\osquery\libraries\cmake\source\rocksdb\src\include /nologo /W0 /WX- /diagnostics:column /O2 /Ob2 /Ot /D WIN32 /D _WINDOWS /D NDEBUG /D OS_WIN /D _MBCS /D WIN64 /D NOMINMAX /D _WIN32_WINNT=_WIN32_WINNT_WIN7 /D NTDDI_VERSION=NTDDI_WIN7 /D BOOST_ALL_NO_LIB /D BOOST_ALL_STATIC_LINK /D "CMAKE_INTDIR="Release"" /D _MBCS /Gm- /EHs /MT /GS /guard:cf /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"thirdparty_rocksdb.dir\Release\" /Fd"thirdparty_rocksdb.dir\Release\thirdparty_rocksdb.pdb" /Gd /TP /errorReport:queue /bigobj F:\gitP\facebook\osquery\libraries\cmake\source\rocksdb\src\db\external_sst_file_ingestion_job.cc And found that the external_sst_file_ingestion_job.cc in the osquery libraries is very different from the external_sst_file_ingestion_job.cc in the rocksdb source code. Is the rocksdb in osquery libraries not updated in time cause this? Thanks, |
Having the same error with the latest osquery release (4.5.1, 4.5.0). p.s. 4.4.0 compiling without issues. |
In a discussion in Slack, we identified a likely fix: to upgrade our RocksDB pinned version. This build error happens as a result of a new MSVC: version |
Hi All,
We tried to build osquery on Windows with unreleased VS2019. It failed to build due to error C3892: '_First': you cannot assign to a variable that is const with MSVC on windows. It can be reproduced on latest reversion f4555ac . Could you please help take a look at this? Thanks!
Steps to reproduce:
build.log
Actual result:
445>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\include\algorithm(7447,17): error C3892: '_First': you cannot assign to a variable that is const [F:\gitP\facebook\osquery\build\libs\src\rocksdb\thirdparty_rocksdb.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\include\algorithm(7569): message : see reference to function template instantiation '_BidIt std::_Insertion_sort_unchecked<_RanIt,_Pr>(const _BidIt,const _BidIt,_Pr)' being compiled [F:\gitP\facebook\osquery\build\libs\src\rocksdb\thirdparty_rocksdb.vcxproj]
with
[
_BidIt=rocksdb::autovector<const rocksdb::IngestedFileInfo *,8>::iterator_impl<rocksdb::autovector<const rocksdb::IngestedFileInfo *,8>,const rocksdb::IngestedFileInfo *>,
_RanIt=rocksdb::autovector<const rocksdb::IngestedFileInfo *,8>::iterator_impl<rocksdb::autovector<const rocksdb::IngestedFileInfo *,8>,const rocksdb::IngestedFileInfo *>,
_Pr=rocksdb::ExternalSstFileIngestionJob::Prepare::<lambda_5cd11890b167765aab44fdd1b21b5d50>
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\include\algorithm(7599): message : see reference to function template instantiation 'void std::_Sort_unchecked<_RanIt,_Fn>(_RanIt,_RanIt,__int64,_Pr)' being compiled [F:\gitP\facebook\osquery\build\libs\src\rocksdb\thirdparty_rocksdb.vcxproj]
with
[
_RanIt=rocksdb::autovector<const rocksdb::IngestedFileInfo *,8>::iterator_impl<rocksdb::autovector<const rocksdb::IngestedFileInfo *,8>,const rocksdb::IngestedFileInfo *>,
_Fn=rocksdb::ExternalSstFileIngestionJob::Prepare::<lambda_5cd11890b167765aab44fdd1b21b5d50>,
_Pr=rocksdb::ExternalSstFileIngestionJob::Prepare::<lambda_5cd11890b167765aab44fdd1b21b5d50>
]
F:\gitP\facebook\osquery\libraries\cmake\source\rocksdb\src\db\external_sst_file_ingestion_job.cc(70): message : see reference to function template instantiation 'void std::sort<rocksdb::autovector<const rocksdb::IngestedFileInfo *,8>::iterator_impl<rocksdb::autovector<const rocksdb::IngestedFileInfo *,8>,const rocksdb::IngestedFileInfo *>,rocksdb::ExternalSstFileIngestionJob::Prepare::<lambda_5cd11890b167765aab44fdd1b21b5d50>>(const _RanIt,const _RanIt,_Pr)' being compiled [F:\gitP\facebook\osquery\build\libs\src\rocksdb\thirdparty_rocksdb.vcxproj]
with
[
_RanIt=rocksdb::autovector<const rocksdb::IngestedFileInfo *,8>::iterator_impl<rocksdb::autovector<const rocksdb::IngestedFileInfo *,8>,const rocksdb::IngestedFileInfo *>,
_Pr=rocksdb::ExternalSstFileIngestionJob::Prepare::<lambda_5cd11890b167765aab44fdd1b21b5d50>
]
experimental.cc
The text was updated successfully, but these errors were encountered: