Hi, I'm trying to build Windows Mesos Agent from the 1.10.x branch of the https://github.com/apache/mesos.git repo.
My environment is as follows: * Windows Server 2019 * Visual Studio 2017 cd c:\temp git clone https://github.com/apache/mesos.git mkdir mesos\build cd mesos\build # Generate build scripts cmake .. -G "Visual Studio 15 2017" -A "x64" -DPATCHEXE_PATH="C:\ProgramData\chocolatey\lib\patch\tools\bin" -T host=x64 # Build mesos agent cmake --build . --target mesos-agent --config Release This is the version I started from: C:\temp\mesos>git log -n 1 commit 2c9e829067465f10bab22aba273e1e3a93f60770 (HEAD -> 1.10.x, origin/1.10.x) Author: Benjamin Mahler <bmah...@apache.org<mailto:bmah...@apache.org>> Date: Mon Oct 26 16:58:35 2020 -0400 Updated Postgres URL in CentOS 6 Dockerfile. The link was pointing to an rpm package that has since been replaced on the upstream server. I encountered a couple of compile and linker errors which I fixed along the way, but his last issue has me stumped: c:\temp\mesos\3rdparty\stout\include\stout\exit.hpp(69): warning C4722: '__Exit::~__Exit': destructor never returns, potential memory leak [C:\temp\mesos\build\src\launcher\mesos-executor.vcxproj] mesos.lib(launch.obj) : error LNK2019: unresolved external symbol "int __cdecl os::execvp(char const *,char * const * const)" (?execvp@os@@YAHPEBDQEBQEAD@Z) referenced in function "protected: virtual int __cdecl mesos::internal::slave:: MesosContainerizerLaunch::execute(void)" (?execute@MesosContainerizerLaunch@slave@internal@mesos@@MEAAHXZ) [C:\temp\mesos\build\src\launcher\mesos-executor.vcxproj] mesos.lib(launch.obj) : error LNK2019: unresolved external symbol "int __cdecl os::execvpe(char const *,char * *,char * *)" (?execvpe@os@@YAHPEBDPEAPEAD1@Z) referenced in function "protected: virtual int __cdecl mesos::internal::slave:: MesosContainerizerLaunch::execute(void)" (?execute@MesosContainerizerLaunch@slave@internal@mesos@@MEAAHXZ) [C:\temp\mesos\build\src\launcher\mesos-executor.vcxproj] C:\temp\mesos\build\src\mesos-executor.exe : fatal error LNK1120: 2 unresolved externals [C:\temp\mesos\build\src\launcher\mesos-executor.vcxproj] I can see that the Windows implementation of os::execvp and os::execvpe is different to the linux implementation: Windows: C:\temp\mesos\3rdparty\stout\include\stout\os\windows\exec.hpp inline int execvp( const std::string& file, const std::vector<std::string>& argv) { exit(os::spawn(file, argv, None()).getOrElse(-1)); return -1; } inline int execvpe( const std::string& file, const std::vector<std::string>& argv, const std::map<std::string, std::string>& envp) { exit(os::spawn(file, argv, envp).getOrElse(-1)); return -1; } C:\temp\mesos\3rdparty\stout\include\stout\os\posix\exec.hpp (formatted to make it easier to compare.) inline int execvp( const char* file, char* const argv[]) { return ::execvp(file, argv); } inline int execvpe( const char* file, char** argv, char** envp) { char** saved = os::raw::environment(); *os::raw::environmentp() = envp; int result = execvp(file, argv); *os::raw::environmentp() = saved; return result; } The calls being made to these functions use the posix version of the function. I'm not sure how this branch could ever have compiled/linked unless perhaps you are using VC2019 and it somehow magically resolves this for you? Q: Has anybody built branch 1.10.x for Windows Mesos Agent recently? Regards, Chris Holman