[MDEV-21121] Build failed in `rpl_parallel.cc` with vs2015 and `debug` config Created: 2019-11-21  Updated: 2020-01-26  Resolved: 2020-01-26

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Replication
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Anel Husakovic Assignee: Vladislav Vaintroub
Resolution: Incomplete Votes: 0
Labels: foundation
Environment:

Windows, ancient compiler



 Description   

Let's consider following configuration

cmake .. -G "Visual Studio 14 2015" -DWITH_WSREP=0
cmake --build .
 
# Output
 C:\Program Files (x86)\Windows Kits\8.1\Include\shared\guiddef.h(192): note: or       'bool operator ==(const GUID &,
  const GUID &)' (compiling source file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception(329): note: or       'bool std::operator ==(
  const std::exception_ptr &,const std::exception_ptr &) throw()' [found using argument-dependent lookup] (compiling so
  urce file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception(334): note: or       'bool std::operator ==(
  std::nullptr_t,const std::exception_ptr &) throw()' [found using argument-dependent lookup] (compiling source file D:
  \server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception(339): note: or       'bool std::operator ==(
  const std::exception_ptr &,std::nullptr_t) throw()' [found using argument-dependent lookup] (compiling source file D:
  \server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\system_error(365): note: or       'bool std::operator
  ==(const std::error_code &,const std::error_code &) noexcept' [found using argument-dependent lookup] (compiling sour
  ce file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\system_error(373): note: or       'bool std::operator
  ==(const std::error_code &,const std::error_condition &) noexcept' [found using argument-dependent lookup] (compiling
   source file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\system_error(381): note: or       'bool std::operator
  ==(const std::error_condition &,const std::error_code &) noexcept' [found using argument-dependent lookup] (compiling
   source file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\system_error(389): note: or       'bool std::operator
  ==(const std::error_condition &,const std::error_condition &) noexcept' [found using argument-dependent lookup] (comp
  iling source file D:\server\sql\rpl_parallel.cc)
 
 
D:\server\sql\rpl_parallel.cc(1926): error C2088: '==': illegal for struct [D:\server\bld_patch\sql\sql.vcxproj]
D:\server\sql\rpl_parallel.cc(1940): error C2593: 'operator ==' is ambiguous [D:\server\bld_patch\sql\sql.vcxproj]
  d:\server\sql\rpl_gtid.h(37): note: could be 'bool operator ==(const rpl_gtid &,const rpl_gtid &)' (compiling source
  file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Windows Kits\8.1\Include\shared\guiddef.h(192): note: or       'bool operator ==(const GUID &,
  const GUID &)' (compiling source file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception(329): note: or       'bool std::operator ==(
  const std::exception_ptr &,const std::exception_ptr &) throw()' [found using argument-dependent lookup] (compiling so
  urce file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception(334): note: or       'bool std::operator ==(
  std::nullptr_t,const std::exception_ptr &) throw()' [found using argument-dependent lookup] (compiling source file D:
  \server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception(339): note: or       'bool std::operator ==(
  const std::exception_ptr &,std::nullptr_t) throw()' [found using argument-dependent lookup] (compiling source file D:
  \server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\system_error(365): note: or       'bool std::operator
  ==(const std::error_code &,const std::error_code &) noexcept' [found using argument-dependent lookup] (compiling sour
  ce file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\system_error(373): note: or       'bool std::operator
  ==(const std::error_code &,const std::error_condition &) noexcept' [found using argument-dependent lookup] (compiling
   source file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\system_error(381): note: or       'bool std::operator
  ==(const std::error_condition &,const std::error_code &) noexcept' [found using argument-dependent lookup] (compiling
   source file D:\server\sql\rpl_parallel.cc)
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\system_error(389): note: or       'bool std::operator
  ==(const std::error_condition &,const std::error_condition &) noexcept' [found using argument-dependent lookup] (comp
  iling source file D:\server\sql\rpl_parallel.cc)
  D:\server\sql\rpl_parallel.cc(1940): note: while trying to match the argument list '(std::atomic<wait_for_commit *>,
  int)'
D:\server\sql\rpl_parallel.cc(1940): error C2088: '==': illegal for struct [D:\server\bld_patch\sql\sql.vcxproj]CMAK

When the same configuration is applied with RelWithDebInfo build configuration, it works.

cmake --build . --config RelWithDebInfo # no problem

The same configuration from above is tested with vs2019 and it works.



 Comments   
Comment by Vladislav Vaintroub [ 2019-12-24 ]

anel VS2015 is not used by our build infrastructure anymore. We build our releases with VS2019, and before that with VS2017, and only long long ago we used VS2015

There seems to be no obvious advantage to be able to compile with the old compiler, on Windows. Unless there is a discovery of a compiler or runtime bug, that would affect us.

If you have a patch, I can look and apply this. I have not exactly figured out which code does not compile , as version (git hash of the commit) was not reported.

Also, I do not think you need -DWITH_WSREP=0 for the cmake invocation.

Generated at Thu Feb 08 09:04:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.