Bug #97391 MySql failed to build due to error C2039 with MSVC on windows.
Submitted: 28 Oct 2019 8:11 Modified: 25 Nov 2019 19:41
Reporter: Quella Zhang Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:branch 8.0 OS:Windows
Assigned to: CPU Architecture:Any

[28 Oct 2019 8:11] Quella Zhang
Description:
We (the Microsoft C++ team) use the MySQL project as part of our "Real world code" tests. MySql failed to build due to error C2039: 'value': is not a member of 'boost::proto' with MSVC on windows. It can be reproduced on latest version.Could you please help take a look at this? Thanks in advance!

failure:
497>C:\boost_1_68_0\x64\boost_1_70_0\boost/proto/generate.hpp(239): error C2039: 'value': is not a member of 'boost::proto' (compiling source file D:\MySQL\src\sql\auth\sql_authorization.cc) [D:\MySQL\build_x64\sql\sql_main.vcxproj]

How to repeat:
1.git clone -b 8.0 https://github.com/mysql/mysql-server.git D:\MySQL\src
2.mkdir build_x64 && pushd build_x64
3.cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=C:\boost_1_68_0\x64 ..\src
4.msbuild /p:Configuration=Release;Platform=x64 build_x64\MySQL.sln /t:Rebuild /m /p:BuildInParallel=true
[28 Oct 2019 8:13] Quella Zhang
log_x64_build

Attachment: log_x64_build.zip (application/x-zip-compressed, text), 188.98 KiB.

[28 Oct 2019 17:42] MySQL Verification Team
Thank you for the bug report.
[1 Nov 2019 12:44] Ståle Deraas
Posted by developer:
 
Hi, we are struggling to repeat this failure. When looking at the bug-description we wonder if there might be a problem with your BOOST installation?
[5 Nov 2019 2:10] Akela Wolf
I guess this is the same issues as https://github.com/boostorg/proto/issues/18 ?
[25 Nov 2019 19:41] Paul DuBois
Posted by developer:
 
Fixed in 8.0.19.

Boost compilation failed under Visual Studio due to a Boost
workaround for a VC++ 2013 bug that has since been fixed. The
workaround is now patched for Boost compilation with MySQL.