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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileTiny.h
Original file line number Diff line number Diff line change
Expand Up @@ -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/

{}

PageIdU64 index_page_id{};
std::optional<dtpb::VectorIndexFileProps> vector_index = std::nullopt;
};
Expand Down