From c420780a6c96e13731fdc5567593ce9c1999b7c8 Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Tue, 8 Sep 2020 07:40:07 -0700 Subject: [PATCH 1/3] Fix compile issue for gcc-4.8 And add circleci test --- .circleci/config.yml | 13 +++++++++++++ table/block_based/block_based_table_reader.cc | 2 +- tools/sst_dump_test.cc | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 412f6ef708d..09553e4a9fc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -165,6 +165,16 @@ jobs: - run: apt-get update -y && apt-get install -y libgflags-dev - run: TEST_TMPDIR=/dev/shm && make V=1 -j16 unity_test | .circleci/cat_ignore_eagain + build-linux-gcc-4-8: + machine: + image: ubuntu-1604:201903-01 + resource_class: large + steps: + - checkout + - run: pyenv global 3.5.2 + - run: sudo apt-get update -y && sudo apt-get install gcc-4.8 g++-4.8 libgflags-dev + - run: CC=gcc-4.8 CXX=g++-4.8 V=1 SKIP_LINK=1 make -j32 all | .circleci/cat_ignore_eagain + build-windows: executor: windows-2xlarge parameters: @@ -360,3 +370,6 @@ workflows: - build-linux-non-shm: start_test: "compact_on_deletion_collector_test" # make sure unique in src.mk end_test: "" + build-linux-gcc-4-8: + jobs: + - build-linux-gcc-4-8 diff --git a/table/block_based/block_based_table_reader.cc b/table/block_based/block_based_table_reader.cc index ad9a6229fcc..fbc701d5e5e 100644 --- a/table/block_based/block_based_table_reader.cc +++ b/table/block_based/block_based_table_reader.cc @@ -3180,7 +3180,7 @@ Status BlockBasedTable::GetKVPairsFromDataBlocks( } Status BlockBasedTable::DumpTable(WritableFile* out_file) { - auto out_file_wrapper = WritableFileStringStreamAdapter(out_file); + WritableFileStringStreamAdapter out_file_wrapper(out_file); std::ostream out_stream(&out_file_wrapper); // Output Footer out_stream << "Footer Details:\n" diff --git a/tools/sst_dump_test.cc b/tools/sst_dump_test.cc index 0a75e64d253..3b963ad36b0 100644 --- a/tools/sst_dump_test.cc +++ b/tools/sst_dump_test.cc @@ -93,7 +93,7 @@ class SSTDumpToolTest : public testing::Test { } void createSST(const Options& opts, const std::string& file_name) { - Env* env = opts.env; + Env* test_env = opts.env; EnvOptions env_options(opts); ReadOptions read_options; const ImmutableCFOptions imoptions(opts); @@ -102,7 +102,7 @@ class SSTDumpToolTest : public testing::Test { std::unique_ptr tb; std::unique_ptr file; - ASSERT_OK(env->NewWritableFile(file_name, &file, env_options)); + ASSERT_OK(test_env->NewWritableFile(file_name, &file, env_options)); std::vector > int_tbl_prop_collector_factories; From 29a84ad8ea497f2aa406b258021fb8c8706a8b25 Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Tue, 8 Sep 2020 09:59:14 -0700 Subject: [PATCH 2/3] Add comment --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 09553e4a9fc..14a15302cbd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -173,7 +173,7 @@ jobs: - checkout - run: pyenv global 3.5.2 - run: sudo apt-get update -y && sudo apt-get install gcc-4.8 g++-4.8 libgflags-dev - - run: CC=gcc-4.8 CXX=g++-4.8 V=1 SKIP_LINK=1 make -j32 all | .circleci/cat_ignore_eagain + - run: CC=gcc-4.8 CXX=g++-4.8 V=1 SKIP_LINK=1 make -j32 all | .circleci/cat_ignore_eagain # Linking broken because libgflags compiled with newer ABI build-windows: executor: windows-2xlarge From 00ba71ab5d25896265e2c438cfa4d67c60def799 Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Tue, 8 Sep 2020 10:16:29 -0700 Subject: [PATCH 3/3] update compile number --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 14a15302cbd..d656a1961af 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -173,7 +173,7 @@ jobs: - checkout - run: pyenv global 3.5.2 - run: sudo apt-get update -y && sudo apt-get install gcc-4.8 g++-4.8 libgflags-dev - - run: CC=gcc-4.8 CXX=g++-4.8 V=1 SKIP_LINK=1 make -j32 all | .circleci/cat_ignore_eagain # Linking broken because libgflags compiled with newer ABI + - run: CC=gcc-4.8 CXX=g++-4.8 V=1 SKIP_LINK=1 make -j4 all | .circleci/cat_ignore_eagain # Linking broken because libgflags compiled with newer ABI build-windows: executor: windows-2xlarge