steemit / steem

The blockchain for Smart Media Tokens (SMTs) and decentralized applications.
https://steem.com
Other
1.95k stars 786 forks source link

can't compile pass ,why? #2204

Open kenneth opened 6 years ago

kenneth commented 6 years ago

boost version 1.60

Scanning dependencies of target graphene_schema
[ 51%] Building CXX object libraries/schema/CMakeFiles/graphene_schema.dir/schema.cpp.o
In file included from /steemit/steem/libraries/schema/schema.cpp:2:
In file included from /steemit/steem/libraries/schema/include/graphene/schema/schema.hpp:5:
In file included from /steemit/steem/libraries/schema/include/graphene/schema/schema_types.hpp:7:
In file included from /steemit/steem/libraries/schema/include/graphene/schema/schema_types/static_variant.hpp:7:
/steemit/steem/libraries/fc/include/fc/static_variant.hpp:385:34: error: class template partial specialization is not more specialized than the primary
      template [-Winvalid-partial-specialization]
  template<typename... T> struct get_typename<T...>  { static const char* name()   { return typeid(static_variant<T...>).name();   } };
                                 ^
/steemit/steem/libraries/fc/include/fc/reflect/typename.hpp:18:30: note: template is declared here
  template<typename T> class get_typename{};
                             ^
1 error generated.
make[2]: *** [libraries/schema/CMakeFiles/graphene_schema.dir/schema.cpp.o] Error 1
make[1]: *** [libraries/schema/CMakeFiles/graphene_schema.dir/all] Error 2
make: *** [all] Error 2
➜  steem git:(stable) ✗ make
[  3%] Built target project_secp256k1
[  4%] Built target equihash
[ 35%] Built target fc
[ 36%] Linking CXX executable log_test
[ 36%] Built target log_test
[ 37%] Linking CXX executable ecc_test
[ 37%] Built target ecc_test
[ 38%] Linking CXX executable blinding_test
[ 38%] Built target blinding_test
[ 39%] Linking CXX executable hmac_test
[ 39%] Built target hmac_test
[ 39%] Linking CXX executable bloom_test
[ 40%] Built target bloom_test
[ 41%] Linking CXX executable all_tests
[ 46%] Built target all_tests
[ 46%] Linking CXX executable real128_test
[ 47%] Built target real128_test
[ 47%] Linking CXX executable bip_lock
[ 48%] Built target bip_lock
[ 49%] Linking CXX executable ntp_test
[ 49%] Built target ntp_test
[ 50%] Linking CXX executable task_cancel_test
[ 50%] Built target task_cancel_test
[ 50%] Linking CXX executable blind
[ 51%] Built target blind
[ 51%] Linking CXX executable api
[ 51%] Built target api
[ 51%] Building CXX object libraries/schema/CMakeFiles/graphene_schema.dir/schema.cpp.o
In file included from /steemit/steem/libraries/schema/schema.cpp:2:
In file included from /steemit/steem/libraries/schema/include/graphene/schema/schema.hpp:5:
In file included from /steemit/steem/libraries/schema/include/graphene/schema/schema_types.hpp:7:
In file included from /steemit/steem/libraries/schema/include/graphene/schema/schema_types/static_variant.hpp:7:
/steemit/steem/libraries/fc/include/fc/static_variant.hpp:385:34: error: class template partial specialization is not more specialized than the primary
      template [-Winvalid-partial-specialization]
  template<typename... T> struct get_typename<T...>  { static const char* name()   { return typeid(static_variant<T...>).name();   } };
                                 ^
/steemit/steem/libraries/fc/include/fc/reflect/typename.hpp:18:30: note: template is declared here
  template<typename T> class get_typename{};
                             ^
1 error generated.
make[2]: *** [libraries/schema/CMakeFiles/graphene_schema.dir/schema.cpp.o] Error 1
make[1]: *** [libraries/schema/CMakeFiles/graphene_schema.dir/all] Error 2
make: *** [all] Error 2
theoreticalbts commented 6 years ago

What compiler version is this?

Also, I suspect this is actually a bug, caught by warnings-as-errors. The code should be:

template<typename... T> struct get_typename<static_variant< T... > >  { static const char* name()   { return typeid(static_variant<T...>).name();   } };

but I'm not sure where to apply this patch because this library is in the process of being changed from a submodule to a vendor (see #2209 ).

kenneth commented 6 years ago

@theoreticalbts i clean all ,and rebuild still error

✗ make
[  2%] Built target project_secp256k1
[  3%] Built target equihash
[  4%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/rpc/cli.cpp.o
/steemit/steem/libraries/fc/src/rpc/cli.cpp:21:5: error: "You have an old version of readline installed that might not support some of the features we
      need" [-Werror,-W#warnings]
#   warning "You have an old version of readline installed that might not support some of the features we need"
    ^
/steemit/steem/libraries/fc/src/rpc/cli.cpp:22:5: error: "Readline support will not be compiled in" [-Werror,-W#warnings]
#   warning "Readline support will not be compiled in"
    ^
2 errors generated.
make[2]: *** [libraries/fc/CMakeFiles/fc.dir/src/rpc/cli.cpp.o] Error 1
make[1]: *** [libraries/fc/CMakeFiles/fc.dir/all] Error 2
make: *** [all] Error 2
abitmore commented 6 years ago

due to -Werror?

kenneth commented 6 years ago

@abitmore i don't know but i mac readline is 7.0.3_1 how can i compile pass ?

mvandeberg commented 6 years ago

@theoreticalbts The patch was already applied to fc in develop. It was applied after Appbase development was started and the library was sufficiently incompatible with stable. The bug appearing now is due to changes in clang accompanying the new version of macOS this fall.

dai-shuo commented 6 years ago

for those who stuck here, try this.