Can't build on RHEL 6
Hi, I can't build on RHEL 6 (6.7, gcc 4.4.7)
I did:
git clone https://github.com/grpc/grpc.git
cd grpc
git submodule update --init
make
and get this error:
...
cc1: warnings being treated as errors
third_party/boringssl/crypto/bio/connect.c: In function ‘split_host_and_port’:
third_party/boringssl/crypto/bio/connect.c:127: error: declaration of ‘close’ shadows a global declaration
/usr/include/unistd.h:350: error: shadowed declaration is here
make: *** [/home/stocking/projects/grpc/objs/opt/third_party/boringssl/crypto/bio/connect.o] Error 1
then I tried to remove -Werror and got this error:
...
In file included from third_party/boringssl/crypto/cipher/tls_cbc.c:58:
third_party/boringssl/include/openssl/sha.h:114: warning: declaration does not declare anything
third_party/boringssl/include/openssl/sha.h:115: warning: declaration does not declare anything
third_party/boringssl/crypto/cipher/tls_cbc.c: In function ‘tls1_sha1_final_raw’:
third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’
third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’
make: *** [/home/stocking/projects/grpc/objs/opt/third_party/boringssl/crypto/cipher/tls_cbc.o] Error 1
Any Ideas what's the problem? Since when gRPC uses boringssl?
Can you try:
make EMBED_OPENSSL=false
On Wed, Dec 23, 2015, 4:11 AM majestix508 [email protected] wrote:
Hi, I can't build on RHEL 6 (6.7, gcc 4.4.7)
I did:
git clone https://github.com/grpc/grpc.git cd grpc git submodule update --init make
and get this error:
... cc1: warnings being treated as errors third_party/boringssl/crypto/bio/connect.c: In function ‘split_host_and_port’: third_party/boringssl/crypto/bio/connect.c:127: error: declaration of ‘close’ shadows a global declaration /usr/include/unistd.h:350: error: shadowed declaration is here make: *** [/home/stocking/projects/grpc/objs/opt/third_party/boringssl/crypto/bio/connect.o] Error 1
then I tried to remove -Werror and got this error:
... In file included from third_party/boringssl/crypto/cipher/tls_cbc.c:58: third_party/boringssl/include/openssl/sha.h:114: warning: declaration does not declare anything third_party/boringssl/include/openssl/sha.h:115: warning: declaration does not declare anything third_party/boringssl/crypto/cipher/tls_cbc.c: In function ‘tls1_sha1_final_raw’: third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’ make: *** [/home/stocking/projects/grpc/objs/opt/third_party/boringssl/crypto/cipher/tls_cbc.o] Error 1
Any Ideas what's the problem? Since when gRPC uses boringssl?
— Reply to this email directly or view it on GitHub https://github.com/grpc/grpc/issues/4571.
one step further.... thanks for the tip - someone should write this in the README or INSTALL file! now I can't build the protobuf dependency
first I got this error on protobuf:
configure.ac:75 :error: possibly undefined macro: AC_PROG_LIBTOOL
If this token is legitimate please use m4_pattern_allow
after a reinstall of the libtool, now I get this error:
[MAKE] Building protobuf
checking whether to enable maintainer-specific portions of Makefiles... yes
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."
make: *** [/home/stocking/projects/grpc/libs/opt/protobuf/libprotobuf.a] Error 1
I tried again, and did a fresh checkout, and get this error again:
[AUTOGEN] Preparing protobuf
configure.ac:87: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/local/bin/autoconf failed with exit status: 1
make: *** [third_party/protobuf/configure] Error 1
Hi, think this is related to protobuf (3.0.0)- should I create a Issue in the protobuf project?
CC @jtattermusch
@majestix508 Solve the problem yet...I also worry for this problem
... third_party/boringssl/crypto/cipher/tls_cbc.c: In function ‘tls1_sha1_final_raw’: third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:232: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:233: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:234: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:235: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’ third_party/boringssl/crypto/cipher/tls_cbc.c:236: error: ‘SHA_CTX’ has no member named ‘h’ make: *** [/home/skywu/share/grpc/objs/opt/third_party/boringssl/crypto/cipher/tls_cbc.o] Error 1
any update on this issue ? I am also facing the same issue.
I also happened this problem in CentOS6. I think also this problem based on protobuf.
So I would recommend NOT cloning grpc recursively, and compiling and installing the submodules dependencies independently. Right now the makefile is trying to help by building these for you, which works in the general case, but not all corner cases can be covered.
Could you try that and let us know ?
@majestix508 is this still an issue? Did @nicolasnoble's suggestions help?
Flagging this as for discussion for GA @jayantkolhe
This seems to be header file inclusion path issue..
#include <openssl/sha.h> is included from https://github.com/google/boringssl/blob/master/crypto/cipher/tls_cbc.c
Instead of choosing https://github.com/google/boringssl/blob/master/include/openssl/sha.h it ends up choosing https://github.com/openssl/openssl/blob/master/include/openssl/sha.h
Was there a specific environment variable set either by user who ran into this or on the system that chose openssl version before boringssl version?
Anyways, this seems more of documentation issue imo.
Yes, for RHEL6 and gcc4.4 you need to fall back to openssl.
https://github.com/grpc/grpc/blob/master/tools/openssl/use_openssl.sh
We also have a portability test demonstrating that at least C core builds with gcc4.4
https://grpc-testing.appspot.com/job/gRPC_portability_master/2889/language=c,scenario=linux_x64_gcc4.4/console
I am currently working on the other issue about C++ for gcc-4.4; as Jan pointed out, that already chooses openssl instead of boring. There are other issues that I will raise with the C++ team.
Closing this issue as C/C++ has been building under gcc-4.4 for some months now.
Pinging this thread: we're currently considering what our C++ compiler support story should be for gRPC 1.1. Input at https://goo.gl/jS2Puz would be greatly appreciated.