Skip to content

Instantly share code, notes, and snippets.

@vaurelios
Last active August 2, 2017 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vaurelios/747c50874e4ebafbee9684522710d0be to your computer and use it in GitHub Desktop.
Save vaurelios/747c50874e4ebafbee9684522710d0be to your computer and use it in GitHub Desktop.
Patch to make gRPC v1.4.2 build using GCC v7+
--- templates/Makefile.template 2017-07-11 18:11:30.000000000 -0300
+++ templates/Makefile.template 2017-08-01 19:28:51.077076488 -0300
@@ -225,7 +225,7 @@
HOST_LD ?= $(LD)
HOST_LDXX ?= $(LDXX)
- CFLAGS += -std=c99 -Wsign-conversion -Wconversion ${' '.join(warning_var('$(W_%s)', warning) for warning in PREFERRED_WARNINGS)}
+ CFLAGS += -std=c99 -Wsign-conversion -Wno-conversion -Wno-implicit-fallthrough ${' '.join(warning_var('$(W_%s)', warning) for warning in PREFERRED_WARNINGS)}
CXXFLAGS += -std=c++11
% for arg in ['CFLAGS', 'CXXFLAGS', 'CPPFLAGS', 'LDFLAGS', 'DEFINES']:
% if defaults.get('global', []).get(arg, None) is not None:
@vaurelios
Copy link
Author

Please note that this patch is for v1.4.2 release, this is already fixed in master.

gRPC still using openssl-1.0 API, and some(most of?) systems is using openssl-1.1 by default.
you'll need re-generate the Makefile with correct openssl version.

On ArchLinux you can do this as follow:

export PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig
# and then re-generate Makefile
./tools/buildgen/generate_projects.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment