grpc icon indicating copy to clipboard operation
grpc copied to clipboard

Can't build on RHEL 6

Open majestix508 opened this issue 10 years ago • 17 comments

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?

majestix508 avatar Dec 23 '15 12:12 majestix508

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.

ctiller avatar Dec 23 '15 16:12 ctiller

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

majestix508 avatar Dec 28 '15 08:12 majestix508

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

majestix508 avatar Dec 28 '15 08:12 majestix508

Hi, think this is related to protobuf (3.0.0)- should I create a Issue in the protobuf project?

majestix508 avatar Jan 08 '16 09:01 majestix508

CC @jtattermusch

jtattermusch avatar Jan 27 '16 00:01 jtattermusch

@majestix508 Solve the problem yet...I also worry for this problem

skywu avatar Feb 20 '16 10:02 skywu

... 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

skywu avatar Feb 20 '16 10:02 skywu

any update on this issue ? I am also facing the same issue.

adityanahan avatar Feb 22 '16 00:02 adityanahan

I also happened this problem in CentOS6. I think also this problem based on protobuf.

maxtortime avatar Apr 13 '16 16:04 maxtortime

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 ?

nicolasnoble avatar Apr 22 '16 17:04 nicolasnoble

@majestix508 is this still an issue? Did @nicolasnoble's suggestions help?

hsaliak avatar Jun 09 '16 20:06 hsaliak

Flagging this as for discussion for GA @jayantkolhe

hsaliak avatar Jun 09 '16 22:06 hsaliak

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.

jayantkolhe avatar Jun 10 '16 00:06 jayantkolhe

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

jtattermusch avatar Jun 10 '16 00:06 jtattermusch

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.

vjpai avatar Jun 10 '16 04:06 vjpai

Closing this issue as C/C++ has been building under gcc-4.4 for some months now.

vjpai avatar Sep 04 '16 07:09 vjpai

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.

ctiller avatar Oct 31 '16 19:10 ctiller