[MSVC] Compile error in utilities\transactions\transaction_base.cc
NEIL-smtg opened this issue · 2 comments
Hi, I work on MSVC Compiler testing, and we regularly build popular open-source projects, including RocksDB, with development builds of our compiler and libraries. This allows us to find and fix regressions before they ship and cause problems for you.
Recently, the developer has committed[ STL#4963](microsoft/STL#4963) (expected to ship in Visual Studio 2022 17.13 Preview 1) which will lead to the following error:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\include\stack(125,30): error C2440: 'return': cannot convert from 'void' to 'rocksdb::TransactionBaseImpl::SavePoint &'
Note: For more info, you can refer to microsoft/STL#4963 or https://developercommunity.visualstudio.com/t/10745303
Expected behavior
It compiles
Steps to reproduce the behavior
- Open X64 Native Tools Command prompt for VS 2022
- mkdir C:\gitP\facebook
- cd C:\gitP\facebook
- git clone https://github.com/facebook/rocksdb.git
- cd rocksdb
- cl /IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.40.33807\include\ -c -IC:\gitP\facebook\rocksdb -IC:\gitP\facebook\rocksdb\include -Zi -nologo -W4 -WX -diagnostics:column -O2 -Ob2 -D_WINDLL -DWIN32 -D_WINDOWS -DNDEBUG -DROCKSDB_DLL -DROCKSDB_LIBRARY_EXPORTS -DROCKSDB_NO_DYNAMIC_EXTENSION -DOS_WIN -D_MBCS -DWIN64 -DNOMINMAX -DCMAKE_INTDIR="Release" -Drocksdb_shared_EXPORTS -GF -Gm- -EHs -EHc -MD -Zp8 -GS -Gy -arch:AVX2 -fp:precise -Zc:wchar_t -Zc:forScope -Zc:inline -GR- -std:c++17 -external:W0 -Gd -TP -wd4127 -wd4996 -wd4100 -wd4324 -FC -errorreport:queue -external:IC:\gitP\facebook\rocksdb\third-party\gtest-1.8.1\fused-src -d2Zi+ -Ox -Ot -wd4189 -wd4551 -I"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\include" -I"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\atlmfc\include" -I"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt" -I"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\UnitTest\include" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\Include\um" -external:I"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\include" -external:I"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\atlmfc\include" -external:I"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" -external:I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt" -external:I"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\UnitTest\include" -external:I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um" -external:I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared" -external:I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt" -external:I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt" -external:I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\Include\um" -X C:\gitP\facebook\rocksdb\utilities\transactions\transaction_base.cc
This is actually an STL bug, not a RocksDB bug. I'm going to fix it with microsoft/STL#4980 before VS 2022 17.13 Preview 1 ships. You don't need to take any action here, and you can close this issue. Apologies for the noise.
My mistake, it's not a bug, closing this issue.