As the release of 7.3 is closing in, I’m trying to build it on windows for development purposes (and to create the fdb_java.dll for JNI). It was working fine for 7.1 (without even building boost), but with 7.3 I get strange static linking errors:
I’m using VS2019 as the readme suggests, but I had to upgrade boost to 1.78 for FDB 7.3.
cd c:\build
cmake -G "Visual Studio 16 2019" -A x64 -T ClangCl c:\foundationdb
msbuild /p:Configuration=Release foundationdb.sln /p:UseMultiToolTask=true /p:CL_MPCount=8
Error:
lld-link : error : /failifmismatch: mismatch detected for 'RuntimeLibrary': [c:\build\bindings\c\fdb_c.vcxproj]
>>> flow.lib(JsonTraceLogFormatter.obj) has value MT_StaticRelease
>>> libboost_filesystem-vc142-mt-x64-1_78.lib(operations.obj) has value MD_DynamicRelease
This seems strange, as I have built boost to be static (mt in the filename also suggests that), but cmake is complaining that is dyamic? Has anyone succeeded to build it on windows?
After this, the fdb_c.dll, the fdb_java.dll and the fdbcli binaries are correctly built, but the build of the fdbserver fails with:
In file included from C:/foundationdb/fdbserver/workloads/workloads.actor.cpp:25:
In file included from C:\foundationdb\fdbclient\include\fdbclient/DataDistributionConfig.actor.h:23:
In file included from C:/foundationdb/fdbclient/include/fdbclient/DataDistributionConfig.actor.h:32:
In file included from C:\foundationdb\fdbclient\include\fdbclient/KeyBackedRangeMap.actor.h:24:
C:/foundationdb/fdbclient/include/fdbclient/KeyBackedRangeMap.actor.h(131,100): error : no matching constructor for initialization of 'ObjectCodec<DDRangeConfig, _IncludeVersion>' [c:\build\fdbserver\fdbserver.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\type_traits(598,49): note: in instantiation of default function argument expression for 'KeyBackedRangeMap<Standalone<StringRef>,
DDRangeConfig, TupleCodec<Standalone<StringRef>>, ObjectCodec<DDRangeConfig, _IncludeVersion>>' required here
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\optional(170,44): note: in instantiation of variable template specialization 'std::is_constructible_v<KeyBackedRangeMap<Standalone
<StringRef>, DDRangeConfig, TupleCodec<Standalone<StringRef>>, ObjectCodec<DDRangeConfig, _IncludeVersion>>>' requested here
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\optional(171,24): note: while substituting prior template arguments into non-type template parameter [with _Types = <>]
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\optional(155,7): note: while substituting deduced template arguments into function template 'optional' [with _Types = <>, $1 = (no