Details
Description
magic8 SimpleGrpcServer.exe build failed with the MinGW compiler.
c++.exe: error: unrecognized command-line option '-ignore:4221'
But the msvc2019_64 compiler can build the program correctly.
Here is the output of the configuration and program build.
E:\Src\magic8ball\grpc_server_example\build>cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\git\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_PREFIX_PATH=C:\Qt\6.7.2\mingw_64;C:\Git\vcpkg\installed\x64-windows\share\grpc;C:\Git\vcpkg\installed\x64-windows\share\protobuf -S .. -B . -- The CXX compiler identification is GNU 11.2.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Qt/Tools/mingw1120_64/bin/c++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Found Protobuf: C:/Git/vcpkg/installed/x64-windows/tools/protobuf/protoc.exe (found version "25.1.0") -- Performing Test HAVE_STDATOMIC -- Performing Test HAVE_STDATOMIC - Success -- Found WrapAtomic: TRUE -- Found ZLIB: C:/Git/vcpkg/installed/x64-windows/lib/zlib.lib (found version "1.3.1") -- Found OpenSSL: C:/Git/vcpkg/installed/x64-windows/debug/lib/libcrypto.lib (found version "3.3.1") -- Configuring done (4.3s) -- Generating done (0.1s) -- Build files have been written to: E:/Src/magic8ball/grpc_server_example/buildE:\Src\magic8ball\grpc_server_example\build>cmake --build . [8/8] Linking CXX executable SimpleGrpcServer.exe FAILED: SimpleGrpcServer.exe C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Qt\Tools\mingw1120_64\bin\c++.exe CMakeFiles/SimpleGrpcServer.dir/main.cpp.obj -o SimpleGrpcServer.exe -Wl,--out-implib,libSimpleGrpcServer.dll.a -Wl,--major-image-version,0,--minor-image-version,0 libMagicServerRunner.a C:/Qt/6.7.2/mingw_64/lib/libQt6Core.a -lmpr -luserenv libServerRunner_grpc_gen.a C:/Git/vcpkg/installed/x64-windows/debug/lib/grpc++.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/grpc.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/upb.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/utf8_range.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/re2.lib C:/Git/vcpkg/installed/x64-windows/lib/zlib.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/cares.lib -ladvapi32 -liphlpapi C:/Git/vcpkg/installed/x64-windows/debug/lib/gpr.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/absl_flags_internal.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/absl_flags_reflection.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/absl_flags_config.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/absl_flags_program_name.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/absl_flags_private_handle_accessor.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/absl_flags_commandlineflag.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/absl_flags_commandlineflag_internal.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/absl_flags_marshalling.lib -ignore:4221 C:/Git/vcpkg/installed/x64-windows/debug/lib/libssl.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/libcrypto.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/address_sorting.lib -lwsock32 -lws2_32 -lcrypt32 -lgdi32 C:/Git/vcpkg/installed/x64-windows/debug/lib/libprotobufd.lib C:/Git/vcpkg/installed/x64-windows/debug/lib/abseil_dll.lib -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && C:\WINDOWS\system32\cmd.exe /C "cd /D E:\Src\magic8ball\grpc_server_example\build && C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noprofile -executionpolicy Bypass -file C:/Git/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary E:/Src/magic8ball/grpc_server_example/build/SimpleGrpcServer.exe -installedDir C:/Git/vcpkg/installed/x64-windows/bin -OutVariable out"" c++.exe: error: unrecognized command-line option '-ignore:4221' ninja: build stopped: subcommand failed.
I'm not sure but it seems this build issue is related to the gRPC and abseil issues reported below.
https://github.com/abseil/abseil-cpp/issues/1657
https://github.com/microsoft/vcpkg/issues/39275