From 2aa194329b7d89f6db7b9c722aced44d495d1e87 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 18 Apr 2017 12:27:44 -0700 Subject: c-ares mingw32 support --- Makefile | 4 ++-- Rakefile | 2 +- build.yaml | 5 +++-- third_party/cares/ares_build.h | 10 ++++++++++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 01e06f1003..9e3daabe40 100644 --- a/Makefile +++ b/Makefile @@ -8241,8 +8241,8 @@ PUBLIC_HEADERS_C += \ LIBARES_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBARES_SRC)))) -$(LIBARES_OBJS): CPPFLAGS += -Ithird_party/cares -Ithird_party/cares/cares $(if $(subst Linux,,$(SYSTEM)),,-Ithird_party/cares/config_linux) $(if $(subst Darwin,,$(SYSTEM)),,-Ithird_party/cares/config_darwin) -fvisibility=hidden -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DHAVE_CONFIG_H -$(LIBARES_OBJS): CFLAGS += -Wno-sign-conversion -Wno-invalid-source-encoding +$(LIBARES_OBJS): CPPFLAGS += -Ithird_party/cares -Ithird_party/cares/cares $(if $(subst Linux,,$(SYSTEM)),,-Ithird_party/cares/config_linux) $(if $(subst Darwin,,$(SYSTEM)),,-Ithird_party/cares/config_darwin) -fvisibility=hidden -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(if $(subst MINGW32,,$(SYSTEM)),-DHAVE_CONFIG_H,) +$(LIBARES_OBJS): CFLAGS += -Wno-sign-conversion $(if $(subst MINGW32,,$(SYSTEM)),-Wno-invalid-source-encoding,) $(LIBDIR)/$(CONFIG)/libares.a: $(ZLIB_DEP) $(LIBARES_OBJS) $(E) "[AR] Creating $@" diff --git a/Rakefile b/Rakefile index cc02aa130a..7f8d3a2f4a 100755 --- a/Rakefile +++ b/Rakefile @@ -80,7 +80,7 @@ task 'dlls' do grpc_config = ENV['GRPC_CONFIG'] || 'opt' verbose = ENV['V'] || '0' - env = 'CPPFLAGS="-D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -Wno-unused-variable -Wno-unused-result" ' + env = 'CPPFLAGS="-D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -Wno-unused-variable -Wno-unused-result -DCARES_STATICLIB" ' env += 'LDFLAGS=-static ' env += 'SYSTEM=MINGW32 ' env += 'EMBED_ZLIB=true ' diff --git a/build.yaml b/build.yaml index 781118f307..fbef42502d 100644 --- a/build.yaml +++ b/build.yaml @@ -4407,10 +4407,11 @@ configs: UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=tools/ubsan_suppressions.txt defaults: ares: - CFLAGS: -Wno-sign-conversion -Wno-invalid-source-encoding + CFLAGS: -Wno-sign-conversion $(if $(subst MINGW32,,$(SYSTEM)),-Wno-invalid-source-encoding,) CPPFLAGS: -Ithird_party/cares -Ithird_party/cares/cares $(if $(subst Linux,,$(SYSTEM)),,-Ithird_party/cares/config_linux) $(if $(subst Darwin,,$(SYSTEM)),,-Ithird_party/cares/config_darwin) -fvisibility=hidden - -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DHAVE_CONFIG_H + -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(if $(subst + MINGW32,,$(SYSTEM)),-DHAVE_CONFIG_H,) benchmark: CPPFLAGS: -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX boringssl: diff --git a/third_party/cares/ares_build.h b/third_party/cares/ares_build.h index 7d69f1e6ae..d6b3d49f37 100644 --- a/third_party/cares/ares_build.h +++ b/third_party/cares/ares_build.h @@ -251,4 +251,14 @@ typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; #endif +/* Undefine UNICODE, as c-ares does not use the ANSI version of functions */ +/* explicitly. */ +#ifdef UNICODE +# undef UNICODE +#endif + +#ifdef _UNICODE +# undef _UNICODE +#endif + #endif /* __CARES_BUILD_H */ -- cgit v1.2.3 From 98058337767a2d4ca2a75215292060bfbb2edd76 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 19 Apr 2017 10:25:34 -0700 Subject: Add flag to compile gpr with compatibility for musl --- binding.gyp | 11 ++++++++++- include/grpc/impl/codegen/port_platform.h | 2 +- src/core/lib/iomgr/port.h | 1 + src/core/lib/support/cpu_linux.c | 8 ++++---- src/core/lib/support/wrap_memcpy.c | 4 +++- templates/binding.gyp.template | 11 ++++++++++- tools/run_tests/artifacts/build_artifact_node.sh | 2 +- 7 files changed, 30 insertions(+), 9 deletions(-) diff --git a/binding.gyp b/binding.gyp index 16334a22a7..551765717f 100644 --- a/binding.gyp +++ b/binding.gyp @@ -47,7 +47,11 @@ # will let users recompile gRPC to work without ALPN. 'grpc_alpn%': 'true', # Indicates that the library should be built with gcov. - 'grpc_gcov%': 'false' + 'grpc_gcov%': 'false', + # Indicates that the library should be built with compatibility for musl + # libc, so that it can run on Alpine Linux. This is only necessary if not + # building on Alpine Linux + 'grpc_alpine%': 'false' }, 'target_defaults': { 'configurations': { @@ -115,6 +119,11 @@ '-rdynamic', ], }], + ['grpc_alpine=="true"', { + 'defines': [ + 'GPR_MUSL_LIBC_COMPAT' + ] + }], ['OS!="win" and runtime=="electron"', { "defines": [ 'OPENSSL_NO_THREADS' diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 813e08b86e..a149279b72 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -189,7 +189,7 @@ #ifdef __GLIBC__ #define GPR_POSIX_CRASH_HANDLER 1 #else /* musl libc */ -#define GRPC_MSG_IOVLEN_TYPE int +#define GPR_MUSL_LIBC_COMPAT 1 #endif #elif defined(__APPLE__) #include diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index 269dc35003..2a553f4114 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -88,6 +88,7 @@ #ifndef __GLIBC__ #define GRPC_LINUX_EPOLL 1 #define GRPC_LINUX_EVENTFD 1 +#define GRPC_MSG_IOVLEN_TYPE int #endif #ifndef GRPC_LINUX_EVENTFD #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 diff --git a/src/core/lib/support/cpu_linux.c b/src/core/lib/support/cpu_linux.c index 1e50f59823..b826dde160 100644 --- a/src/core/lib/support/cpu_linux.c +++ b/src/core/lib/support/cpu_linux.c @@ -67,16 +67,16 @@ unsigned gpr_cpu_num_cores(void) { } unsigned gpr_cpu_current_cpu(void) { -#ifdef __GLIBC__ +#ifdef GPR_MUSL_LIBC_COMPAT + // sched_getcpu() is undefined on musl + return 0; +#else int cpu = sched_getcpu(); if (cpu < 0) { gpr_log(GPR_ERROR, "Error determining current CPU: %s\n", strerror(errno)); return 0; } return (unsigned)cpu; -#else - // sched_getcpu() is undefined on musl - return 0; #endif } diff --git a/src/core/lib/support/wrap_memcpy.c b/src/core/lib/support/wrap_memcpy.c index 050cc6db5e..deb8d6b198 100644 --- a/src/core/lib/support/wrap_memcpy.c +++ b/src/core/lib/support/wrap_memcpy.c @@ -31,6 +31,8 @@ * */ +#include + #include /* Provide a wrapped memcpy for targets that need to be backwards @@ -40,7 +42,7 @@ */ #ifdef __linux__ -#if defined(__x86_64__) && defined(__GNU_LIBRARY__) +#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT) __asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); void *__wrap_memcpy(void *destination, const void *source, size_t num) { return memcpy(destination, source, num); diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index a2e8c58892..395a389bc0 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -49,7 +49,11 @@ # will let users recompile gRPC to work without ALPN. 'grpc_alpn%': 'true', # Indicates that the library should be built with gcov. - 'grpc_gcov%': 'false' + 'grpc_gcov%': 'false', + # Indicates that the library should be built with compatibility for musl + # libc, so that it can run on Alpine Linux. This is only necessary if not + # building on Alpine Linux + 'grpc_alpine%': 'false' }, 'target_defaults': { 'configurations': { @@ -105,6 +109,11 @@ % endif % endfor }], + ['grpc_alpine=="true"', { + 'defines': [ + 'GPR_MUSL_LIBC_COMPAT' + ] + }], ['OS!="win" and runtime=="electron"', { "defines": [ 'OPENSSL_NO_THREADS' diff --git a/tools/run_tests/artifacts/build_artifact_node.sh b/tools/run_tests/artifacts/build_artifact_node.sh index 2da2ac5f91..7a747551e8 100755 --- a/tools/run_tests/artifacts/build_artifact_node.sh +++ b/tools/run_tests/artifacts/build_artifact_node.sh @@ -48,7 +48,7 @@ electron_versions=( 1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 ) for version in ${node_versions[@]} do - ./node_modules/.bin/node-pre-gyp configure rebuild package testpackage --target=$version --target_arch=$NODE_TARGET_ARCH + ./node_modules/.bin/node-pre-gyp configure rebuild package testpackage --target=$version --target_arch=$NODE_TARGET_ARCH --grpc_alpine=true cp -r build/stage/* artifacts/ done -- cgit v1.2.3 From 8ab2df145dd99425bff776918f1b82b4c5059ab7 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 13 Apr 2017 19:09:00 -0700 Subject: Fix PHP interop tests --- third_party/protobuf | 2 +- tools/distrib/python/grpcio_tools/protoc_lib_deps.py | 2 +- tools/run_tests/run_tests_matrix.py | 11 +---------- tools/run_tests/sanity/check_submodules.sh | 2 +- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/third_party/protobuf b/third_party/protobuf index 4a0dd03e52..593e917c17 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit 4a0dd03e52e09332c8fd0f8f26a8e0ae9f911182 +Subproject commit 593e917c176b5bc5aafa57bf9f6030d749d91cd5 diff --git a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py index 7e8cd987d5..c2aa6198b3 100644 --- a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py +++ b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # AUTO-GENERATED BY make_grpcio_tools.py! -CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/php/php_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/well_known_types_embed.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension_lite.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/util/delimited_message_util.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc', 'google/protobuf/compiler/js/embed.cc'] +CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/php/php_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/well_known_types_embed.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension_lite.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc', 'google/protobuf/compiler/js/embed.cc'] PROTO_FILES=['google/protobuf/wrappers.proto', 'google/protobuf/type.proto', 'google/protobuf/timestamp.proto', 'google/protobuf/struct.proto', 'google/protobuf/source_context.proto', 'google/protobuf/field_mask.proto', 'google/protobuf/empty.proto', 'google/protobuf/duration.proto', 'google/protobuf/descriptor.proto', 'google/protobuf/compiler/plugin.proto', 'google/protobuf/api.proto', 'google/protobuf/any.proto'] CC_INCLUDE='third_party/protobuf/src' diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py index 8bc8236b24..1da754d9f8 100755 --- a/tools/run_tests/run_tests_matrix.py +++ b/tools/run_tests/run_tests_matrix.py @@ -198,7 +198,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS) extra_args=extra_args, inner_jobs=inner_jobs) - for compiler in ['gcc4.8', 'gcc5.3', 'gcc_musl', + for compiler in ['gcc4.8', 'gcc5.3', 'clang3.5', 'clang3.6', 'clang3.7']: test_jobs += _generate_jobs(languages=['c++'], configs=['dbg'], @@ -257,15 +257,6 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS) extra_args=extra_args, inner_jobs=inner_jobs) - test_jobs += _generate_jobs(languages=['python'], - configs=['dbg'], - platforms=['linux'], - arch='default', - compiler='python_alpine', - labels=['portability'], - extra_args=extra_args, - inner_jobs=inner_jobs) - test_jobs += _generate_jobs(languages=['csharp'], configs=['dbg'], platforms=['linux'], diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index eaf5a0580e..c5a0dbbef3 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -46,7 +46,7 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules 886e7d75368e3f4fab3f4d0d3584e4abfc557755 third_party/boringssl-with-bazel (version_for_cocoapods_7.0-857-g886e7d7) 30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e third_party/gflags (v2.2.0) ec44c6c1675c25b9827aacd08c02433cccde7780 third_party/googletest (release-1.8.0) - 4a0dd03e52e09332c8fd0f8f26a8e0ae9f911182 third_party/protobuf (v3.1.0-alpha-1-548-g4a0dd03e) + 593e917c176b5bc5aafa57bf9f6030d749d91cd5 third_party/protobuf (v3.1.0-alpha-1-326-g593e917) bcad91771b7f0bff28a1cac1981d7ef2b9bcef3c third_party/thrift (bcad917) 50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8) 7691f773af79bf75a62d1863fd0f13ebf9dc51b1 third_party/cares/cares (1.12.0) -- cgit v1.2.3 From 633933ee0b516c31ba533fb9619b3fb39aa0d6bd Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 19 Apr 2017 13:23:06 -0700 Subject: Node: Don't depend on cares npm package --- binding.gyp | 3 --- package.json | 3 +-- templates/binding.gyp.template | 7 ------- templates/package.json.template | 3 +-- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/binding.gyp b/binding.gyp index 16334a22a7..d5942a05ce 100644 --- a/binding.gyp +++ b/binding.gyp @@ -569,7 +569,6 @@ }] ], 'targets': [ - { 'cflags': [ '-std=c99', @@ -648,7 +647,6 @@ 'type': 'static_library', 'dependencies': [ 'gpr', - 'node_modules/cares/deps/cares/cares.gyp:cares', ], 'sources': [ 'src/core/lib/surface/init.c', @@ -951,7 +949,6 @@ "dependencies": [ "grpc", "gpr", - "node_modules/cares/deps/cares/cares.gyp:cares", ] }, { diff --git a/package.json b/package.json index d4f7b56b6a..38312731c2 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,7 @@ "lodash": "^4.15.0", "nan": "^2.0.0", "node-pre-gyp": "^0.6.0", - "protobufjs": "^6.7.0", - "cares": "^1.1.5" + "protobufjs": "^6.7.0" }, "devDependencies": { "async": "^2.0.1", diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index a2e8c58892..062900de14 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -264,13 +264,6 @@ }] ], 'targets': [ - <% - for lib in libs: - if 'grpc' in lib.transitive_deps or lib.name == 'grpc': - lib.deps.append('node_modules/cares/deps/cares/cares.gyp:cares') - for module in node_modules: - module.deps.append('node_modules/cares/deps/cares/cares.gyp:cares') - %> % for module in node_modules: % for lib in libs: % if lib.name in module.transitive_deps and lib.name not in ('boringssl', 'z'): diff --git a/templates/package.json.template b/templates/package.json.template index b69fd28d2a..3bae8fde43 100644 --- a/templates/package.json.template +++ b/templates/package.json.template @@ -36,8 +36,7 @@ "lodash": "^4.15.0", "nan": "^2.0.0", "node-pre-gyp": "^0.6.0", - "protobufjs": "^6.7.0", - "cares": "^1.1.5" + "protobufjs": "^6.7.0" }, "devDependencies": { "async": "^2.0.1", -- cgit v1.2.3 From 652210ac2b5ec0b93d9a57bbeb275c334c2b29c9 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 19 Apr 2017 13:46:32 -0700 Subject: Node: fix the cases where zlib is built --- binding.gyp | 4 ++++ templates/binding.gyp.template | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/binding.gyp b/binding.gyp index d5942a05ce..9794c87343 100644 --- a/binding.gyp +++ b/binding.gyp @@ -535,6 +535,10 @@ } ] }, + ] + }], + ['OS == "win"', { + 'targets': [ # Only want to compile zlib under Windows { 'cflags': [ diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index 062900de14..c08c100fd5 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -233,6 +233,10 @@ } ] }, + ] + }], + ['OS == "win"', { + 'targets': [ # Only want to compile zlib under Windows % for module in node_modules: % for lib in libs: -- cgit v1.2.3 From fa729ed914e357e7779afd7a0d77dd4dc1c3dfa8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 20 Apr 2017 10:49:11 +0200 Subject: expose grpc.so_reuseport in C# --- src/csharp/Grpc.Core/ChannelOptions.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/csharp/Grpc.Core/ChannelOptions.cs b/src/csharp/Grpc.Core/ChannelOptions.cs index 46a2c6695f..5de9b1ee3c 100644 --- a/src/csharp/Grpc.Core/ChannelOptions.cs +++ b/src/csharp/Grpc.Core/ChannelOptions.cs @@ -172,6 +172,9 @@ namespace Grpc.Core /// Secondary user agent: goes at the end of the user-agent metadata public const string SecondaryUserAgentString = "grpc.secondary_user_agent"; + /// If non-zero, allow the use of SO_REUSEPORT for server if it's available (default 1) + public const string SoReuseport = "grpc.so_reuseport"; + /// /// Creates native object for a collection of channel options. /// -- cgit v1.2.3 From 7c7865b0e12d1f2c93bc57b4ab825bb8ddba2b2e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 20 Apr 2017 11:39:37 +0200 Subject: eliminate crosstalk between C# tests --- src/csharp/Grpc.Core.Tests/MockServiceHelper.cs | 3 ++- src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs | 3 ++- src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs | 3 ++- src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs | 3 ++- src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs | 3 ++- src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs | 3 ++- src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs | 3 ++- src/csharp/Grpc.Reflection.Tests/ReflectionClientServerTest.cs | 3 ++- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs b/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs index 4d90470056..c57c260c96 100644 --- a/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs +++ b/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs @@ -141,7 +141,8 @@ namespace Grpc.Core.Tests { if (server == null) { - server = new Server + // Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755 + server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) }) { Services = { serviceDefinition }, Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } } diff --git a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs index 50dacc2eaa..02bcd18cb5 100644 --- a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs +++ b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs @@ -55,7 +55,8 @@ namespace Math.Tests [TestFixtureSetUp] public void Init() { - server = new Server + // Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755 + server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) }) { Services = { Math.BindService(new MathServiceImpl()) }, Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } } diff --git a/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs b/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs index 25a58fb386..0ebc3c3370 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs +++ b/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs @@ -57,7 +57,8 @@ namespace Grpc.HealthCheck.Tests { serviceImpl = new HealthServiceImpl(); - server = new Server + // Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755 + server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) }) { Services = { Grpc.Health.V1.Health.BindService(serviceImpl) }, Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } } diff --git a/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs b/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs index 4216dc1d6b..780a9b7304 100644 --- a/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs @@ -54,7 +54,8 @@ namespace Grpc.IntegrationTesting [SetUp] public void Init() { - server = new Server + // Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755 + server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) }) { Services = { TestService.BindService(new UnimplementedTestServiceImpl()) }, Ports = { { Host, ServerPort.PickUnused, SslServerCredentials.Insecure } } diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs index 4960a53f92..04f833fcf5 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs @@ -56,7 +56,8 @@ namespace Grpc.IntegrationTesting [TestFixtureSetUp] public void Init() { - server = new Server + // Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755 + server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) }) { Services = { TestService.BindService(new TestServiceImpl()) }, Ports = { { Host, ServerPort.PickUnused, TestCredentials.CreateSslServerCredentials() } } diff --git a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs index d55e658d94..ef63f530f6 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs @@ -56,7 +56,8 @@ namespace Grpc.IntegrationTesting [SetUp] public void Init() { - server = new Server + // Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755 + server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) }) { Services = { TestService.BindService(new FakeTestService()) }, Ports = { { Host, ServerPort.PickUnused, TestCredentials.CreateSslServerCredentials() } } diff --git a/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs index 377dad63f4..48ecc2344f 100644 --- a/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs @@ -67,7 +67,8 @@ namespace Grpc.IntegrationTesting var serverCredentials = new SslServerCredentials(new[] { keyCertPair }, rootCert, true); var clientCredentials = new SslCredentials(rootCert, keyCertPair); - server = new Server + // Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755 + server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) }) { Services = { TestService.BindService(new SslCredentialsTestServiceImpl()) }, Ports = { { Host, ServerPort.PickUnused, serverCredentials } } diff --git a/src/csharp/Grpc.Reflection.Tests/ReflectionClientServerTest.cs b/src/csharp/Grpc.Reflection.Tests/ReflectionClientServerTest.cs index 1d0845e276..22edbed040 100644 --- a/src/csharp/Grpc.Reflection.Tests/ReflectionClientServerTest.cs +++ b/src/csharp/Grpc.Reflection.Tests/ReflectionClientServerTest.cs @@ -58,7 +58,8 @@ namespace Grpc.Reflection.Tests { serviceImpl = new ReflectionServiceImpl(ServerReflection.Descriptor); - server = new Server + // Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755 + server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) }) { Services = { ServerReflection.BindService(serviceImpl) }, Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } } -- cgit v1.2.3 From 58011453bcb1eb450fccde2d2381d2a615f6720f Mon Sep 17 00:00:00 2001 From: makdharma Date: Thu, 20 Apr 2017 09:33:48 -0700 Subject: Merge pull request #10733 from makdharma/mongoose disable mongoose --- WORKSPACE | 6 ------ tools/grpcz/BUILD | 1 - tools/grpcz/grpcz_client.cc | 8 ++++++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 5a3c4de0af..5ba82f3127 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -77,12 +77,6 @@ local_repository( path = "third_party/gflags", ) -git_repository( - name = "mongoose_repo", - commit = "4120a97945b41195a6223a600dae8e3b19bed19e", - remote = "https://github.com/makdharma/mongoose.git" -) - new_local_repository( name = "submodule_benchmark", path = "third_party/benchmark", diff --git a/tools/grpcz/BUILD b/tools/grpcz/BUILD index 5e1faf7064..cac7df2a9d 100644 --- a/tools/grpcz/BUILD +++ b/tools/grpcz/BUILD @@ -58,6 +58,5 @@ cc_binary( deps = [ "//external:gflags", "monitoring_proto", - "@mongoose_repo//:mongoose_lib", ], ) diff --git a/tools/grpcz/grpcz_client.cc b/tools/grpcz/grpcz_client.cc index 47eec8dfc3..a5e66f7b54 100644 --- a/tools/grpcz/grpcz_client.cc +++ b/tools/grpcz/grpcz_client.cc @@ -38,7 +38,7 @@ #include #include "gflags/gflags.h" -#include "mongoose.h" +/* #include "mongoose.h" */ // TODO (makdharma): remove local copies of these protos #include "tools/grpcz/census.grpc.pb.h" @@ -122,8 +122,9 @@ class GrpczClient { std::unique_ptr stub_; }; -static struct mg_serve_http_opts s_http_server_opts; std::unique_ptr g_grpcz_client; +/* +static struct mg_serve_http_opts s_http_server_opts; static void ev_handler(struct mg_connection *nc, int ev, void *p) { if (ev == MG_EV_HTTP_REQUEST) { @@ -141,6 +142,7 @@ static void grpcz_handler(struct mg_connection *nc, int ev, void *ev_data) { mg_printf(nc, "HTTP/1.0 200 OK\r\n\r\n%s", rendered_html.c_str()); nc->flags |= MG_F_SEND_AND_CLOSE; } +*/ int main(int argc, char **argv) { gflags::ParseCommandLineFlags(&argc, &argv, true); @@ -156,6 +158,7 @@ int main(int argc, char **argv) { return 0; } + /* // Set up a mongoose webserver handler struct mg_mgr mgr; mg_mgr_init(&mgr, NULL); @@ -177,5 +180,6 @@ int main(int argc, char **argv) { mg_mgr_poll(&mgr, k_sleep_millis); } mg_mgr_free(&mgr); + */ return 0; } -- cgit v1.2.3 From b4d33e07a7f053b9420dae7b8e4de0372468bddf Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 20 Apr 2017 16:41:25 -0700 Subject: Disable c-ares for x64 windows python --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e050646475..b1ac4f326e 100644 --- a/setup.py +++ b/setup.py @@ -141,6 +141,8 @@ CYTHON_EXTENSION_MODULE_NAMES = ('grpc._cython.cygrpc',) CYTHON_HELPER_C_FILES = () CORE_C_FILES = tuple(grpc_core_dependencies.CORE_SOURCE_FILES) +if "win32" in sys.platform and "64bit" in platform.architecture()[0]: + CORE_C_FILES = filter(lambda x: 'third_party/cares' not in x, CORE_C_FILES) EXTENSION_INCLUDE_DIRECTORIES = ( (PYTHON_STEM,) + CORE_INCLUDE + BORINGSSL_INCLUDE + ZLIB_INCLUDE + @@ -160,7 +162,9 @@ DEFINE_MACROS = ( if "win32" in sys.platform: DEFINE_MACROS += (('WIN32_LEAN_AND_MEAN', 1), ('CARES_STATICLIB', 1),) if '64bit' in platform.architecture()[0]: - DEFINE_MACROS += (('MS_WIN64', 1),) + # TODO(zyc): Re-enble c-ares on x64 windows after fixing the + # ares_library_init compilation issue + DEFINE_MACROS += (('MS_WIN64', 1), ('GRPC_ARES', 0),) elif sys.version_info >= (3, 5): # For some reason, this is needed to get access to inet_pton/inet_ntop # on msvc, but only for 32 bits -- cgit v1.2.3