Skip to content

Build grpc++ failed related to utf-8 #29979

@hongnod

Description

@hongnod

What version of gRPC and what language are you using?

Grpc v1.46.3 C++

What operating system (Linux, Windows,...) and version?

Windows 10 & 11

What runtime / compiler are you using (e.g. python version or version of gcc)

The CXX compiler identification is MSVC 19.32.31329.0

What did you do?

Please provide either 1) A unit test for reproducing the bug or 2) Specific steps for us to follow to reproduce the bug. If there’s not enough information to debug the problem, gRPC team may close the issue at their discretion. You’re welcome to re-open the issue once you have a reproduction.

  1. RUN:
    cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=D:/Codelabs/libs/grpc_1.46.x_vc14x_x64 -DgRPC_BUILD_TESTS=OFF -DABSL_PROPAGATE_CXX_STD=ON
    cmake --build .
    Build failed. it complained that : \src\core\lib\gprpp\time.cc line 159 newline C2001

  2. MOD CMakeLists.txt ADD CONTENT:
    if(MSVC)
    include(cmake/msvc_static_runtime.cmake)
    add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)
    add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
    add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
    then RUN UP COMMAND AGAIN
    this time failed with:

FAILED: third_party/boringssl-with-bazel/CMakeFiles/crypto.dir/win-x86_64/crypto/chacha/chacha-x86_64.asm.obj
C:\PROGRA~1\NASM\nasm.exe -DBORINGSSL_IMPLEMENTATION -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_WARNINGS -D_STL_EXTRA_DISABLED_WARNINGS="4774 4987" -D_WIN32_WINNT=0x600 -D_WINSOCK_DEPRECATED_NO_WARNINGS -ID:\Codelabs\grpc\v1.46.x\third_party\re2 -ID:\Codelabs\grpc\v1.46.x\third_party\boringssl-with-bazel\src\include -gcv8 /utf-8 -MD third_party\boringssl-with-bazel\CMakeFiles\crypto.dir\win-x86_64\crypto\chacha\chacha-x86_64.asm.obj.d -MT third_party\boringssl-with-bazel\CMakeFiles\crypto.dir\win-x86_64\crypto\chacha\chacha-x86_64.asm.obj -f win64 -o third_party\boringssl-with-bazel\CMakeFiles\crypto.dir\win-x86_64\crypto\chacha\chacha-x86_64.asm.obj D:\Codelabs\grpc\v1.46.x\third_party\boringssl-with-bazel\win-x86_64\crypto\chacha\chacha-x86_64.asm
/utf-8: fatal: more than one input file specified: D:\Codelabs\grpc\v1.46.x\third_party\boringssl-with-bazel\win-x86_64\crypto\chacha\chacha-x86_64.asm

[1725/2096] Building ASM_NASM object third_party\boringssl-with-bazel\CMakeFiles\crypto.dir\win-x86_64\crypto\fipsmodule\aesni-gcm-x86_64.asm.obj
FAILED: third_party/boringssl-with-bazel/CMakeFiles/crypto.dir/win-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.asm.obj
C:\PROGRA~1\NASM\nasm.exe -DBORINGSSL_IMPLEMENTATION -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_WARNINGS -D_STL_EXTRA_DISABLED_WARNINGS="4774 4987" -D_WIN32_WINNT=0x600 -D_WINSOCK_DEPRECATED_NO_WARNINGS -ID:\Codelabs\grpc\v1.46.x\third_party\re2 -ID:\Codelabs\grpc\v1.46.x\third_party\boringssl-with-bazel\src\include -gcv8 /utf-8 -MD third_party\boringssl-with-bazel\CMakeFiles\crypto.dir\win-x86_64\crypto\fipsmodule\aesni-gcm-x86_64.asm.obj.d -MT third_party\boringssl-with-bazel\CMakeFiles\crypto.dir\win-x86_64\crypto\fipsmodule\aesni-gcm-x86_64.asm.obj -f win64 -o third_party\boringssl-with-bazel\CMakeFiles\crypto.dir\win-x86_64\crypto\fipsmodule\aesni-gcm-x86_64.asm.obj D:\Codelabs\grpc\v1.46.x\third_party\boringssl-with-bazel\win-x86_64\crypto\fipsmodule\aesni-gcm-x86_64.asm
/utf-8: fatal: more than one input file specified: D:\Codelabs\grpc\v1.46.x\third_party\boringssl-with-bazel\win-x86_64\crypto\fipsmodule\aesni-gcm-x86_64.asm

What did you expect to see?

build success

What did you see instead?

failed as described
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

See TROUBLESHOOTING.md for how to diagnose problems better.

Anything else we should know about your project / environment?

Cmake Ninja Nasm

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions