diff options
-rw-r--r-- | 0001-bazel-adapt-cc_wraper.py-to-python3-7519.patch | 42 | ||||
-rw-r--r-- | 0002-fix-com_github_datadog_dd_opentracing_cpp-build-fail.patch | 65 | ||||
-rw-r--r-- | PKGBUILD | 24 |
3 files changed, 117 insertions, 14 deletions
diff --git a/0001-bazel-adapt-cc_wraper.py-to-python3-7519.patch b/0001-bazel-adapt-cc_wraper.py-to-python3-7519.patch new file mode 100644 index 000000000000..85b622c7ff23 --- /dev/null +++ b/0001-bazel-adapt-cc_wraper.py-to-python3-7519.patch @@ -0,0 +1,42 @@ +From 74e348720af8d157bbdb00b629ac7c6022606fc8 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov <dmitry.rojkov@gmail.com> +Date: Thu, 11 Jul 2019 23:27:19 +0300 +Subject: [PATCH] bazel: adapt cc_wraper.py to python3 (#7519) + +In Arch and Clear linux /usr/bin/python points to python3 causing +build failures due to type mismatch in os.write(): string is used +where bytestring is expected. +Explicitly convert string to bytestring. + +Risk Level: low +Testing: unit tests +Release Notes: N/A +Documentation: N/A + +Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> +--- + bazel/cc_wrapper.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/bazel/cc_wrapper.py b/bazel/cc_wrapper.py +index 53037e67b..41029a05e 100755 +--- a/bazel/cc_wrapper.py ++++ b/bazel/cc_wrapper.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + import contextlib + import os + import shlex +@@ -112,7 +112,7 @@ def main(): + + with closing_fd(new_flagfile_fd): + for arg in new_driver_args: +- os.write(new_flagfile_fd, arg + "\n") ++ os.write(new_flagfile_fd, bytes(str(arg + "\n").encode("utf-8"))) + + # Provide new arguments using the temp file containing the args + new_args = ["@" + new_flagfile_path] +-- +2.22.0 + diff --git a/0002-fix-com_github_datadog_dd_opentracing_cpp-build-fail.patch b/0002-fix-com_github_datadog_dd_opentracing_cpp-build-fail.patch new file mode 100644 index 000000000000..659985350ed3 --- /dev/null +++ b/0002-fix-com_github_datadog_dd_opentracing_cpp-build-fail.patch @@ -0,0 +1,65 @@ +From f9bc4273bad0ecfb291169a88e6c632d69f646ab Mon Sep 17 00:00:00 2001 +From: kXuan <kxuanobj@gmail.com> +Date: Thu, 18 Jul 2019 18:17:22 +0800 +Subject: [PATCH] fix com_github_datadog_dd_opentracing_cpp build failed on gcc + 9 + +Signed-off-by: kXuan <kxuanobj@gmail.com> +--- + bazel/dd-opentracing-cpp.patch | 26 ++++++++++++++++++++++++++ + bazel/repositories.bzl | 6 +++++- + 2 files changed, 31 insertions(+), 1 deletion(-) + create mode 100644 bazel/dd-opentracing-cpp.patch + +diff --git a/bazel/dd-opentracing-cpp.patch b/bazel/dd-opentracing-cpp.patch +new file mode 100644 +index 000000000..227719c7d +--- /dev/null ++++ b/bazel/dd-opentracing-cpp.patch +@@ -0,0 +1,26 @@ ++From ea704f38430f69b6cfdcc2bb1516e65b236bc4cf Mon Sep 17 00:00:00 2001 ++From: Yuval Kohavi <yuval.kohavi@gmail.com> ++Date: Thu, 2 May 2019 18:23:02 -0400 ++Subject: [PATCH] remove redundant move (#94) ++ ++gcc 9 reports this move as redundant ++--- ++ src/tracer.cpp | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++diff --git a/src/tracer.cpp b/src/tracer.cpp ++index 99befe8..0bd9f0e 100644 ++--- a/src/tracer.cpp +++++ b/src/tracer.cpp ++@@ -100,7 +100,7 @@ std::unique_ptr<ot::Span> Tracer::StartSpanWithOptions(ot::string_view operation ++ if (is_trace_root && opts_.environment != "") { ++ span->SetTag(tags::environment, opts_.environment); ++ } ++- return std::move(span); +++ return span; ++ } catch (const std::bad_alloc &) { ++ // At least don't crash. ++ return nullptr; ++-- ++2.22.0 ++ +diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl +index 1c0e6abb5..0f227817b 100644 +--- a/bazel/repositories.bzl ++++ b/bazel/repositories.bzl +@@ -344,7 +344,11 @@ def _com_lightstep_tracer_cpp(): + ) + + def _com_github_datadog_dd_opentracing_cpp(): +- _repository_impl("com_github_datadog_dd_opentracing_cpp") ++ _repository_impl( ++ "com_github_datadog_dd_opentracing_cpp", ++ patch_args = ["-p1"], ++ patches = ["@envoy//bazel:dd-opentracing-cpp.patch"] ++ ) + _repository_impl( + name = "com_github_msgpack_msgpack_c", + build_file = "@com_github_datadog_dd_opentracing_cpp//:bazel/external/msgpack.BUILD", +-- +2.22.0 + @@ -1,7 +1,7 @@ # Maintainer: kXuan <kxuanobj@gmail.com> pkgname=envoyproxy -pkgver=1.10.0 +pkgver=1.11.0 pkgrel=1 pkgdesc="A high performance, open source, general RPC framework that puts mobile and HTTP/2 first." arch=('i686' 'x86_64') @@ -9,30 +9,26 @@ url='https://envoyproxy.io' license=('Apache2') makedepends=('cmake' 'go' 'bazel' 'perl' 'ninja' 'python' 'git') source=( - https://github.com/$pkgname/envoy/archive/v$pkgver.tar.gz + "https://github.com/$pkgname/envoy/archive/v$pkgver.tar.gz" + "0001-bazel-adapt-cc_wraper.py-to-python3-7519.patch" + "0002-fix-com_github_datadog_dd_opentracing_cpp-build-fail.patch" ) -sha512sums=('59f9921642ee4cb34eb7af574a719c8468d45c17da72c2a478817b48fc121a4be7cf4b1a58bbe79261976bcba07ec8be346561f53901dba5ca2f212f65de85f1') +sha512sums=('aebee8e446f673aef0536c06d624cc7a011d32e7e0d6c313e43e11660146412731a597764edfaf3a32db4894831e9412c87cf6b734ce0f0b3f80799aa6691820' + '01ffa67fd8fade4fd1c5d28473fd2f9c2a9734329765f20fb8190bddc51b39c235f72c44e4eadb8eecfd2fe810eeee067c371f1f29e2da530851bbc95d501d73' + '9cfe6ef8f41082bbfff97842d58b022c34d5e3666786a86c991bec0cb0d9a955eae6343ea0ae53d4245f84082b88847e5d1b2cf1519b99e649b7848673536fff') prepare() { cd "envoy-$pkgver" + patch --forward --strip=1 --input="${srcdir}/0001-bazel-adapt-cc_wraper.py-to-python3-7519.patch" + patch --forward --strip=1 --input="${srcdir}/0002-fix-com_github_datadog_dd_opentracing_cpp-build-fail.patch" go get github.com/bazelbuild/buildtools/buildifier # The commit id of $pkgver - echo "37bfd8ac347955661af695a417492655b21939dc" > SOURCE_VERSION + echo "bf169f9d3c8f4c682650c5390c088a4898940913" > SOURCE_VERSION } build() { cd "envoy-$pkgver" - # -fno-plt cause boringssl build failed with this error: - # error while processing "\tjmpq\t*aes_nohw_encrypt@GOTPCREL(%rip) # TAILCALL\n" on line 94: "Cannot rewrite GOTPCREL reference for instruction \"jmpq\"" - if [[ "$CXXFLAGS" == *-fno-plt* ]]; then - echo "NOTE: Found '-fno-plt' in CXXFLAGS. Drop it." - export CXXFLAGS=${CXXFLAGS//-fno-plt/} - fi - if [[ "$CFLAGS" == *-fno-plt* ]]; then - echo "NOTE: Found '-fno-plt' in CFLAGS. Drop it." - export CFLAGS=${CFLAGS//-fno-plt/} - fi bazel build --verbose_failures --workspace_status_command bazel/get_workspace_status -c opt //source/exe:envoy-static } |