Use gcc5 in Travis (#161) * Changed travis configuration to use gcc-5.
* Fixed the errors that causes gcc-5.3 to fail. Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/476f0aca Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/476f0aca Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/476f0aca Branch: refs/heads/master Commit: 476f0aca3b6d0991fb4dc677efa4fdad32e7c0b1 Parents: aee53ee Author: Hakan Memisoglu <[email protected]> Authored: Thu Apr 14 16:30:48 2016 -0500 Committer: Jignesh Patel <[email protected]> Committed: Thu Apr 14 16:30:48 2016 -0500 ---------------------------------------------------------------------- .travis.yml | 10 +++++----- CMakeLists.txt | 2 +- cli/CommandExecutor.cpp | 2 +- expressions/aggregation/AggregationHandleCount.cpp | 2 +- expressions/scalar/ScalarAttribute.cpp | 7 +++++-- query_optimizer/ExecutionGenerator.cpp | 4 ++-- relational_operators/SortMergeRunOperatorHelpers.cpp | 4 ++-- relational_operators/TextScanOperator.cpp | 2 +- storage/InsertDestination.cpp | 11 +++++++++-- storage/PackedRowStoreTupleStorageSubBlock.cpp | 4 ++-- storage/StorageBlock.cpp | 7 ++++++- storage/StorageManager.cpp | 12 ++++++------ 12 files changed, 41 insertions(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index 9c5eacf..16bb6fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,15 +19,15 @@ env: - BUILD_TYPE=Release VECTOR_COPY_ELISION_LEVEL=none install: - - if [ "$VECTOR_COPY_ELISION_LEVEL" = "joinwithbinaryexpressions" ] && [ "$CC" = "gcc" ]; then + - if [ "$VECTOR_COPY_ELISION_LEVEL" = "joinwithbinaryexpressions" ] && [ "$CC" = "gcc" ] && [ "$BUILD_TYPE" = "Debug" ]; then export MAKE_JOBS=1; else export MAKE_JOBS=2; fi - export TEST_JOBS=2; - if [ "$CC" = "gcc" ]; then - export CC="gcc-4.9"; - export CXX="g++-4.9"; + export CC="gcc-5"; + export CXX="g++-5"; elif [ "$CC" = "clang" ]; then export CC="clang-3.7"; export CXX="clang++-3.7"; @@ -74,8 +74,8 @@ addons: - ubuntu-toolchain-r-test - llvm-toolchain-precise-3.7 packages: - - gcc-4.9 - - g++-4.9 + - gcc-5 + - g++-5 - clang-3.7 - libprotobuf-dev - protobuf-compiler http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index b97adfa..869d43c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -585,7 +585,7 @@ endfunction() set(gtest_force_shared_crt ON CACHE BOOL "Link gtest against shared DLLs on Windows") add_subdirectory ("${THIRD_PARTY_SOURCE_DIR}/googletest/googletest" "${CMAKE_CURRENT_BINARY_DIR}/third_party/googletest/googletest") -include_directories("${THIRD_PARTY_SOURCE_DIR}/googletest/googletest/include") +include_directories(SYSTEM "${THIRD_PARTY_SOURCE_DIR}/googletest/googletest/include") enable_testing() if (UNIX) http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/cli/CommandExecutor.cpp ---------------------------------------------------------------------- diff --git a/cli/CommandExecutor.cpp b/cli/CommandExecutor.cpp index e9db628..f38121f 100644 --- a/cli/CommandExecutor.cpp +++ b/cli/CommandExecutor.cpp @@ -56,7 +56,7 @@ void executeDescribeDatabase( // Column width initialized to 6 to take into account the header name // and the column value table int max_column_width = C::kInitMaxColumnWidth; - const CatalogRelation *relation; + const CatalogRelation *relation = nullptr; if (arguments->size() == 0) { for (const CatalogRelation &rel : catalog_database) { max_column_width = http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/expressions/aggregation/AggregationHandleCount.cpp ---------------------------------------------------------------------- diff --git a/expressions/aggregation/AggregationHandleCount.cpp b/expressions/aggregation/AggregationHandleCount.cpp index 9fb9fd4..5ece8ba 100644 --- a/expressions/aggregation/AggregationHandleCount.cpp +++ b/expressions/aggregation/AggregationHandleCount.cpp @@ -112,7 +112,7 @@ AggregationState* std::size_t count = 0; InvokeOnValueAccessorMaybeTupleIdSequenceAdapter( accessor, - [&](auto *accessor) -> void { // NOLINT(build/c++11) + [&accessor_id, &count](auto *accessor) -> void { // NOLINT(build/c++11) if (nullable_type) { while (accessor->next()) { count += !accessor->getTypedValue(accessor_id).isNull(); http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/expressions/scalar/ScalarAttribute.cpp ---------------------------------------------------------------------- diff --git a/expressions/scalar/ScalarAttribute.cpp b/expressions/scalar/ScalarAttribute.cpp index 738b1d7..ed91bd1 100644 --- a/expressions/scalar/ScalarAttribute.cpp +++ b/expressions/scalar/ScalarAttribute.cpp @@ -92,7 +92,7 @@ ColumnVector* ScalarAttribute::getAllValues(ValueAccessor *accessor, const Type &result_type = attribute_.getType(); return InvokeOnValueAccessorMaybeTupleIdSequenceAdapter( accessor, - [&](auto *accessor) -> ColumnVector* { // NOLINT(build/c++11) + [&attr_id, &result_type](auto *accessor) -> ColumnVector* { // NOLINT(build/c++11) if (NativeColumnVector::UsableForType(result_type)) { NativeColumnVector *result = new NativeColumnVector(result_type, accessor->getNumTuples()); @@ -143,7 +143,10 @@ ColumnVector* ScalarAttribute::getAllValuesForJoin( return InvokeOnValueAccessorNotAdapter( accessor, - [&](auto *accessor) -> ColumnVector* { // NOLINT(build/c++11) + [&joined_tuple_ids, + &attr_id, + &result_type, + &using_left_relation](auto *accessor) -> ColumnVector* { // NOLINT(build/c++11) if (NativeColumnVector::UsableForType(result_type)) { NativeColumnVector *result = new NativeColumnVector(result_type, joined_tuple_ids.size()); http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/query_optimizer/ExecutionGenerator.cpp ---------------------------------------------------------------------- diff --git a/query_optimizer/ExecutionGenerator.cpp b/query_optimizer/ExecutionGenerator.cpp index aa6b0dc..43825b9 100644 --- a/query_optimizer/ExecutionGenerator.cpp +++ b/query_optimizer/ExecutionGenerator.cpp @@ -121,14 +121,14 @@ namespace optimizer { DEFINE_string(join_hashtable_type, "SeparateChaining", "HashTable implementation to use for hash joins (valid options " "are SeparateChaining or LinearOpenAddressing)"); -static const bool join_hashtable_type_dummy +static const volatile bool join_hashtable_type_dummy = gflags::RegisterFlagValidator(&FLAGS_join_hashtable_type, &ValidateHashTableImplTypeString); DEFINE_string(aggregate_hashtable_type, "LinearOpenAddressing", "HashTable implementation to use for aggregates with GROUP BY " "(valid options are SeparateChaining or LinearOpenAddressing)"); -static const bool aggregate_hashtable_type_dummy +static const volatile bool aggregate_hashtable_type_dummy = gflags::RegisterFlagValidator(&FLAGS_aggregate_hashtable_type, &ValidateHashTableImplTypeString); http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/relational_operators/SortMergeRunOperatorHelpers.cpp ---------------------------------------------------------------------- diff --git a/relational_operators/SortMergeRunOperatorHelpers.cpp b/relational_operators/SortMergeRunOperatorHelpers.cpp index 1b4332f..4b8c0d9 100644 --- a/relational_operators/SortMergeRunOperatorHelpers.cpp +++ b/relational_operators/SortMergeRunOperatorHelpers.cpp @@ -243,7 +243,7 @@ void RunMerger::mergeSingleColumnNullFirst(ValueAccessor *first_accessor) { InvokeOnValueAccessorNotAdapter( first_accessor, - [&](auto *accessor) -> void { // NOLINT(build/c++11) + [this, &attr_id, &comp](auto *accessor) -> void { // NOLINT(build/c++11) typedef typename std::remove_reference<decltype(*accessor)>::type ValueAccessorT; PtrVector<RunIterator<ValueAccessorT>, true> iterators; @@ -322,7 +322,7 @@ void RunMerger::mergeSingleColumnNullLast(ValueAccessor *first_accessor) { InvokeOnValueAccessorNotAdapter( first_accessor, - [&](auto *accessor) -> void { // NOLINT(build/c++11) + [this, &attr_id, &comp](auto *accessor) -> void { // NOLINT(build/c++11) typedef typename std::remove_reference<decltype(*accessor)>::type ValueAccessorT; PtrVector<RunIterator<ValueAccessorT>> iterators; http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/relational_operators/TextScanOperator.cpp ---------------------------------------------------------------------- diff --git a/relational_operators/TextScanOperator.cpp b/relational_operators/TextScanOperator.cpp index 4614050..a311a81 100644 --- a/relational_operators/TextScanOperator.cpp +++ b/relational_operators/TextScanOperator.cpp @@ -74,7 +74,7 @@ static bool ValidateTextScanSplitBlobSize(const char *flagname, return true; } -static const bool text_scan_split_blob_size_dummy = gflags::RegisterFlagValidator( +static const volatile bool text_scan_split_blob_size_dummy = gflags::RegisterFlagValidator( &FLAGS_textscan_split_blob_size, &ValidateTextScanSplitBlobSize); namespace { http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/storage/InsertDestination.cpp ---------------------------------------------------------------------- diff --git a/storage/InsertDestination.cpp b/storage/InsertDestination.cpp index 30fd2c3..354bed4 100644 --- a/storage/InsertDestination.cpp +++ b/storage/InsertDestination.cpp @@ -511,7 +511,10 @@ void PartitionAwareInsertDestination::bulkInsertTuples(ValueAccessor *accessor, InvokeOnAnyValueAccessor( accessor, - [&](auto *accessor) -> void { // NOLINT(build/c++11) + [this, + &partition_attribute_id, + &always_mark_full, + &num_partitions](auto *accessor) -> void { // NOLINT(build/c++11) std::vector<std::unique_ptr<TupleIdSequence>> partition_membership; partition_membership.resize(num_partitions); @@ -564,7 +567,11 @@ void PartitionAwareInsertDestination::bulkInsertTuplesWithRemappedAttributes( InvokeOnAnyValueAccessor( accessor, - [&](auto *accessor) -> void { // NOLINT(build/c++11) + [this, + &partition_attribute_id, + &attribute_map, + &always_mark_full, + &num_partitions](auto *accessor) -> void { // NOLINT(build/c++11) std::vector<std::unique_ptr<TupleIdSequence>> partition_membership; partition_membership.resize(num_partitions); http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/storage/PackedRowStoreTupleStorageSubBlock.cpp ---------------------------------------------------------------------- diff --git a/storage/PackedRowStoreTupleStorageSubBlock.cpp b/storage/PackedRowStoreTupleStorageSubBlock.cpp index 4cb6d02..ef83a29 100644 --- a/storage/PackedRowStoreTupleStorageSubBlock.cpp +++ b/storage/PackedRowStoreTupleStorageSubBlock.cpp @@ -145,7 +145,7 @@ tuple_id PackedRowStoreTupleStorageSubBlock::bulkInsertTuples(ValueAccessor *acc InvokeOnAnyValueAccessor( accessor, - [&](auto *accessor) -> void { // NOLINT(build/c++11) + [this, &dest_addr, &num_nullable_attrs](auto *accessor) -> void { // NOLINT(build/c++11) const std::size_t num_attrs = relation_.size(); const std::vector<std::size_t> &attrs_max_size = relation_.getMaximumAttributeByteLengths(); @@ -216,7 +216,7 @@ tuple_id PackedRowStoreTupleStorageSubBlock::bulkInsertTuplesWithRemappedAttribu InvokeOnAnyValueAccessor( accessor, - [&](auto *accessor) -> void { // NOLINT(build/c++11) + [this, &num_nullable_attrs, &attribute_map, &dest_addr](auto *accessor) -> void { // NOLINT(build/c++11) const std::size_t num_attrs = relation_.size(); const std::vector<std::size_t> &attrs_max_size = relation_.getMaximumAttributeByteLengths(); http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/storage/StorageBlock.cpp ---------------------------------------------------------------------- diff --git a/storage/StorageBlock.cpp b/storage/StorageBlock.cpp index 2850c9c..fba4d60 100644 --- a/storage/StorageBlock.cpp +++ b/storage/StorageBlock.cpp @@ -805,7 +805,12 @@ void StorageBlock::sortColumn(bool use_input_sequence, ValueAccessor *all_accessor = tuple_store_->createValueAccessor(nullptr); InvokeOnValueAccessorNotAdapter( all_accessor, - [&](auto *all_accessor) -> void { // NOLINT(build/c++11) + [&sort_attr_id, + &use_input_sequence, + &nulls, + &refs, + &accessor, + &sorted_sequence](auto *all_accessor) -> void { // NOLINT(build/c++11) if (use_input_sequence) { auto *seq_value_accessor = new OrderedTupleIdSequenceAdapterValueAccessor< typename std::remove_reference<decltype(*all_accessor)>::type>( http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/476f0aca/storage/StorageManager.cpp ---------------------------------------------------------------------- diff --git a/storage/StorageManager.cpp b/storage/StorageManager.cpp index 9965dce..1cdbcb6 100644 --- a/storage/StorageManager.cpp +++ b/storage/StorageManager.cpp @@ -94,18 +94,18 @@ static bool ValidateBlockDomain(const char *flagname, } DEFINE_int32(block_domain, 1, "The unique domain for a distributed Quickstep instance."); -static const bool block_domain_dummy +static const volatile bool block_domain_dummy = gflags::RegisterFlagValidator(&FLAGS_block_domain, &ValidateBlockDomain); /** * @brief Set or validate the buffer pool slots. When automatically picking a - * default value, check if the system is "small" or "large." Set the + * default value, check if the system is "small" or "large." Set the * buffer pool space to 80% of the installed main memory for small - * and 90% otherwise. + * and 90% otherwise. * This method follows the signature that is set by the gflags module. - * @param flagname The name of the buffer pool flag. + * @param flagname The name of the buffer pool flag. * @param value The value of this flag from the command line, or default (0) - * @return True if the value was set to a legimate value, false otherwise. + * @return True if the value was set to a legimate value, false otherwise. * Currently this method aims to always find some legitimate value, * and never returns false. **/ @@ -149,7 +149,7 @@ DEFINE_uint64(buffer_pool_slots, 0, "the buffer pool may temporarily grow larger than this size " "if the buffer manager is unable to evict enough unreferenced " "blocks to make room for a new allocation."); -static const bool buffer_pool_slots_dummy +static const volatile bool buffer_pool_slots_dummy = gflags::RegisterFlagValidator(&FLAGS_buffer_pool_slots, &SetOrValidateBufferPoolSlots); #ifdef QUICKSTEP_HAVE_FILE_MANAGER_HDFS
