-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issues with Win32
/ x86
compilation
#847
Changes from all commits
a7d3757
f0758a9
cff5008
136c211
f7137bb
22b7ff9
fbb27b3
5406491
65526a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,12 +39,7 @@ endif() | |
foreach(_target client server) | ||
add_executable(${_target} "${_target}.cpp") | ||
target_link_libraries( | ||
${_target} | ||
example_grpc_proto | ||
protobuf::libprotobuf | ||
gRPC::grpc++ | ||
gRPC::grpc++_reflection | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because there is no such package / target / library, at least not in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I might be mistaken on this one. But it all compiles without this target. I see where it is mentioned in gRPC build. But I had an issue with that one on Windows.. we do build all examples across all CI loops for CMake? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a library target as below. I think we build all examples in our CMake CI. We probably don't use use the reflection function in gRPC. https://github.com/grpc/grpc/blob/master/CMakeLists.txt#L3146 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, all examples are built so hopefully should be fine :) Though I faintly remember getting link error without this library, but all good if it builds fine in CI. |
||
opentelemetry_trace | ||
opentelemetry_exporter_ostream_span) | ||
${_target} example_grpc_proto protobuf::libprotobuf gRPC::grpc++ | ||
opentelemetry_trace opentelemetry_exporter_ostream_span) | ||
patch_protobuf_targets(${_target}) | ||
endforeach() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are adding this, should we also be checking for 32 bit OS running on 64bit ARM, and set ARCH accordingly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. The issue with unreliable arch detection is unique to Windows x86/x64 (
MSVC
) only. These are Linux-reported architectures. And Linux and Mac are always Okay - truthfully report the actual target system processor, even when cross-compiling withgcc
orclang
.I am not aware of developers building our SDK on Windows-ARM64 host machine, while targeting x86/x64 intel target. I am not sure even if such MSVC toolset (ARM host, Intel target) exists? If those developers using ARM64 host as their developer box hypothetically do exist somewhere, then they may need to explicitly specify the
ARCH
environment variable. That'd solve the issue.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows ARM64 have x86/x64 MSVC run under emulation. There is no native ARM64 MSVC as for now.