From nobody Tue Jan 18 08:42:10 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2B0CD1959E4D; Tue, 18 Jan 2022 08:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JdMhg09MDz3t6Y; Tue, 18 Jan 2022 08:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642495331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oJTjY0phfdDbpaan+jMvkFJGDCViuW97TOjPhr5wF3Y=; b=RRjAK8H9BeIBF77uhIpXUcabkE9HPj+jrqaab5K5v6GRtOUCEF3DBVGqdrJHyuvthWfsmT 7bfe6RyPMPLCip9a7Q8BwHi1eNbMP9IK1mLH1yUNtMLE29DBXbxNsoUBhugInoJhOG+L+7 xF7mux3M4RUwq/w90+tmHrW8M/ZiP+Ueh7UtIX+qD6Y2m0O7bhglWt/79O6nDM46L4V1lO gHPYaZ/fIscyTlU7TdLSkMUXiDBIdX4JZl3lGSiyzQB5diEhxgn+qfdDOl26oGd4bEmRxo QRPWncoe6X7r4hf1TicFNJn/ZVPxR/KhUExNjI4jz/HTtq1H+C64n7TgnKhPEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA8361E42E; Tue, 18 Jan 2022 08:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20I8gAaK028676; Tue, 18 Jan 2022 08:42:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20I8gA6v028675; Tue, 18 Jan 2022 08:42:10 GMT (envelope-from git) Date: Tue, 18 Jan 2022 08:42:10 GMT Message-Id: <202201180842.20I8gA6v028675@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Pietro Cerutti Subject: git: 45ec0da059c5 - main - databases/rocksdb: unbreak with clang13 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gahr X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45ec0da059c5e8251f7615b0c6429d19a6ec0aec Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642495331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oJTjY0phfdDbpaan+jMvkFJGDCViuW97TOjPhr5wF3Y=; b=f8sLOuBQhmwFJ7nTC3XlI9GxS8Soq7o/HRHztOpRiuEaxT3B9i8m6NUIwxTe1aLuma/zWZ DUJASYm6OubVXLUvsMqxCHrwTge5ub0oKHMg8pn0vrN4kAab1G4gdnN1rTW4QgFMu4SlV4 RfbZNUjpKRw7NGOZnoei0i2W93eTMG/mTo7FQ11G60RsmGHVUKDk/6X2aR8sQ2ahloqSW8 omkOiPCAkZZSAgfCT73hObvgjiSZ4DOBpuCmlwSths1xT75TVQsd2fTNq8Kbk4LrSdhlFs SekyOBY8fULocrr4Pucq3cd4YPgoeGsiWdi0CnRmVMlcdhKfZBjztnpcR8RlqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642495331; a=rsa-sha256; cv=none; b=epjjNPQg5Liuoy+Ur3cN1T+Xp5iv3KGvOO0LBlBwqLk+jxY98ew3knfdRzfQyDdT8VrHyD KgTdhqDbRCz5BUC6lanYiquC8dpTH17EBhkyEqfVsuH2KEksj2mzfgEKuJ5AL4DClXoGEc xW2d7r+pmBhVBudzPGTZDrhOEYvfW7FQxt9X3ebfg3HNteXiLjNjQUYTSmjzY9mlvIjZKm 6692FInbwziCRuKQP4+lcZIxTT5z9WWk94xMH7EJrz+m6CzCCC3p4t599SNanmw8VTO0+1 FT/6XccG/4pamCLvNNm4MiLxMH3pUKhnxOLdbcIMX4AYgbB/wZKGEqYsemrxUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gahr: URL: https://cgit.FreeBSD.org/ports/commit/?id=45ec0da059c5e8251f7615b0c6429d19a6ec0aec commit 45ec0da059c5e8251f7615b0c6429d19a6ec0aec Author: Pietro Cerutti AuthorDate: 2022-01-18 08:40:39 +0000 Commit: Pietro Cerutti CommitDate: 2022-01-18 08:42:06 +0000 databases/rocksdb: unbreak with clang13 PR: 261187 Reported by: nc@ --- databases/rocksdb/files/patch-clang13 | 180 ++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) diff --git a/databases/rocksdb/files/patch-clang13 b/databases/rocksdb/files/patch-clang13 new file mode 100644 index 000000000000..1de95fda6e94 --- /dev/null +++ b/databases/rocksdb/files/patch-clang13 @@ -0,0 +1,180 @@ +From 9c6fb26033fe83ff8b931b72dc9d1f8496ad5ebd Mon Sep 17 00:00:00 2001 +From: Jay Zhuang +Date: Tue, 11 Jan 2022 10:35:22 -0800 +Subject: [PATCH] Fix clang13 build error (#9374) + +Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/9374 + +Test Plan: Add CI for clang13 build + +Reviewed By: riversand963 + +Differential Revision: D33522867 + +Pulled By: jay-zhuang + +fbshipit-source-id: 642756825cf0b51e35861fb847ebaee4611b76ca +--- + .circleci/config.yml | 22 ++++++++++++++++++++++ + db/compaction/compaction_picker_test.cc | 6 ++---- + db/db_basic_test.cc | 3 --- + db/db_test2.cc | 5 ----- + options/db_options.h | 1 - + utilities/env_mirror.cc | 4 ++++ + 6 files changed, 28 insertions(+), 13 deletions(-) + +diff --git a/.circleci/config.yml b/.circleci/config.yml +index 05eb3a419bc..42f01a2dd40 100644 +--- .circleci/config.yml.orig ++++ .circleci/config.yml +@@ -83,6 +83,17 @@ commands: + echo "APT::Acquire::Retries \"10\";" | sudo tee -a /etc/apt/apt.conf.d/80-retries # llvm.org unreliable + sudo apt-get update -y && sudo apt-get install -y clang-10 + ++ install-clang-13: ++ steps: ++ - run: ++ name: Install Clang 13 ++ command: | ++ echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" | sudo tee -a /etc/apt/sources.list ++ echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" | sudo tee -a /etc/apt/sources.list ++ echo "APT::Acquire::Retries \"10\";" | sudo tee -a /etc/apt/apt.conf.d/80-retries # llvm.org unreliable ++ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - ++ sudo apt-get update -y && sudo apt-get install -y clang-13 ++ + install-gflags: + steps: + - run: +@@ -396,6 +407,16 @@ jobs: + - run: CC=gcc-11 CXX=g++-11 V=1 SKIP_LINK=1 make -j16 all 2>&1 | .circleci/cat_ignore_eagain # Linking broken because libgflags compiled with newer ABI + - post-steps + ++ build-linux-clang-13-no_test_run: ++ machine: ++ image: ubuntu-2004:202010-01 ++ resource_class: xlarge ++ steps: ++ - pre-steps ++ - install-clang-13 ++ - run: CC=clang-13 CXX=clang++-13 USE_CLANG=1 make -j16 all 2>&1 | .circleci/cat_ignore_eagain ++ - post-steps ++ + # This job is only to make sure the microbench tests are able to run, the benchmark result is not meaningful as the CI host is changing. + build-linux-microbench: + machine: +@@ -792,6 +813,7 @@ workflows: + build-linux-compilers-no_test_run: + jobs: + - build-linux-clang-no_test_run ++ - build-linux-clang-13-no_test_run + - build-linux-gcc-4_8-no_test_run + - build-linux-gcc-8-no_test_run + - build-linux-gcc-9-no_test_run +diff --git a/db/compaction/compaction_picker_test.cc b/db/compaction/compaction_picker_test.cc +index 6b005db0b4c..1c928ad4ab4 100644 +--- db/compaction/compaction_picker_test.cc.orig ++++ db/compaction/compaction_picker_test.cc +@@ -964,13 +964,11 @@ TEST_F(CompactionPickerTest, NeedsCompactionFIFO) { + + // verify whether compaction is needed based on the current + // size of L0 files. +- uint64_t current_size = 0; + for (int i = 1; i <= kFileCount; ++i) { + NewVersionStorage(1, kCompactionStyleFIFO); + Add(0, i, ToString((i + 100) * 1000).c_str(), +- ToString((i + 100) * 1000 + 999).c_str(), +- kFileSize, 0, i * 100, i * 100 + 99); +- current_size += kFileSize; ++ ToString((i + 100) * 1000 + 999).c_str(), kFileSize, 0, i * 100, ++ i * 100 + 99); + UpdateVersionStorageInfo(); + ASSERT_EQ(fifo_compaction_picker.NeedsCompaction(vstorage_.get()), + vstorage_->CompactionScore(0) >= 1); +diff --git a/db/db_basic_test.cc b/db/db_basic_test.cc +index 81ac829b49c..96687ba7433 100644 +--- db/db_basic_test.cc.orig ++++ db/db_basic_test.cc +@@ -1892,7 +1892,6 @@ TEST_F(DBBasicTest, MultiGetBatchedValueSizeMultiLevelMerge) { + + ASSERT_EQ(values.size(), keys.size()); + +- uint64_t curr_value_size = 0; + for (unsigned int j = 0; j < 26; ++j) { + int key = j + 10; + std::string value; +@@ -1909,11 +1908,9 @@ TEST_F(DBBasicTest, MultiGetBatchedValueSizeMultiLevelMerge) { + value.append(","); + value.append("val_mem_" + std::to_string(key)); + } +- curr_value_size += value.size(); + ASSERT_EQ(values[j], value); + ASSERT_OK(statuses[j]); + } +- // ASSERT_TRUE(curr_value_size <= read_options.value_size_hard_limit); + + // All remaning keys status is set Status::Abort + for (unsigned int j = 26; j < 40; j++) { +diff --git a/db/db_test2.cc b/db/db_test2.cc +index e09d05d45df..c123d7351a7 100644 +--- db/db_test2.cc.orig ++++ db/db_test2.cc +@@ -2827,7 +2827,6 @@ TEST_F(DBTest2, ReadAmpBitmapLiveInCacheAfterDBClose) { + Close(); + Reopen(options); + +- uint64_t total_useful_bytes = 0; + std::set read_keys; + std::string value; + // Iter1: Read half the DB, Read even keys +@@ -2838,8 +2837,6 @@ TEST_F(DBTest2, ReadAmpBitmapLiveInCacheAfterDBClose) { + + if (read_keys.find(i) == read_keys.end()) { + auto internal_key = InternalKey(key, 0, ValueType::kTypeValue); +- total_useful_bytes += +- GetEncodedEntrySize(internal_key.size(), value.size()); + read_keys.insert(i); + } + } +@@ -2866,8 +2863,6 @@ TEST_F(DBTest2, ReadAmpBitmapLiveInCacheAfterDBClose) { + + if (read_keys.find(i) == read_keys.end()) { + auto internal_key = InternalKey(key, 0, ValueType::kTypeValue); +- total_useful_bytes += +- GetEncodedEntrySize(internal_key.size(), value.size()); + read_keys.insert(i); + } + } +diff --git a/options/db_options.h b/options/db_options.h +index 5244460e899..d44331b06cf 100644 +--- options/db_options.h.orig ++++ options/db_options.h +@@ -116,7 +116,6 @@ struct ImmutableDBOptions { + struct MutableDBOptions { + static const char* kName() { return "MutableDBOptions"; } + MutableDBOptions(); +- explicit MutableDBOptions(const MutableDBOptions& options) = default; + explicit MutableDBOptions(const DBOptions& options); + + void Dump(Logger* log) const; +diff --git a/utilities/env_mirror.cc b/utilities/env_mirror.cc +index 061b9863246..3ea323b4297 100644 +--- utilities/env_mirror.cc.orig ++++ utilities/env_mirror.cc +@@ -27,13 +27,17 @@ class SequentialFileMirror : public SequentialFile { + if (as == Status::OK()) { + char* bscratch = new char[n]; + Slice bslice; ++#ifndef NDEBUG + size_t off = 0; ++#endif + size_t left = aslice.size(); + while (left) { + Status bs = b_->Read(left, &bslice, bscratch); ++#ifndef NDEBUG + assert(as == bs); + assert(memcmp(bscratch, scratch + off, bslice.size()) == 0); + off += bslice.size(); ++#endif + left -= bslice.size(); + } + delete[] bscratch;