Skip to content
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

FC::sha3.hpp: failed to compile on Ubuntu 18.04 with Boost 1.79 when included from benchmark/hash.cpp #31

Closed
linh2931 opened this issue Aug 20, 2022 · 0 comments · Fixed by AntelopeIO/fc#3 or #33
Assignees
Labels
bug Something isn't working

Comments

@linh2931
Copy link
Member

In CICD for PR #17, compiling succeeded on Ubuntu 20.04 and 22.0, but failed on Ubuntu 18.04: https://github.com/AntelopeIO/leap/runs/7905995360?check_suite_focus=true#step:4:1206

/usr/bin/g++-8  -DBOOST_ATOMIC_NO_LIB -DBOOST_CHRONO_NO_LIB -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_NO_LIB -DBOOST_PROGRAM_OPTIONS_NO_LIB -DOPENSSL_API_COMPAT=0x10100000L -DOPENSSL_NO_DEPRECATED -I../benchmark -I../libraries/fc/include -I../libraries/fc/vendor/websocketpp -I../libraries/fc/libraries/ff/libff/.. -isystem /usr/include/x86_64-linux-gnu -isystem /boost/include -I../libraries/fc/secp256k1/secp256k1 -I../libraries/fc/secp256k1/secp256k1/include -Wall -O3 -DNDEBUG   -fdiagnostics-color=always -pthread -std=gnu++1z -MD -MT benchmark/CMakeFiles/benchmark.dir/hash.cpp.o -MF benchmark/CMakeFiles/benchmark.dir/hash.cpp.o.d -o benchmark/CMakeFiles/benchmark.dir/hash.cpp.o -c ../benchmark/hash.cpp
In file included from ../benchmark/hash.cpp:2:
../libraries/fc/include/fc/crypto/sha3.hpp:105:8: error: 'hash' is not a class template
 struct hash<fc::sha3>
        ^~~~
../libraries/fc/include/fc/crypto/sha3.hpp:106:1: error: explicit specialization of non-template 'boost::hash'

The problem was due to Boost version. Matt suggests

Matt Witherspoon, [Aug 19, 2022 at 5:58:58 PM]:
...sha3.hpp might just need
#include <boost/functional/hash.hpp>
like sha256.hpp has

actually, it seems to compile fine just removing the boost::hash impl in sha3.hpp, so that code may not even be needed at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
1 participant