Skip to content

Build failed in Japanese version of Windows 11 #4729

@aetos382

Description

@aetos382

What version of OR-Tools and what language are you using?
Version: v9.14
Language: C#

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)

What operating system (Linux, Windows, ...) and version?
Windows 11 24H2 (Japanese)

What did you do?
Steps to reproduce the behavior:

  1. git clone https://github.com/google/or-tools.git
  2. cd or-tools
  3. cmake -S . -Bbuild -DBUILD_DEPS=ON -DBUILD_DOTNET=ON
  4. cmake --build build --target dotnet_package -v
  5. See error

The error occurs even in step3 on the Japanese version of Windows 11.
To work around this, the patch #4725 (comment) is applied.

What did you expect to see
Build succeeds.

What did you see instead?
Errors C2001 and C2143 and warning C4819 occur.

The entire build log is attached below (in Japanese).
build.log

Anything else we should know about your project / environment
Visual Studio 2022 v17.14.9

Workaround

  list(APPEND OR_TOOLS_COMPILE_OPTIONS
    "/bigobj" # Allow big object
    "/DNOMINMAX"
    "/DWIN32_LEAN_AND_MEAN=1"
    "/D_CRT_SECURE_NO_WARNINGS"
    "/D_CRT_SECURE_NO_DEPRECATE"
    "/MP" # Build with multiple processes
    "/Zc:preprocessor" # Enable preprocessor conformance mode
    "/fp:precise"
+   "/source-charset:utf-8"
    )

https://github.com/google/or-tools/blob/v9.14/cmake/cpp.cmake#L101-L110

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions