bitcoinjs / fast-dat-parser

Superfast blockchain parser for stats
MIT License
74 stars 26 forks source link

ubuntu16 gcc7.3 make error #15

Closed 369pie closed 5 years ago

369pie commented 6 years ago

hello. any advice to fix this issue? thanks very much

g++ -pedantic -std=c++1z -W -Wall -Wcast-qual -Wconversion -Werror -Wextra -Wwrite-strings -O3 -Iinclude -MMD -MP -c src/bestchain.cpp -o src/bestchain.o
g++ src/bestchain.o -lcrypto -O3 -o bestchain
g++ -pedantic -std=c++1z -W -Wall -Wcast-qual -Wconversion -Werror -Wextra -Wwrite-strings -O3 -Iinclude -MMD -MP -c src/parser.cpp -o src/parser.o
In file included from include/hash.hpp:8:0,
                 from include/bitcoin.hpp:9,
                 from src/parser.cpp:9:
include/ranger.hpp: In instantiation of ‘void __ranger::Range<I>::put(E) [with E = __ranger::Range<const char*>; I = unsigned char*]’:
include/bitcoin.hpp:251:44:   required from ‘void putASM(R&, const R&) [with R = __ranger::Range<unsigned char*>]’
src/statistics.hpp:110:11:   required from ‘void dumpASM<Block>::operator()(const Block&) [with Block = BlockBase<__ranger::Range<unsigned char*> >]’
src/parser.cpp:145:1:   required from here
include/ranger.hpp:86:32: 错误:对‘put(__ranger::Range<unsigned char*>&, __ranger::Range<const char*>&)’的调用没有匹配的函数
  void put (E e) { __ranger::put(*this, e); }
                   ~~~~~~~~~~~~~^~~~~~~~~~
include/ranger.hpp:23:6: 附注:candidate: void __ranger::put(R&, typename R::value_type) [with R = __ranger::Range<unsigned char*>; typename R::value_type = unsigned char]
 void put (R& r, typename R::value_type e) {
      ^~~
include/ranger.hpp:23:6: 附注:  no known conversion for argument 2 from ‘__ranger::Range<const char*>’ to ‘__ranger::Range<unsigned char*>::value_type {aka unsigned char}’
include/ranger.hpp:36:6: 附注:candidate: template<class R, class E, class V> void __ranger::put(R&, E)
 void put (R& r, E e) {
      ^~~
include/ranger.hpp:36:6: 附注:  template argument deduction/substitution failed:
include/ranger.hpp:31:2: 错误:no type named ‘type’ in ‘struct std::enable_if<false, __ranger::Range<const char*> >’
  typename V = typename std::enable_if<
  ^~~~~~~~
In file included from include/bitcoin.hpp:9:0,
                 from src/parser.cpp:9:
include/hash.hpp:58:7: 错误:‘auto {anonymous}::toHexBE(const uint256_t&)’ defined but not used [-Werror=unused-function]
  auto toHexBE (const uint256_t& hash) {
       ^~~~~~~
cc1plus:所有的警告都被当作是错误
Makefile:28: recipe for target 'src/parser.o' failed
make: *** [src/parser.o] Error 1

i am using ubuntu16 and gcc below:

root@zdsx-Aspire-GX-781:/media/zdsx/Acer/fast-dat-parser/fast-dat-parser-master# gcc -v
使用内建 specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper
目标:x86_64-pc-linux-gnu
配置为:../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
线程模型:posix
gcc 版本 7.3.0 (GCC) 
scriptzteam commented 6 years ago

Personally for me it never worked :D

dcousens commented 6 years ago

As soon as I can, I'll investigate this, but, it is likely just a GCC version issue

369pie commented 6 years ago

well, thanks for your response. :)

bytefly commented 6 years ago

I have the same problem , my compiler is gcc 7.3.1

dcousens commented 5 years ago

should be fixed in d445b3585611416677a556ca32778288c0a5f798