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
Unbreak build against Boost 1.68 #4682
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4682 +/- ##
===========================================
+ Coverage 87.57% 87.82% +0.25%
===========================================
Files 313 313
Lines 30813 30968 +155
Branches 3662 3626 -36
===========================================
+ Hits 26984 27198 +214
+ Misses 2577 2537 -40
+ Partials 1252 1233 -19
Continue to review full report at Codecov.
|
@@ -264,7 +264,7 @@ Json::Value Assembly::assemblyJSON(StringMap const& _sourceCodes) const | |||
createJsonValue("PUSH [ErrorTag]", i.location().start, i.location().end, "")); | |||
else | |||
collection.append( | |||
createJsonValue("PUSH [tag]", i.location().start, i.location().end, string(i.data()))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your version creates a hex string while it previously created a decimal string, so I think this should either use i.data().str()
or to_string(i.data())
whichever works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also showing there are no tests against this piece of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a different function.
@jbeich could you tell us how to test this build against your environment - perhaps with an appropriate docker image? Thanks! |
libevmasm/Assembly.cpp:267:74: error: no matching conversion for functional-style cast from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'std::__1::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') createJsonValue("PUSH [tag]", i.location().start, i.location().end, string(i.data()))); ^~~~~~~~~~~~~~~ /usr/include/c++/v1/string:760:40: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'const std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::allocator_type' (aka 'const std::__1::allocator<char>') for 1st argument _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a) ^ /usr/include/c++/v1/string:767:5: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'const std::__1::basic_string<char>' for 1st argument basic_string(const basic_string& __str); ^ /usr/include/c++/v1/string:772:5: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'std::__1::basic_string<char>' for 1st argument basic_string(basic_string&& __str) ^ /usr/include/c++/v1/string:782:31: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'const char *' for 1st argument _LIBCPP_INLINE_VISIBILITY basic_string(const _CharT* __s); ^ /usr/include/c++/v1/string:804:5: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__self_view' (aka 'basic_string_view<char, std::__1::char_traits<char> >') for 1st argument basic_string(__self_view __sv); ^ /usr/include/c++/v1/string:815:5: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'initializer_list<char>' for 1st argument basic_string(initializer_list<_CharT> __il); ^ /usr/include/c++/v1/string:800:9: note: candidate constructor template not viable: requires at least 3 arguments, but 1 was provided basic_string(const _Tp& __t, size_type __pos, size_type __n, ^ /usr/include/c++/v1/string:809:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided basic_string(_InputIterator __first, _InputIterator __last); ^ /usr/include/c++/v1/string:812:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a); ^ /usr/include/c++/v1/string:757:31: note: candidate constructor not viable: requires 0 arguments, but 1 was provided _LIBCPP_INLINE_VISIBILITY basic_string() ^ /usr/include/c++/v1/string:768:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(const basic_string& __str, const allocator_type& __a); ^ /usr/include/c++/v1/string:780:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(basic_string&& __str, const allocator_type& __a); ^ /usr/include/c++/v1/string:784:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(const _CharT* __s, const _Allocator& __a); ^ /usr/include/c++/v1/string:786:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(const _CharT* __s, size_type __n); ^ /usr/include/c++/v1/string:790:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(size_type __n, _CharT __c); ^ /usr/include/c++/v1/string:806:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(__self_view __sv, const _Allocator& __a); ^ /usr/include/c++/v1/string:817:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(initializer_list<_CharT> __il, const _Allocator& __a); ^ /usr/include/c++/v1/string:788:5: note: candidate constructor not viable: requires 3 arguments, but 1 was provided basic_string(const _CharT* __s, size_type __n, const _Allocator& __a); ^ /usr/include/c++/v1/string:792:5: note: candidate constructor not viable: requires 3 arguments, but 1 was provided basic_string(size_type __n, _CharT __c, const _Allocator& __a); ^ /usr/include/c++/v1/string:796:5: note: candidate constructor not viable: requires at least 2 arguments, but 1 was provided basic_string(const basic_string& __str, size_type __pos, ^ /usr/include/c++/v1/string:793:5: note: candidate constructor not viable: requires at least 3 arguments, but 1 was provided basic_string(const basic_string& __str, size_type __pos, size_type __n, ^ libevmasm/Assembly.cpp:293:66: error: no matching conversion for functional-style cast from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'std::__1::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') createJsonValue("tag", i.location().start, i.location().end, string(i.data()))); ^~~~~~~~~~~~~~~ /usr/include/c++/v1/string:760:40: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'const std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::allocator_type' (aka 'const std::__1::allocator<char>') for 1st argument _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a) ^ /usr/include/c++/v1/string:767:5: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'const std::__1::basic_string<char>' for 1st argument basic_string(const basic_string& __str); ^ /usr/include/c++/v1/string:772:5: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'std::__1::basic_string<char>' for 1st argument basic_string(basic_string&& __str) ^ /usr/include/c++/v1/string:782:31: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'const char *' for 1st argument _LIBCPP_INLINE_VISIBILITY basic_string(const _CharT* __s); ^ /usr/include/c++/v1/string:804:5: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__self_view' (aka 'basic_string_view<char, std::__1::char_traits<char> >') for 1st argument basic_string(__self_view __sv); ^ /usr/include/c++/v1/string:815:5: note: candidate constructor not viable: no known conversion from 'const dev::u256' (aka 'const number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >') to 'initializer_list<char>' for 1st argument basic_string(initializer_list<_CharT> __il); ^ /usr/include/c++/v1/string:800:9: note: candidate constructor template not viable: requires at least 3 arguments, but 1 was provided basic_string(const _Tp& __t, size_type __pos, size_type __n, ^ /usr/include/c++/v1/string:809:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided basic_string(_InputIterator __first, _InputIterator __last); ^ /usr/include/c++/v1/string:812:9: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a); ^ /usr/include/c++/v1/string:757:31: note: candidate constructor not viable: requires 0 arguments, but 1 was provided _LIBCPP_INLINE_VISIBILITY basic_string() ^ /usr/include/c++/v1/string:768:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(const basic_string& __str, const allocator_type& __a); ^ /usr/include/c++/v1/string:780:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(basic_string&& __str, const allocator_type& __a); ^ /usr/include/c++/v1/string:784:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(const _CharT* __s, const _Allocator& __a); ^ /usr/include/c++/v1/string:786:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(const _CharT* __s, size_type __n); ^ /usr/include/c++/v1/string:790:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(size_type __n, _CharT __c); ^ /usr/include/c++/v1/string:806:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(__self_view __sv, const _Allocator& __a); ^ /usr/include/c++/v1/string:817:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided basic_string(initializer_list<_CharT> __il, const _Allocator& __a); ^ /usr/include/c++/v1/string:788:5: note: candidate constructor not viable: requires 3 arguments, but 1 was provided basic_string(const _CharT* __s, size_type __n, const _Allocator& __a); ^ /usr/include/c++/v1/string:792:5: note: candidate constructor not viable: requires 3 arguments, but 1 was provided basic_string(size_type __n, _CharT __c, const _Allocator& __a); ^ /usr/include/c++/v1/string:796:5: note: candidate constructor not viable: requires at least 2 arguments, but 1 was provided basic_string(const basic_string& __str, size_type __pos, ^ /usr/include/c++/v1/string:793:5: note: candidate constructor not viable: requires at least 3 arguments, but 1 was provided basic_string(const basic_string& __str, size_type __pos, size_type __n, ^ 2 errors generated.
FreeBSD jail with Boost 1.68.0 update applied. Solidity is built via poudriere i.e., like a regular downstream package. I'm not familar with Linux or macOS. |
Created tests and added this change to #4772. Thank you for reporting this problem and creating a PR. |
After boostorg/multiprecision@06d03409c048 build fails. See error log. CC @alexdupre (downstream maintainer).
I don't use Solidity.