Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix drawin build #9545

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Conversation

Lloyd-Pottiger
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #6233

Problem Summary:

What is changed and how it works?


Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Signed-off-by: Lloyd-Pottiger <[email protected]>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 21, 2024
@@ -41,6 +41,11 @@ class ColumnFileTiny : public ColumnFilePersisted

struct IndexInfo
{
IndexInfo(PageIdU64 page_id, std::optional<dtpb::VectorIndexFileProps> vec_index)
: index_page_id(page_id)
, vector_index(vec_index)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
, vector_index(vec_index)
, vector_index(std::move(vec_index))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can not move here.

Copy link
Contributor

@JaySon-Huang JaySon-Huang Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need to add a ctor function of IndexInfo? What's the error on darwin build

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ 98%] Building CXX object dbms/src/Storages/DeltaMerge/CMakeFiles/delta_merge.dir/ColumnFile/ColumnFileTiny.cpp.o
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTiny.cpp:15:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/Exception.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/Logger.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/FmtUtils.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/contrib/fmtlib-cmake/../fmtlib/include/fmt/compile.h:11:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/contrib/fmtlib-cmake/../fmtlib/include/fmt/format.h:41:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/memory:673:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocation_guard.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:298:9: error: no matching function for call to 'construct_at'
        _VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...);
        ^~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__config:858:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:948:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<DB::DM::ColumnFileTiny::IndexInfo>>::construct<DB::DM::ColumnFileTiny::IndexInfo, unsigned long long, const dtpb::VectorIndexFileProps &, void, void>' requested here
    __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_),
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:1706:9: note: in instantiation of function template specialization 'std::vector<DB::DM::ColumnFileTiny::IndexInfo>::__construct_one_at_end<unsigned long long, const dtpb::VectorIndexFileProps &>' requested here
        __construct_one_at_end(_VSTD::forward<_Args>(__args)...);
        ^
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTiny.cpp:243:26: note: in instantiation of function template specialization 'std::vector<DB::DM::ColumnFileTiny::IndexInfo>::emplace_back<unsigned long long, const dtpb::VectorIndexFileProps &>' requested here
            index_infos->emplace_back(index_pb.index_page_id(), index_pb.vector_index());
                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/construct_at.h:35:16: note: candidate template ignored: substitution failure [with _Tp = DB::DM::ColumnFileTiny::IndexInfo, _Args = <unsigned long long, const dtpb::VectorIndexFileProps &>]: no matching constructor for initialization of 'DB::DM::ColumnFileTiny::IndexInfo'
constexpr _Tp* construct_at(_Tp* __location, _Args&& ...__args) {
               ^
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTiny.cpp:15:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/Exception.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/Logger.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/FmtUtils.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/contrib/fmtlib-cmake/../fmtlib/include/fmt/compile.h:11:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/contrib/fmtlib-cmake/../fmtlib/include/fmt/format.h:41:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/memory:673:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocation_guard.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:298:9: error: no matching function for call to 'construct_at'
        _VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...);
        ^~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__config:858:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:948:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<DB::DM::ColumnFileTiny::IndexInfo>>::construct<DB::DM::ColumnFileTiny::IndexInfo, unsigned long long, const std::nullopt_t &, void, void>' requested here
    __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_),
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:1706:9: note: in instantiation of function template specialization 'std::vector<DB::DM::ColumnFileTiny::IndexInfo>::__construct_one_at_end<unsigned long long, const std::nullopt_t &>' requested here
        __construct_one_at_end(_VSTD::forward<_Args>(__args)...);
        ^
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTiny.cpp:245:26: note: in instantiation of function template specialization 'std::vector<DB::DM::ColumnFileTiny::IndexInfo>::emplace_back<unsigned long long, const std::nullopt_t &>' requested here
            index_infos->emplace_back(index_pb.index_page_id(), std::nullopt);
                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/construct_at.h:35:16: note: candidate template ignored: substitution failure [with _Tp = DB::DM::ColumnFileTiny::IndexInfo, _Args = <unsigned long long, const std::nullopt_t &>]: no matching constructor for initialization of 'DB::DM::ColumnFileTiny::IndexInfo'
constexpr _Tp* construct_at(_Tp* __location, _Args&& ...__args) {
               ^
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTiny.cpp:15:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/Exception.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/Logger.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/FmtUtils.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/contrib/fmtlib-cmake/../fmtlib/include/fmt/compile.h:11:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/contrib/fmtlib-cmake/../fmtlib/include/fmt/format.h:41:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/memory:673:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocation_guard.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:298:9: error: no matching function for call to 'construct_at'
        _VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...);
        ^~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__config:858:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:948:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<DB::DM::ColumnFileTiny::IndexInfo>>::construct<DB::DM::ColumnFileTiny::IndexInfo, unsigned long long &, const std::optional<dtpb::VectorIndexFileProps> &, void, void>' requested here
    __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_),
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:1706:9: note: in instantiation of function template specialization 'std::vector<DB::DM::ColumnFileTiny::IndexInfo>::__construct_one_at_end<unsigned long long &, const std::optional<dtpb::VectorIndexFileProps> &>' requested here
        __construct_one_at_end(_VSTD::forward<_Args>(__args)...);
        ^
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTiny.cpp:303:30: note: in instantiation of function template specialization 'std::vector<DB::DM::ColumnFileTiny::IndexInfo>::emplace_back<unsigned long long &, const std::optional<dtpb::VectorIndexFileProps> &>' requested here
            new_index_infos->emplace_back(new_index_page_id, index.vector_index);
                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/construct_at.h:35:16: note: candidate template ignored: substitution failure [with _Tp = DB::DM::ColumnFileTiny::IndexInfo, _Args = <unsigned long long &, const std::optional<dtpb::VectorIndexFileProps> &>]: no matching constructor for initialization of 'DB::DM::ColumnFileTiny::IndexInfo'
constexpr _Tp* construct_at(_Tp* __location, _Args&& ...__args) {
               ^
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTiny.cpp:15:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/Exception.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/Logger.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Common/FmtUtils.h:17:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/contrib/fmtlib-cmake/../fmtlib/include/fmt/compile.h:11:
In file included from /Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/contrib/fmtlib-cmake/../fmtlib/include/fmt/format.h:41:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/memory:673:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocation_guard.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:298:9: error: no matching function for call to 'construct_at'
        _VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...);
        ^~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__config:858:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:948:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<DB::DM::ColumnFileTiny::IndexInfo>>::construct<DB::DM::ColumnFileTiny::IndexInfo, unsigned long long &, const std::nullopt_t &, void, void>' requested here
    __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_),
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:1706:9: note: in instantiation of function template specialization 'std::vector<DB::DM::ColumnFileTiny::IndexInfo>::__construct_one_at_end<unsigned long long &, const std::nullopt_t &>' requested here
        __construct_one_at_end(_VSTD::forward<_Args>(__args)...);
        ^
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-6k7sx-build-binaries/source/tiflash/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTiny.cpp:305:30: note: in instantiation of function template specialization 'std::vector<DB::DM::ColumnFileTiny::IndexInfo>::emplace_back<unsigned long long &, const std::nullopt_t &>' requested here
            new_index_infos->emplace_back(new_index_page_id, std::nullopt);
                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/construct_at.h:35:16: note: candidate template ignored: substitution failure [with _Tp = DB::DM::ColumnFileTiny::IndexInfo, _Args = <unsigned long long &, const std::nullopt_t &>]: no matching constructor for initialization of 'DB::DM::ColumnFileTiny::IndexInfo'
constexpr _Tp* construct_at(_Tp* __location, _Args&& ...__args) {
               ^
4 errors generated.
make[3]: *** [dbms/src/Storages/DeltaMerge/CMakeFiles/delta_merge.dir/ColumnFile/

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Oct 21, 2024
Copy link
Contributor

ti-chi-bot bot commented Oct 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, JinheLin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JaySon-Huang,JinheLin]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 22, 2024
Copy link
Contributor

ti-chi-bot bot commented Oct 22, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-21 10:21:15.200007152 +0000 UTC m=+260075.896797756: ☑️ agreed by JaySon-Huang.
  • 2024-10-22 02:30:03.66542377 +0000 UTC m=+318204.362214379: ☑️ agreed by JinheLin.

@ti-chi-bot ti-chi-bot bot merged commit 7ee460e into pingcap:master Oct 22, 2024
5 checks passed
@Lloyd-Pottiger Lloyd-Pottiger deleted the fix-macos-build branch October 22, 2024 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants