Skip to content

Build error with BitVector.h #774

@sjmurdoch

Description

@sjmurdoch

I am getting the following build error, when compiling LLVM on macOS 15.5 using the following command: ./cheribuild.py llvm-riscv64-purecap -d. cheribuild is at revision f755db09 and llvm-project is at revision 578ea4f7ef.

/Users/smurdoch/cheri/llvm-project/llvm/include/llvm/ADT/BitVector.h:841:22: error: no viable conversion from 'pair<[...], ArrayRef<unsigned long>>' to 'const pair<[...], ArrayRef<unsigned __intcap>>'
        getHashValue(std::make_pair(V.size(), V.getData()));
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:92:27: note: candidate constructor not viable: no known conversion from 'pair<typename __unwrap_ref_decay<unsigned int>::type, typename __unwrap_ref_decay<ArrayRef<unsigned long>>::type>' (aka 'pair<unsigned int, llvm::ArrayRef<unsigned long>>') to 'const std::pair<unsigned int, llvm::ArrayRef<unsigned __intcap>> &' for 1st argument
    _LIBCPP_HIDE_FROM_ABI pair(pair const&) = default;
                          ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:93:27: note: candidate constructor not viable: no known conversion from 'pair<typename __unwrap_ref_decay<unsigned int>::type, typename __unwrap_ref_decay<ArrayRef<unsigned long>>::type>' (aka 'pair<unsigned int, llvm::ArrayRef<unsigned long>>') to 'std::pair<unsigned int, llvm::ArrayRef<unsigned __intcap>> &&' for 1st argument
    _LIBCPP_HIDE_FROM_ABI pair(pair&&) = default;
                          ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:254:5: note: candidate template ignored: requirement '_CheckArgs::__enable_implicit()' was not satisfied [with _U1 = unsigned int, _U2 = llvm::ArrayRef<unsigned long>]
    pair(pair<_U1, _U2> const& __p)
    ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:272:5: note: candidate template ignored: requirement '_CheckArgs::__enable_implicit()' was not satisfied [with _U1 = unsigned int, _U2 = llvm::ArrayRef<unsigned long>]
    pair(pair<_U1, _U2>&& __p)
    ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:441:5: note: candidate template ignored: could not match 'tuple' against 'pair'
    pair(tuple<_U1, _U2> const& __p)
    ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:462:5: note: candidate template ignored: could not match 'tuple' against 'pair'
    pair(tuple<_U1, _U2>&& __p)
    ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:507:5: note: candidate template ignored: could not match 'array' against 'pair'
    pair(array<_Up, 2> const& __p)
    ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:528:5: note: candidate template ignored: could not match 'array' against 'pair'
    pair(array<_Up, 2>&& __p)
    ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:245:14: note: explicit constructor is not a candidate
    explicit pair(pair<_U1, _U2> const& __p)
             ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:263:14: note: explicit constructor is not a candidate
    explicit pair(pair<_U1, _U2>&&__p)
             ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:453:5: note: explicit constructor is not a candidate
    pair(tuple<_U1, _U2> const& __p)
    ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:474:5: note: explicit constructor is not a candidate
    pair(tuple<_U1, _U2>&& __p)
    ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:519:5: note: explicit constructor is not a candidate
    pair(array<_Up, 2> const& __p)
    ^
/Users/smurdoch/cheri/output/rootfs-riscv64-purecap/usr/include/c++/v1/__utility/pair.h:540:5: note: explicit constructor is not a candidate
    pair(array<_Up, 2>&& __p)
    ^
/Users/smurdoch/cheri/llvm-project/llvm/include/llvm/ADT/DenseMapInfo.h:260:44: note: passing argument to parameter 'PairVal' here
  static unsigned getHashValue(const Pair& PairVal) {
                                           ^
1 error generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions