This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push: new fb6dc6062 [build] thirdparty issues on Ubuntu 21.10 fb6dc6062 is described below commit fb6dc60621aa49f214b06d70527860c6a26c0e15 Author: Zoltan Chovan <zcho...@cloudera.com> AuthorDate: Fri Apr 1 17:11:21 2022 +0200 [build] thirdparty issues on Ubuntu 21.10 Three issues popped up during thirdparty build on Ubuntu 21.10: * The linux kernel has removed the interface to cyclades, which led to llvm build failure: https://reviews.llvm.org/rG68d5235cb58f988c71b403334cd9482d663841ab#change-OqOKlUOZCPKc * Missing include which led to llvm build failure: https://reviews.llvm.org/rGb498303066a63a203d24f739b2d2e0e56dca70d1 * A cast mismatch that led to breakpad build failure Change-Id: I2d019ea6b2c5319252a78855bfe84e0f17acb535 Reviewed-on: http://gerrit.cloudera.org:8080/18381 Tested-by: Kudu Jenkins Reviewed-by: Attila Bukor <abu...@apache.org> Reviewed-by: Alexey Serbin <ale...@apache.org> --- thirdparty/download-thirdparty.sh | 11 +- thirdparty/patches/breakpad-SIGSTKSZ-error.patch | 11 ++ thirdparty/patches/llvm-fix-missing-include.patch | 21 ++++ ...vm-remove-cyclades-inclusion-in-sanitizer.patch | 117 +++++++++++++++++++++ 4 files changed, 156 insertions(+), 4 deletions(-) diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh index b35aa01f0..e7bf40071 100755 --- a/thirdparty/download-thirdparty.sh +++ b/thirdparty/download-thirdparty.sh @@ -329,7 +329,7 @@ fetch_and_patch \ $PYTHON_SOURCE \ $PYTHON_PATCHLEVEL -LLVM_PATCHLEVEL=5 +LLVM_PATCHLEVEL=6 fetch_and_patch \ llvm-${LLVM_VERSION}-iwyu-${IWYU_VERSION}.src.tar.gz \ $LLVM_SOURCE \ @@ -338,7 +338,9 @@ fetch_and_patch \ "patch -p1 < $TP_DIR/patches/llvm-iwyu-include-picker.patch" \ "patch -p1 < $TP_DIR/patches/llvm-MicrosoftDemangleNodes-e0402b5c9813a2458b8dd3f640883110db280395.patch" \ "patch -p0 < $TP_DIR/patches/llvm-iwyu-sized-deallocation.patch" \ - "patch -d projects -p1 < $TP_DIR/patches/llvm-947f9692440836dcb8d88b74b69dd379d85974ce.patch" + "patch -d projects -p1 < $TP_DIR/patches/llvm-947f9692440836dcb8d88b74b69dd379d85974ce.patch" \ + "patch -d projects -p1 < $TP_DIR/patches/llvm-remove-cyclades-inclusion-in-sanitizer.patch" \ + "patch -p2 < $TP_DIR/patches/llvm-fix-missing-include.patch" LZ4_PATCHLEVEL=0 fetch_and_patch \ @@ -364,13 +366,14 @@ fetch_and_patch \ $BOOST_SOURCE \ $BOOST_PATCHLEVEL -BREAKPAD_PATCHLEVEL=2 +BREAKPAD_PATCHLEVEL=3 fetch_and_patch \ breakpad-${BREAKPAD_VERSION}.tar.gz \ $BREAKPAD_SOURCE \ $BREAKPAD_PATCHLEVEL \ "patch -p1 < $TP_DIR/patches/breakpad-add-basic-support-for-dwz-dwarf-extension.patch" \ - "patch -p1 < $TP_DIR/patches/breakpad-syscall-rsp-clobber-fix.patch" + "patch -p1 < $TP_DIR/patches/breakpad-syscall-rsp-clobber-fix.patch" \ + "patch -p0 < $TP_DIR/patches/breakpad-SIGSTKSZ-error.patch" SPARSEHASH_PATCHLEVEL=3 fetch_and_patch \ diff --git a/thirdparty/patches/breakpad-SIGSTKSZ-error.patch b/thirdparty/patches/breakpad-SIGSTKSZ-error.patch new file mode 100644 index 000000000..0045a4dc6 --- /dev/null +++ b/thirdparty/patches/breakpad-SIGSTKSZ-error.patch @@ -0,0 +1,11 @@ +--- src/client/linux/handler/exception_handler.cc 2022-04-01 18:31:33.463554421 +0200 ++++ src/client/linux/handler/exception_handler.cc 2022-04-01 18:32:20.503739341 +0200 +@@ -138,7 +138,7 @@ + // SIGSTKSZ may be too small to prevent the signal handlers from overrunning + // the alternative stack. Ensure that the size of the alternative stack is + // large enough. +- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); ++ static const unsigned kSigStackSize = std::max(16384u, (unsigned)SIGSTKSZ); + + // Only set an alternative stack if there isn't already one, or if the current + // one is too small. diff --git a/thirdparty/patches/llvm-fix-missing-include.patch b/thirdparty/patches/llvm-fix-missing-include.patch new file mode 100644 index 000000000..373af741b --- /dev/null +++ b/thirdparty/patches/llvm-fix-missing-include.patch @@ -0,0 +1,21 @@ +From b498303066a63a203d24f739b2d2e0e56dca70d1 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille <sguel...@redhat.com> +Date: Tue, 10 Nov 2020 14:55:25 +0100 +Subject: [PATCH] [nfc] Fix missing include + +--- + llvm/utils/benchmark/src/benchmark_register.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h +index 0705e219f2fa2..4caa5ad4da079 100644 +--- a/llvm/utils/benchmark/src/benchmark_register.h ++++ b/llvm/utils/benchmark/src/benchmark_register.h +@@ -1,6 +1,7 @@ + #ifndef BENCHMARK_REGISTER_H + #define BENCHMARK_REGISTER_H + ++#include <limits> + #include <vector> + + #include "check.h" diff --git a/thirdparty/patches/llvm-remove-cyclades-inclusion-in-sanitizer.patch b/thirdparty/patches/llvm-remove-cyclades-inclusion-in-sanitizer.patch new file mode 100644 index 000000000..e77121a2b --- /dev/null +++ b/thirdparty/patches/llvm-remove-cyclades-inclusion-in-sanitizer.patch @@ -0,0 +1,117 @@ +From 6d9f7d2966746dc67dd303437ce27e052c0f3af4 Mon Sep 17 00:00:00 2001 +From: Tamar Christina <tamar.christ...@arm.com> +Date: Thu, 20 May 2021 18:55:11 +0100 +Subject: [PATCH] libsanitizer: Remove cyclades inclusion in sanitizer + +The Linux kernel has removed the interface to cyclades from +the latest kernel headers[1] due to them being orphaned for the +past 13 years. + +libsanitizer uses this header when compiling against glibc, but +glibcs itself doesn't seem to have any references to cyclades. + +Further more it seems that the driver is broken in the kernel and +the firmware doesn't seem to be available anymore. + +As such since this is breaking the build of libsanitizer (and so the +GCC bootstrap[2]) I propose to remove this. + +[1] https://lkml.org/lkml/2021/3/2/153 +[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379 + +Reviewed By: eugenis + +Differential Revision: https://reviews.llvm.org/D102059 +--- + .../sanitizer_common_interceptors_ioctl.inc | 9 --------- + .../sanitizer_platform_limits_posix.cc | 11 ----------- + .../sanitizer_platform_limits_posix.h | 10 ---------- + 3 files changed, 30 deletions(-) + +diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +index 490a04b2181b..42e43a04441d 100644 +--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -366,15 +366,6 @@ static void ioctl_table_fill() { + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE +- _(CYGETDEFTHRESH, WRITE, sizeof(int)); +- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); +- _(CYGETMON, WRITE, struct_cyclades_monitor_sz); +- _(CYGETTHRESH, WRITE, sizeof(int)); +- _(CYGETTIMEOUT, WRITE, sizeof(int)); +- _(CYSETDEFTHRESH, NONE, 0); +- _(CYSETDEFTIMEOUT, NONE, 0); +- _(CYSETTHRESH, NONE, 0); +- _(CYSETTIMEOUT, NONE, 0); + _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); + _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); + _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); +diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +index b7fa6e8f7e07..564c41e3a71e 100644 +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -126,7 +126,6 @@ typedef struct user_fpregs elf_fpregset_t; + # include <sys/procfs.h> + #endif + #include <sys/user.h> +-#include <linux/cyclades.h> + #include <linux/if_eql.h> + #include <linux/if_plip.h> + #include <linux/lp.h> +@@ -437,7 +436,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); +- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); + #if EV_VERSION > (0x010000) + unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); + #else +@@ -803,15 +801,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + #endif // SANITIZER_LINUX + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; +- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; +- unsigned IOCTL_CYGETMON = CYGETMON; +- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; +- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; +- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; +- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; +- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; +- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; + unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; + unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; + unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; +diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +index f1a4fd7d3709..8e287e53c573 100644 +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -982,7 +982,6 @@ struct __sanitizer_cookie_io_functions_t { + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + extern unsigned struct_ax25_parms_struct_sz; +- extern unsigned struct_cyclades_monitor_sz; + extern unsigned struct_input_keymap_entry_sz; + extern unsigned struct_ipx_config_data_sz; + extern unsigned struct_kbdiacrs_sz; +@@ -1327,15 +1326,6 @@ struct __sanitizer_cookie_io_functions_t { + #endif // SANITIZER_LINUX + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- extern unsigned IOCTL_CYGETDEFTHRESH; +- extern unsigned IOCTL_CYGETDEFTIMEOUT; +- extern unsigned IOCTL_CYGETMON; +- extern unsigned IOCTL_CYGETTHRESH; +- extern unsigned IOCTL_CYGETTIMEOUT; +- extern unsigned IOCTL_CYSETDEFTHRESH; +- extern unsigned IOCTL_CYSETDEFTIMEOUT; +- extern unsigned IOCTL_CYSETTHRESH; +- extern unsigned IOCTL_CYSETTIMEOUT; + extern unsigned IOCTL_EQL_EMANCIPATE; + extern unsigned IOCTL_EQL_ENSLAVE; + extern unsigned IOCTL_EQL_GETMASTRCFG; +-- +2.32.0 +