Need basic help with unexplained steps building on Windows [Resurrected]

125 views
Skip to first unread message

Kevin Mendel

unread,
Jul 15, 2024, 4:43:53 PM7/15/24
to grpc.io
I am reposting this question because I never got an answer the last time I posted it. To be fair, I stopped pressing for an answer because I had to put the project aside for a while. The original question is here: https://groups.google.com/g/grpc-io/c/Sjap2pyP-Ho

I am trying to follow the build instructions for Windows in BUILDING.md and it is not building. I am now using version gRPC 1.65.0. However, the instructions, as written, SIMPLY FAIL. (Which should be of concern.) 

Please, can anyone spend some time and attention to help me get past this hurdle? I presume it's a matter of undocumented assumptions. 

The first, worst error is this one, which occurs over 100 times (in different files): 

19>###HIDING###\grpc\third_party\boringssl-with-bazel\src\crypto\asn1\../internal.h(136,1): fatal error C1083: Cannot open include file: 'stdalign.h': No such file or directory

These are the steps that I used 

git clone --recurse-submodules -b v1.65.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc

cd \grpc

mkdir cmake\build

cd cmake\build

cmake ..\..

md .build

cd .build

cmake .. -G "Visual Studio 16 2019"

cmake --build . --config Release

And that's where it fails.

As I said last time, it seems to be building with Windows SDDK 10.0.17763.0, which doesn't have stdalign.h. I have 10.0.22000.0 installed, and this version does have stdalign.h. 

But I do not understand how to fix this. 

Kevin Mendel

unread,
Jul 15, 2024, 5:19:53 PM7/15/24
to grpc.io
I tried using 

-DCMAKE_SYSTEM_VERSION=10.0.22000.0 

in various places, totally guessing as to where, and it doesn't seem to help. 

Kevin Mendel

unread,
Jul 16, 2024, 2:57:09 PM7/16/24
to grpc.io
CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION doesn't seem to work either. 
But in all probability I am not specifying this in the correct place. 

Help.

veb...@google.com

unread,
Jul 17, 2024, 3:12:14 PM7/17/24
to grpc.io
Your case appears to be relevant to https://gitlab.kitware.com/cmake/cmake/-/issues/16202#note_140259
This is a cmake issue and there is not much gRPC can do.

Kevin Mendel

unread,
Jul 17, 2024, 6:53:21 PM7/17/24
to grpc.io
Thank you for replying. 

I have tried to parse the contents of that link. 

However, I don't have enough background knowledge to understand the answer. 
This is an answer for gRPC building experts, and as such, it assumes a lot of knowledge that I don't have. 
I am not a gRPC building expert. I have not gotten it to build one single time. And I am not familiar with cmake.
So could you please provide an answer more suitable for someone new to cmake and gRPC?

It sounds like  I need to use  -DCMAKE_SYSTEM_VERSION=10.0 and it will build.

However, I have exhausted myself for several days trying to figure out how to do that. 
I have documented my failing efforts on several threads now. 

Please can you be more explicit and say HOW to use -DCMAKE_SYSTEM_VERSION=10.0 ?
Which cmake command do I use it on? One of them? All of them?
Will -DCMAKE_SYSTEM_VERSION=10.0 give me better results than -DCMAKE_SYSTEM_VERSION=10.0.22000.0 ?

Or maybe I am misinterpreting the conversation at that link. 
If so, then that's where I could use some help. 

Please help.
Kevin

veb...@google.com

unread,
Jul 17, 2024, 11:43:55 PM7/17/24
to grpc.io
I'd like to note that this is a CMake issue where cmake picked a wrong version of Windows SDK when building BoringSSL.
It looks like your environment hit this hairy issue but I'm afraid that I'm not an expert of cmake either but "CMAKE_SYSTEM_VERSION" option should be specified when you run cmake.
You can try installing the latest cmake just in case and if installing gRPC manually is too much for you, you also consider using vcpkg to build gRPC. https://vcpkg.io/en/package/grpc

Kevin Mendel

unread,
Jul 18, 2024, 11:17:31 PM7/18/24
to grpc.io
I keep asking the same question. It seems like a very, very simple question. 

Which cmake command do I use this option on?

This one?

$ mkdir -p cmake/build $ cd cmake/build $ cmake ../..

Or this one?

> md .build > cd .build > cmake .. -G "Visual Studio 16 2019" 

Or this one?

> cmake --build . --config Release 

I cannot make it any simpler than that. 

When I find out that this also doesn't work, at least I will know if I am doing this correctly.

Kevin Mendel

unread,
Jul 25, 2024, 2:19:15 AM7/25/24
to grpc.io
I am still stuck. Can anyone answer?
Reply all
Reply to author
Forward
0 new messages