You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of gRPC and what language are you using?
gRPC version v1.37.0
language python
What operating system (Linux, Windows,...) and version?
Linux. rhel 7.9
What runtime / compiler are you using (e.g. python version or version of gcc)
gcc gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
What did you do?
cloned the latest version of grpc/grpc repository and did a bazel build @com_github_grpc_grpc//:envoy_annotations_upb
Also tried building with flags --cxxopt=-std=c++11, still didn't work
What did you expect to see?
that the target passes
What did you see instead?
ERROR: /home/basav/grpc/BUILD:3481:16: C++ compilation of rule '//:google_api_upb' failed (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 40 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 40 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
In file included from external/upb/upb/upb.h:15:0,
from external/upb/upb/table.int.h:25,
from external/upb/upb/msg.h:15,
from src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c:10:
external/upb/upb/port_def.inc:27:2: error: #error upb requires C99 or C++11 or MSVC >= 2015.
#error upb requires C99 or C++11 or MSVC >= 2015.
^
Anything else we should know about your project / environment?
NA
The text was updated successfully, but these errors were encountered:
@basavaraj29 It isn't clear to me why upb fails to get proper __STDC_VERSION__ nor __cplusplus. This has been like this for a while, I suspect that this is bazel or rhel specific. Beside this error, gcc 4.8 is now too old to build gRPC so I recommend to use later versions of gcc, which possibly solves this very problem as well). It appears that you can use gcc 7 on RHEL 7 (doc).
I'm going to close this, since gcc 4.8 isn't supported (see the list of supported compilers and environments here: https://grpc.io/docs/). Please feel free to reopen this if you're still facing the same problem with a newer compiler.
Post upgrading to gcc 8.3.1, I still faced the same issue on rhel. Including the flag --incompatible_linkopts_to_linklibs solved the issue for me. bazelbuild/bazel#9254
And as you guys rightly pointed out, it didn't work with gcc 4.8 despite providing the flag. thank you @veblush, @drfloob
What version of gRPC and what language are you using?
gRPC version
v1.37.0
language
python
What operating system (Linux, Windows,...) and version?
Linux. rhel 7.9
What runtime / compiler are you using (e.g. python version or version of gcc)
gcc
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
What did you do?
cloned the latest version of
grpc/grpc
repository and did abazel build @com_github_grpc_grpc//:envoy_annotations_upb
Also tried building with flags
--cxxopt=-std=c++11
, still didn't workWhat did you expect to see?
that the target passes
What did you see instead?
Anything else we should know about your project / environment?
NA
The text was updated successfully, but these errors were encountered: