Skip to content

gcc10/cmake build fixes#12178

Merged
alexey-milovidov merged 11 commits intoClickHouse:masterfrom
azat:gcc10-build-fixes
Jul 8, 2020
Merged

gcc10/cmake build fixes#12178
alexey-milovidov merged 11 commits intoClickHouse:masterfrom
azat:gcc10-build-fixes

Conversation

@azat
Copy link
Member

@azat azat commented Jul 6, 2020

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Cc: @alexey-milovidov
Cc: @abyss7

@blinkov blinkov added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jul 6, 2020
@alexey-milovidov alexey-milovidov self-assigned this Jul 6, 2020
@robot-clickhouse robot-clickhouse added the submodule changed At least one submodule changed in this PR. label Jul 6, 2020
azat added 9 commits July 6, 2020 23:34
This is tiny fix, there are more problems that just this small little
bit.
Otherwise cmake reports:

    CMake Warning at contrib/googletest/googletest/CMakeLists.txt:54 (project):
      VERSION keyword not followed by a value or was followed by a value that
      expanded to nothing.

(since GOOGLETEST_VERSION is set in contrib/googletest/CMakeLists.txt)
gcc10 reports:

    FAILED: src/CMakeFiles/unit_tests_dbms.dir/Columns/tests/gtest_column_unique.cpp.o
    <snip>
    ../contrib/googletest/googletest/include/gtest/gtest-printers.h:287:7: error: use of deleted function ‘std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char8_t) [with _Traits = std::char_traits<char>]’
      287 |   *os << value;
          |   ~~~~^~~~~~~~
    In file included from ../base/common/../common/StringRef.h:6,
                     from ../src/Columns/IColumn.h:7,
                     from ../src/Columns/IColumnUnique.h:2,
                     from ../src/Columns/ColumnUnique.h:2,
                     from ../src/Columns/tests/gtest_column_unique.cpp:1:
    /usr/include/c++/10.1.0/ostream:544:5: note: declared here
      544 |     operator<<(basic_ostream<char, _Traits>&, char8_t) = delete;
          |
boost::format is not compiled under gcc10:

                     from ../src/Compression/tests/gtest_compressionCodec.cpp:14:
    /usr/include/boost/format/alt_sstream_impl.hpp: In instantiation of ‘boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type boost::io::basic_altstringbuf<Ch, Tr, Alloc>::overflow(boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type) [with Ch = char; Tr = std::char_traits<char>; Alloc = std::allocator<char>; boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type = int]’:
    /usr/include/boost/format/alt_sstream_impl.hpp:227:9:   required from here
    /usr/include/boost/format/alt_sstream_impl.hpp:261:45: error: no matching function for call to ‘std::allocator<char>::allocate(std::size_t&, char*)’
      261 |                     newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);

(although this is system-wide boost, it is pretty recent - 1.72)
…(_<CONFIG>)?)

Othewise cmake reports:

    -- Configuring done
    CMake Warning (dev) in contrib/googletest/googletest/CMakeLists.txt:
      Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
      interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
      cmake_policy command to set the policy and suppress this warning.

      Target "gtest" has an INTERFACE_LINK_LIBRARIES property which differs from
      its LINK_INTERFACE_LIBRARIES_DEBUG properties.

      INTERFACE_LINK_LIBRARIES:

        global-group;Threads::Threads

      LINK_INTERFACE_LIBRARIES_DEBUG:

        Threads::Threads

    This warning is for project developers.  Use -Wno-dev to suppress it.

    -- Generating done
    -- Build files have been written to: /src/ch/clickhouse/.cmake-tmp
cmake reports:

    CMake Warning (dev) at contrib/re2/CMakeLists.txt:15 (option):
      Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
      --help-policy CMP0077" for policy details.  Use the cmake_policy command to
      set the policy and suppress this warning.

      For compatibility with older versions of CMake, option is clearing the
      normal variable 'BUILD_SHARED_LIBS'.
    This warning is for project developers.  Use -Wno-dev to suppress it.
@azat azat force-pushed the gcc10-build-fixes branch from d37204d to 0a3c1ef Compare July 6, 2020 20:34
@azat
Copy link
Member Author

azat commented Jul 6, 2020

Right now the problem is double-conversion, it is included in arrow with a slash, I've removed this patch.
FWIW arrow since 0.16 has double-conversion included (right now the version is 0.15, latest is 0.17), any objections on just upgrading it to 0.17? (in a separate PR of course)

@alexey-milovidov
Copy link
Member

No objections, let's upgrade.
And also the author of Arrow has said that it does not need flatbuffers anymore.

@azat
Copy link
Member Author

azat commented Jul 6, 2020

No objections, let's upgrade.

#12181

And also the author of Arrow has said that it does not need flatbuffers anymore.

Actually they requires flatbuffers, but do not requires flatc compiler, since it is shipped with pre-generated headers.

gtest reports:

    [ RUN      ] GoogleTestVerification.UninstantiatedParameterizedTestSuite<CodecTestPerformance>
    ../src/Compression/tests/gtest_compressionCodec.cpp:590: Failure
    Parameterized test suite CodecTestPerformance is defined via TEST_P, but never instantiated. None of the test cases will run. Either no INSTANTIATE_TEST_SUITE_P is provided or the only ones provided expand to nothing.

    Ideally, TEST_P definitions should only ever be included as part of binaries that intend to use them. (As opposed to, for example, being placed in a library that may be linked in to get other utilities.)

    To suppress this error for this test suite, insert the following line (in a non-header) in the namespace it is defined in:

    GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(CodecTestPerformance);
    [  FAILED  ] GoogleTestVerification.UninstantiatedParameterizedTestSuite<CodecTestPerformance> (0 ms)
@azat azat changed the title gcc10 build fixes gcc10/cmake build fixes Jul 7, 2020
Otherwise fails:

    FAILED: src/CMakeFiles/dbms.dir/Storages/RabbitMQ/RabbitMQBlockInputStream.cpp.o
    ...
    In file included from ../src/Storages/RabbitMQ/RabbitMQHandler.h:9,
                     from ../src/Storages/RabbitMQ/StorageRabbitMQ.h:11,
                     from ../src/Storages/RabbitMQ/RabbitMQBlockInputStream.h:5,
                     from ../src/Storages/RabbitMQ/RabbitMQBlockInputStream.cpp:3:
    ../contrib/AMQP-CPP/include/amqpcpp/libuv.h:22:10: fatal error: uv.h: No such file or directory
@azat
Copy link
Member Author

azat commented Jul 8, 2020

@alexey-milovidov friendly ping (pinging because build fixes requires rebase of other things on top of them to compile locally, and rebase against upstream for submitting)

@alexey-milovidov
Copy link
Member

Performance — 1 faster, 4 slower, 190 unstable

Because there was performance improvement in master yesterday in #12196

@alexey-milovidov alexey-milovidov merged commit f021376 into ClickHouse:master Jul 8, 2020
@azat azat deleted the gcc10-build-fixes branch July 9, 2020 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants