sec-bit / zkPoD-node

zkPoD: A decentralized system for perfect fair data exchange
GNU General Public License v3.0
204 stars 38 forks source link

Building failed at ubuntu #16

Closed sbilly closed 4 years ago

sbilly commented 4 years ago

ubuntu 18.06 x64 latest.

cmake -DCMAKE_INSTALL_PREFIX=../../install -DMULTICORE=ON -DWITH_PROCPS=OFF -DWITH_SUPERCOP=OFF -DCURVE=MCL_BN128 ..
make && make install

return with error

g++ -c main.cc -g3 -fPIC -fopenmp -std=c++17 -Wall -Wextra -gdwarf-2 -gstrict-dwarf -Wno-parentheses -Wdeprecated-declarations -fmerge-all-constants -I /usr/local/include -I /usr/include -I ../depends/install/include/depends/mcl/include -I ../public -I ../thirdparty -isystem ../depends/install/include -I. -I..   -O3 -DNDEBUG -DLINUX  -DMCL_DONT_USE_OPENSSL  -DBINARY_OUTPUT -DBN_SUPPORT_SNARK=1 -DCURVE_MCL_BN128 -DMONTGOMERY_OUTPUT -DMULTICORE=1 -DUSE_ASM -DNO_PROCPS   -o In file included from main.cc:2:0:
../public/public.h:67:29: fatal error: cryptopp/keccak.h: No such file or directory
compilation terminated.
Makefile:142: recipe for target 'build/self/./main.o' failed
make[1]: *** [build/self/./main.o] Error 1
make[1]: Leaving directory '/opt/disk2/root/src/github.com/zkPoD/zkPoD-lib/pod_setup'
Makefile:13: recipe for target 'pod_setup' failed
make: *** [pod_setup] Error 2
p0n1 commented 4 years ago

Hi @sbilly, have you installed these dependencies? Or you can check the travis script working for Ubuntu 18.04.

sbilly commented 4 years ago

I have run the following cmd, re-run make, it return with same error. The libcrypto++-dev is 5.6.1-9ubuntu0.1, it's latest version on ubuntu 18.04 x64.

apt-get install libomp-dev libcrypto++-dev libboost-all-dev libgmp-dev
g++ -c main.cc -g3 -fPIC -fopenmp -std=c++17 -Wall -Wextra -gdwarf-2 -gstrict-dwarf -Wno-parentheses -Wdeprecated-declarations -fmerge-all-constants -I /usr/local/include -I /usr/include -I ../depends/install/include/depends/mcl/include -I ../public -I ../thirdparty -isystem ../depends/install/include -I. -I..   -O3 -DNDEBUG -DLINUX  -DMCL_DONT_USE_OPENSSL  -DBINARY_OUTPUT -DBN_SUPPORT_SNARK=1 -DCURVE_MCL_BN128 -DMONTGOMERY_OUTPUT -DMULTICORE=1 -DUSE_ASM -DNO_PROCPS   -o In file included from main.cc:2:0:
../public/public.h:67:29: fatal error: cryptopp/keccak.h: No such file or directory
compilation terminated.
Makefile:142: recipe for target 'build/self/./main.o' failed
make[1]: *** [build/self/./main.o] Error 1
make[1]: Leaving directory '/opt/disk2/root/src/github.com/zkPoD/zkPoD-lib/pod_setup'
Makefile:13: recipe for target 'pod_setup' failed
make: *** [pod_setup] Error 2
p0n1 commented 4 years ago

Hi @sbilly similar errors here https://github.com/ethereum/aleth/issues/4138#issuecomment-309161574.

CRYPTOPP_5_6_4 has keccak but CRYPTOPP_5_6_1 doesn't.

And I guess you could install libcrypto++ 5.6.4 on 18.04?

sbilly commented 4 years ago

yes. it fixed.

sbilly commented 4 years ago

another error.

$make
make[1]: Entering directory 'zkPoD/zkPoD-lib/pod_setup'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory 'zkPoD/zkPoD-lib/pod_setup'
make[1]: Entering directory 'zkPoD/zkPoD-lib/pod_publish'
g++ -c main.cc -g3 -fPIC -fopenmp -std=c++17 -Wall -Wextra -gdwarf-2 -gstrict-dwarf -Wno-parentheses -Wdeprecated-declarations -fmerge-all-constants -I /usr/local/include -I /usr/include -I ../depends/install/include/depends/mcl/include -I ../public -isystem ../thirdparty/csv -I ../thirdparty -isystem ../depends/install/include -I. -I..   -O3 -DNDEBUG -DLINUX  -DMCL_DONT_USE_OPENSSL -DBINARY_OUTPUT -DBN_SUPPORT_SNARK=1 -DCURVE_MCL_BN128 -DMONTGOMERY_OUTPUT -DMULTICORE=1 -DUSE_ASM -DNO_PROCPS  -DBOOST_SPIRIT_THREADSAFE  -o build/self/./main.o
In file included from publish.h:8:0,
                 from main.cc:8:
../public/scheme_plain.h:9:17: error: expected ‘{’ before ‘::’ token
 namespace scheme::plain {
                 ^
../public/scheme_plain.h:9:19: error: ‘plain’ in namespace ‘::’ does not name a type
 namespace scheme::plain {
                   ^
In file included from ../public/scheme_table.h:8:0,
                 from publish.h:9,
                 from main.cc:8:
../public/vrf_meta.h:11:17: error: expected ‘{’ before ‘::’ token
 namespace scheme::table {
                 ^
../public/vrf_meta.h:11:19: error: ‘table’ in namespace ‘::’ does not name a type
 namespace scheme::table {
                   ^
In file included from publish.h:9:0,
                 from main.cc:8:
../public/scheme_table.h:10:17: error: expected ‘{’ before ‘::’ token
 namespace scheme::table {
                 ^
../public/scheme_table.h:10:19: error: ‘table’ in namespace ‘::’ does not name a type
 namespace scheme::table {
                   ^
In file included from main.cc:8:0:
publish.h:12:27: error: ‘scheme::scheme::scheme::table’ has not been declared
                   scheme::table::Type table_type,
                           ^
publish.h:12:39: error: expected ‘,’ or ‘...’ before ‘table_type’
                   scheme::table::Type table_type,
                                       ^
main.cc: In function ‘int scheme::scheme::scheme::main(int, char**)’:
main.cc:15:17: error: ‘scheme::scheme::scheme::Mode’ has not been declared
   using scheme::Mode;
                 ^
main.cc:16:17: error: ‘scheme::scheme::scheme::table’ has not been declared
   using scheme::table::Type;
                 ^
main.cc:21:3: error: ‘Type’ was not declared in this scope
   Type table_type;
   ^
main.cc:48:35: error: the value of ‘Type’ is not usable in a constant expression
         "table_type,t", po::value<Type>(&table_type)->default_value(Type::kCsv),
                                   ^
main.cc:21:3: note: ‘Type’ was not declared ‘constexpr’
   Type table_type;
   ^
main.cc:48:42: error: ‘table_type’ was not declared in this scope
         "table_type,t", po::value<Type>(&table_type)->default_value(Type::kCsv),
                                          ^
main.cc:48:69: error: ‘Type’ is not a class, namespace, or enumeration
         "table_type,t", po::value<Type>(&table_type)->default_value(Type::kCsv),
                                                                     ^
main.cc:170:34: error: ‘table_type’ was not declared in this scope
                        std::move(table_type), std::move(vrf_colnum_index),
                                  ^
main.cc: At global scope:
main.cc:187:1: error: expected ‘}’ at end of input
 }
 ^
main.cc:187:1: error: expected ‘}’ at end of input
main.cc:187:1: error: expected ‘}’ at end of input
Makefile:153: recipe for target 'build/self/./main.o' failed
make[1]: *** [build/self/./main.o] Error 1
make[1]: Leaving directory 'zkPoD/zkPoD-lib/pod_publish'
Makefile:13: recipe for target 'pod_publish' failed
make: *** [pod_publish] Error 2
sbilly commented 4 years ago

any update?

p0n1 commented 4 years ago

Hi @sbilly, it looks like issues related with GCC. What's your GCC version?

sbilly commented 4 years ago

@p0n1

$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
p0n1 commented 4 years ago

Hi @sbilly, We need GCC 7.3 or above and we recommend you just use Ubuntu 18.04 as described here.

sbilly commented 4 years ago

thx.