argotorg / argotorg/solidity

[PowerPC] error: no match for call to '(const ranges::views::slice_fn)

Open
#14,593 1 comment 0 reactions 0 assignees View on GitHub
bug :bug:
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

This is on a big-endian platform, with z3 disabled due to https://github.com/ethereum/solidity/issues/14592

```
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_solidity/solidity/work/solidity_0.8.21/libevmasm/Inliner.cpp: In member function 'std::map solidity::evmasm::Inliner:determineInlinableBlocks(const solidity::evmasm::AssemblyItems&) const':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_solidity/solidity/work/solidity_0.8.21/libevmasm/Inliner.cpp:117:95: error: no match for call to '(const ranges::views::slice_fn) (long unsigned int, std::tuple_element<0, ranges::common_pair >::type)'
117 | ranges::span block = _items | ranges::views::slice(*lastTag + 1, index + 1);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_solidity/solidity/work/solidity_0.8.21/libevmasm/Inliner.cpp:35:
/opt/local/include/range/v3/view/slice.hpp:277:18: note: candidate: 'template && CPP_true), int>::type , typename std::enable_if<((forward_range || (input_range && sized_range)) && CPP_true), int>::type > auto ranges::views::slice_base_fn::operator()(Rng&&, ranges::detail::from_end_of_t, ranges::end_fn) const'
277 | auto operator()(Rng && rng,
| ^~~~~~~~
/opt/local/include/range/v3/view/slice.hpp:277:18: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_solidity/solidity/work/solidity_0.8.21/libevmasm/Inliner.cpp:117:95: note: candidate expects 3 arguments, 2 provided
117 | ranges::span block = _items | ranges::views::slice(*lastTag + 1, index + 1);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/range/v3/view/slice.hpp:268:18: note: candidate: 'template && CPP_true), int>::type , typename std::enable_if<(input_range && CPP_true), int>::type > auto ranges::views::slice_base_fn::operator()(Rng&&, ranges::range_difference_t, ranges::end_fn) const'
268 | auto operator()(Rng && rng, range_difference_t from, end_fn) const
| ^~~~~~~~
/opt/local/include/range/v3/view/slice.hpp:268:18: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_solidity/solidity/work/solidity_0.8.21/libevmasm/Inliner.cpp:117:95: note: candidate expects 3 arguments, 2 provided
117 | ranges::span block = _items | ranges::views::slice(*lastTag + 1, index + 1);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/range/v3/view/slice.hpp:252:18: note: candidate: 'template && CPP_true), int>::type , typename std::enable_if<((forward_range || (input_range && sized_range)) && CPP_true), int>::type > auto ranges::views::slice_base_fn::operator()(Rng&&, ranges::detail::from_end_of_t, ranges::detail::from_end_of_t) const'
252 | auto operator()(Rng && rng,
| ^~~~~~~~
/opt/local/include/range/v3/view/slice.hpp:252:18: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_solidity/solidity/work/solidity_0.8.21/libevmasm/Inliner.cpp:117:95: note: candidate expects 3 arguments, 2 provided
117 | ranges::span block = _items | ranges::views::slice(*lastTag + 1, index + 1);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/range/v3/view/slice.hpp:235:18: note: candidate: 'template && CPP_true), int>::type , typename std::enable_if<(input_range && CPP_true), int>::type , typename std::enable_if<(sized_range && CPP_true), int>::type > auto ranges::views::slice_base_fn::operator()(Rng&&, ranges::range_difference_t, ranges::detail::from_end_of_t) const'
235 | auto operator()(Rng && rng,
| ^~~~~~~~
/opt/local/include/range/v3/view/slice.hpp:235:18: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_solidity/solidity/work/solidity_0.8.21/libevmasm/Inliner.cpp:117:95: note: candidate expects 3 arguments, 2 provided
117 | ranges::span block = _items | ranges::views::slice(*lastTag + 1, index + 1);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/range/v3/view/slice.hpp:222:28: note: candidate: 'template && CPP_true), int>::type , typename std::enable_if<(input_range && CPP_true), int>::type > constexpr auto ranges::views::slice_base_fn::operator()(Rng&&, ranges::range_difference_t, ranges::range_difference_t) cons'
222 | constexpr auto operator()(Rng && rng,
| ^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
```

Contributor guide

Open the contributing guide

Research direction

Start at libevmasm/Inliner.cpp line 117, where the PowerPC build fails while invoking ranges::views::slice, and compare the call with the range-v3 declarations shown in the compiler output. Reproduce the build on the reported big-endian platform with z3 disabled; done means the Solidity build compiles successfully there.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.