Skip to content

Bug during CMake installation. #112

@tamama-plb

Description

@tamama-plb

Hey Scylla team,

I faced a compilation error during installation of release scylla-cpp-driver-2.16.2b. (redhat/gcc-toolset-13)

/mnt/volume/.vendor/cxx/github.com/scylladb/cpp-driver/cpp-driver-2.16.2b/src/connection_pool.cpp: In constructor ‘datastax::internal::core::ConnectionPool::ConnectionPool(const datastax::internal::core::Connection::Vec&, datastax:
:internal::core::ConnectionPoolListener*, const datastax::String&, uv_loop_t*, const datastax::internal::core::Host::Ptr&, datastax::internal::core::ProtocolVersion, const datastax::internal::core::ConnectionPoolSettings&, datastax
::internal::core::Metrics*, const datastax::internal::core::ShardPortCalculator*)’:                                                                                                                                                    
/mnt/volume/.vendor/cxx/github.com/scylladb/cpp-driver/cpp-driver-2.16.2b/src/connection_pool.cpp:101:49: error: redundant move in initialization [-Werror=redundant-move]                                                             
  101 |         host_->add_unpooled_connection(std::move(connection));                                                                                                                                                                 
      |                                        ~~~~~~~~~^~~~~~~~~~~~                                                                                                                                                                   
/mnt/volume/.vendor/cxx/github.com/scylladb/cpp-driver/cpp-driver-2.16.2b/src/connection_pool.cpp:101:49: note: remove ‘std::move’ call 

To combat this, I need to remove -Werror. A snipplet goes like this:

...
    if [ ! -d "$CPP_SCYLLADB_CPPDRIVER_INSTALL_PATH/.dist" ]; then
        find $CPP_SCYLLADB_CPPDRIVER_INSTALL_PATH -name "CMakeLists.txt" | xargs sed -i "s/-Werror//g"
    
        mkdir -p $CPP_SCYLLADB_CPPDRIVER_INSTALL_PATH/.build; \
        cd $CPP_SCYLLADB_CPPDRIVER_INSTALL_PATH/.build; \
        cmake \
            -D BUILD_SHARED_LIBS=ON \
            -D CASS_BUILD_EXAMPLES=ON \
            -D OPENSSL_ROOT_DIR=$CPP_OPENSSL_INSTALL_PATH/.dist \
            -D ZLIB_ROOT_DIR=$CPP_ZLIB_INSTALL_PATH/.dist \
            -D CMAKE_POSITION_INDEPENDENT_CODE=ON \
            -D CMAKE_SKIP_INSTALL_RPATH=TRUE \
            -D CMAKE_INSTALL_PREFIX=$CPP_SCYLLADB_CPPDRIVER_INSTALL_PATH/.dist \
            ..;
        make -j $NUMBER_OF_CONCURRENT_JOBS; \
        make -j $NUMBER_OF_CONCURRENT_JOBS install;

        rm -rf $CPP_SCYLLADB_CPPDRIVER_INSTALL_PATH/.build;
    else
        echo "[_InstallVendor_CXX__scylladb__cpp-driver] Found $CPP_SCYLLADB_CPPDRIVER_INSTALL_PATH/.dist ... SKIP - build + install > $CPP_SCYLLADB_CPPDRIVER_INSTALL_PATH/.dist"
    fi
...

Those who understand will understand.

Have a great day!

Kr, Tama MA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions