Skip to content

[Windows][MSVC] Failed to build Google_RE2 with error C2665: 'absl::lts_20250127::MutexLock::MutexLock': no overloaded function could convert all the argument types #628

@KarenHuang2016

Description

@KarenHuang2016

The MSVC team regularly builds popular open-source projects, including yours, with development versions of the build tools in order to find and fix regressions in the compiler and libraries before they can ship and cause trouble for the world. This also allows us to provide advance notice of breaking changes, which is the case here.

Google_RE2 failed to build with error C2665: 'absl::lts_20250127::MutexLock::MutexLock': no overloaded function could convert all the argument types on Windows with MSVC. Could you please help to take a look at this? Thanks in advance!

Repro steps:

  1. git clone https://github.com/google/re2
  2. vcpkg.exe install --x-asset-sources=x-azurl,https://vcpkg.storage.devpackages.microsoft.io/artifacts/;x-block-origin --x-buildtrees-root=C:\vcpkgbt --keep-going --recurse abseil gtest benchmark --triplet x64-windows --clean-after-build
  3. mkdir build_amd64 && cd build_amd64
  4. cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.26100.0 -DCMAKE_TOOLCHAIN_FILE=C:\gitP\Microsoft\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DRE2_BUILD_TESTING=ON ..
  5. cmake --build . -v --config Release --clean-first

Error info:
C:\gitP\google\re2\re2\dfa.cc(1018,20): error C2665: 'absl::lts_20250127::MutexLock::MutexLock': no overloaded function could convert all the argument types [C:\gitP\google\re2\build_arm64_ltcg\re2.vcxproj]

Test log:
Build (1).log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions