Open KernelPanic0 opened 1 month ago
I've tried using a local copy of the bitcoin crate which implements bitcoinconsensus as a feature and edited out the problematic line but still get the following erros:
warning: bitcoinconsensus@0.105.0+25.1: In file included from depend/bitcoin/src/util/strencodings.cpp:7:0:
warning: bitcoinconsensus@0.105.0+25.1: depend/bitcoin/src/util/strencodings.h: In function 'T LocaleIndependentAtoi(std::string_view)':
warning: bitcoinconsensus@0.105.0+25.1: depend/bitcoin/src/util/strencodings.h:132:38: error: 'from_chars' is not a member of 'std'
warning: bitcoinconsensus@0.105.0+25.1: auto [_, error_condition] = std::from_chars(s.data(), s.data() + s.size(), result);
warning: bitcoinconsensus@0.105.0+25.1: ^~~~~~~~~~
warning: bitcoinconsensus@0.105.0+25.1: depend/bitcoin/src/util/strencodings.h:132:38: note: suggested alternative: '__is_char'
warning: bitcoinconsensus@0.105.0+25.1: auto [_, error_condition] = std::from_chars(s.data(), s.data() + s.size(), result);
warning: bitcoinconsensus@0.105.0+25.1: ^~~~~~~~~~
warning: bitcoinconsensus@0.105.0+25.1: __is_char
warning: bitcoinconsensus@0.105.0+25.1: depend/bitcoin/src/util/strencodings.h: In function 'std::optional<_Tp> ToIntegral(std::string_view)':
warning: bitcoinconsensus@0.105.0+25.1: depend/bitcoin/src/util/strencodings.h:185:60: error: 'from_chars' is not a member of 'std'
warning: bitcoinconsensus@0.105.0+25.1: const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result);
warning: bitcoinconsensus@0.105.0+25.1: ^~~~~~~~~~
warning: bitcoinconsensus@0.105.0+25.1: depend/bitcoin/src/util/strencodings.h:185:60: note: suggested alternative: '__is_char'
warning: bitcoinconsensus@0.105.0+25.1: const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result);
warning: bitcoinconsensus@0.105.0+25.1: ^~~~~~~~~~
warning: bitcoinconsensus@0.105.0+25.1: __is_char
error: failed to run custom build command for `bitcoinconsensus v0.105.0+25.1 (/var/www/x/bitcoin/bitcoinconsensus)`
It would be amazing If a solution could be provided, or this crate be made cross-rs friendly
Sounds like your compiler is not C++17 compatible. We definitely cannot change the upstream library to be C++14.
I am trying to cross compile a rust application (from linux, for windows) which interacts with the bitcoin ecosystem. The bitcoinconsensus crate causes an issue as upon building everything builds fine other than this crate.
Are there any solutions for this?