Bug #93077 | MySql build failed on MSVC on windows | ||
---|---|---|---|
Submitted: | 5 Nov 2018 9:44 | Modified: | 13 Nov 2018 18:50 |
Reporter: | Quella Zhang | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 8.0, 8.0.13 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[5 Nov 2018 9:44]
Quella Zhang
[5 Nov 2018 9:48]
Quella Zhang
Sorry for the wrong repro steps, that new one: 1.git clone https://github.com/mysql/mysql-server.git D:\MySQL\src 2.it's rely on boost 1.67,so extract boost_1_67_0.zip to D:\MySQL\ 3.mkdir build_x64 && pushd build_x64 4.cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 -DWITH_BOOST=C:\boost_1_67_0\x64 ..\src 5.msbuild /p:Configuration=Release;Platform=x64 build_x64\MySQL.sln /t:Rebuild /m /p:BuildInParallel=true
[5 Nov 2018 21:22]
MySQL Verification Team
git and cmake
Attachment: 93077.txt (text/plain), 21.51 KiB.
[5 Nov 2018 21:30]
MySQL Verification Team
Thank you for the bug report. d:\MySQL\src>msbuild /p:Configuration=Release;Platform=x64 MySQL.sln /t:Rebuild /m /p:BuildInParallel=true > build.txt --------cut------------------- d:\mysql\src\plugin\group_replication\include\pipeline_interfaces.h(304): warning C4267: 'argument': conversion from 'size_t' to 'ulong', possible loss of data (compiling source file D:\MySQL\src\plugin\group_replication\src\udf\udf_write_concurrency.cc) [d:\MySQL\src\plugin\group_replication\group_replication.vcxproj] d:\mysql\src\plugin\group_replication\src\udf\udf_write_concurrency.cc(105): warning C4244: 'initializing': conversion from '__int64' to 'uint32_t', possible loss of data [d:\MySQL\src\plugin\group_replication\group_replication.vcxproj] d:\mysql\src\plugin\group_replication\src\udf\udf_write_concurrency.cc(145): warning C4244: '=': conversion from '__int64' to 'uint32_t', possible loss of data [d:\MySQL\src\plugin\group_replication\group_replication.vcxproj] d:\mysql\src\plugin\group_replication\src\udf\udf_write_concurrency.cc(163): warning C4267: '=': conversion from 'size_t' to 'unsigned long', possible loss of data [d:\MySQL\src\plugin\group_replication\group_replication.vcxproj] d:\mysql\src\plugin\group_replication\include\pipeline_interfaces.h(304): warning C4267: 'argument': conversion from 'size_t' to 'ulong', possible loss of data (compiling source file D:\MySQL\src\plugin\group_replication\src\services\notification\impl\gms_listener_test.cc) [d:\MySQL\src\plugin\group_replication\group_replication.vcxproj] 3191 Warning(s) 0 Error(s) Time Elapsed 00:53:29.14 d:\MySQL\src>runtime_output_directory\Release\mysqld.exe --version d:\MySQL\src\runtime_output_directory\Release\mysqld.exe Ver 8.0.13 for Win64 on x86_64 (Source distribution) d:\MySQL\src>
[6 Nov 2018 7:04]
MySQL Verification Team
I compiled with different cmake options, will try with options provided.
[6 Nov 2018 11:24]
MySQL Verification Team
Thank you for the feedback. I'm not seeing any errors at my end on Win7 with VS 2017. Joining the build log shortly. regards, Umesh
[6 Nov 2018 11:25]
MySQL Verification Team
Build log..
Attachment: 93077_Win7.results (application/octet-stream, text), 1.03 MiB.
[6 Nov 2018 17:28]
Jan Kneschke
For the 1st, the fix in router/src/router/include/mysqlrouter/uri.h is to use #include <stdexcept> instead of #include <exception> For the 2nd, the remove the "#define getpid GetCurrentProcessId" in router/src/logging/registry.cc as getpid() already exists in the windows sdk's headers.
[7 Nov 2018 7:58]
MySQL Verification Team
Thank you Jan Kneschke, I see in 8.0.13 src that 1st issue has been fixed S/#include <stdexcept>/#include <exception>/ in router/src/router/include/mysqlrouter/uri.h but router\src\harness\src\logging\registry.cc has still #define getpid GetCurrentProcessId Verifying for now post Jan's earlier note.
[8 Nov 2018 10:07]
Quella Zhang
Thanks for your attention! Sorry for the confusion, I use unreleased VS complier vctoolset, the next released VS will have this behavier. I apply patch for the latest version e4924f3 on github and MySQL builds successfully. Waiting for your latest version.:)
[8 Nov 2018 10:14]
Quella Zhang
My workaround, I am not sure if it is correct, but it does work.
Attachment: mysql_c2039.patch (application/octet-stream, text), 2.38 KiB.
[13 Nov 2018 18:50]
Paul DuBois
Posted by developer: Fixed in 8.0.14. Corrections were made to enable successful builds under Visual Studio on Windows.
[6 Nov 2019 18:15]
MySQL Verification Team
today i had to add #include <stdexcept> to base64.h of router's http code in 8.0.18 to build on linux...