HElib
HElib copied to clipboard
Building benchmarks fails
$ uname -r
5.7.5-arch1-1
$ g++ --version
g++ (GCC) 10.1.0
[...]
I built and installed google/benchmark and the HElib as advised in INSTALL.md and benchmarks/README.md. However, when trying to build the benchmark by running make
in benchmarks/build (after running the adviced cmake
), the following errors show up:
[ 33%] Building CXX object CMakeFiles/helib_benchmark.dir/bench_thinboot.cpp.o
In file included from /opt/HElib/helib_pack/include/helib/helib.h:26,
from HElib/benchmarks/bench_thinboot.cpp:16:
/opt/HElib/helib_pack/include/helib/Ptxt.h:206:18: error: 'std::enable_if_t' has not been declared
206 | std::enable_if_t<std::is_same<U, BGV>::value>* = nullptr>
| ^~~~~~~~~~~
/opt/HElib/helib_pack/include/helib/Ptxt.h:206:29: error: expected '>' before '<' token
206 | std::enable_if_t<std::is_same<U, BGV>::value>* = nullptr>
| ^
/opt/HElib/helib_pack/include/helib/Ptxt.h:291:27: error: 'enable_if_t' in namespace 'std' does not name a template type
291 | typename std::enable_if_t<std::is_same<T, BGV>::value>* = nullptr>
| ^~~~~~~~~~~
/opt/HElib/helib_pack/include/helib/Ptxt.h:291:27: note: 'std::enable_if_t' is only available from C++14 onwards
/opt/HElib/helib_pack/include/helib/Ptxt.h:291:38: error: expected '>' before '<' token
291 | typename std::enable_if_t<std::is_same<T, BGV>::value>* = nullptr>
| ^
/opt/HElib/helib_pack/include/helib/Ptxt.h:301:27: error: 'enable_if_t' in namespace 'std' does not name a template type
301 | typename std::enable_if_t<std::is_same<T, BGV>::value>* = nullptr>
| ^~~~~~~~~~~
/opt/HElib/helib_pack/include/helib/Ptxt.h:301:27: note: 'std::enable_if_t' is only available from C++14 onwards
/opt/HElib/helib_pack/include/helib/Ptxt.h:301:38: error: expected '>' before '<' token
301 | typename std::enable_if_t<std::is_same<T, BGV>::value>* = nullptr>
| ^
/opt/HElib/helib_pack/include/helib/Ptxt.h:497:27: error: 'enable_if_t' in namespace 'std' does not name a template type
497 | typename std::enable_if_t<std::is_same<T, BGV>::value>* = nullptr>
| ^~~~~~~~~~~
/opt/HElib/helib_pack/include/helib/Ptxt.h:497:27: note: 'std::enable_if_t' is only available from C++14 onwards
/opt/HElib/helib_pack/include/helib/Ptxt.h:497:38: error: expected '>' before '<' token
497 | typename std::enable_if_t<std::is_same<T, BGV>::value>* = nullptr>
| ^
/opt/HElib/helib_pack/include/helib/Ptxt.h:510:27: error: 'enable_if_t' in namespace 'std' does not name a template type
510 | typename std::enable_if_t<std::is_same<T, CKKS>::value>* = nullptr>
| ^~~~~~~~~~~
/opt/HElib/helib_pack/include/helib/Ptxt.h:510:27: note: 'std::enable_if_t' is only available from C++14 onwards
/opt/HElib/helib_pack/include/helib/Ptxt.h:510:38: error: expected '>' before '<' token
510 | typename std::enable_if_t<std::is_same<T, CKKS>::value>* = nullptr>
| ^
/opt/HElib/helib_pack/include/helib/Ptxt.h:600:18: error: 'std::enable_if_t' has not been declared
600 | std::enable_if_t<std::is_same<T, BGV>::value>* = nullptr>
| ^~~~~~~~~~~
/opt/HElib/helib_pack/include/helib/Ptxt.h:600:29: error: expected '>' before '<' token
600 | std::enable_if_t<std::is_same<T, BGV>::value>* = nullptr>
| ^
/opt/HElib/helib_pack/include/helib/Ptxt.h:626:18: error: 'std::enable_if_t' has not been declared
626 | std::enable_if_t<std::is_same<T, CKKS>::value>* = nullptr>
| ^~~~~~~~~~~
/opt/HElib/helib_pack/include/helib/Ptxt.h:626:29: error: expected '>' before '<' token
626 | std::enable_if_t<std::is_same<T, CKKS>::value>* = nullptr>
| ^
/opt/HElib/helib_pack/include/helib/Ptxt.h:635:18: error: 'std::enable_if_t' has not been declared
635 | std::enable_if_t<std::is_same<T, CKKS>::value>* = nullptr>
| ^~~~~~~~~~~
/opt/HElib/helib_pack/include/helib/Ptxt.h:635:29: error: expected '>' before '<' token
635 | std::enable_if_t<std::is_same<T, CKKS>::value>* = nullptr>
| ^
/opt/HElib/helib_pack/include/helib/Ptxt.h:644:18: error: 'std::enable_if_t' has not been declared
644 | std::enable_if_t<std::is_same<T, CKKS>::value>* = nullptr>
| ^~~~~~~~~~~
/opt/HElib/helib_pack/include/helib/Ptxt.h:644:29: error: expected '>' before '<' token
644 | std::enable_if_t<std::is_same<T, CKKS>::value>* = nullptr>
| ^
HElib/benchmarks/bench_thinboot.cpp:19:6: error: variable or field 'squareWithThinBoot' declared void
19 | void squareWithThinBoot(FHEPubKey& pk, Ctxt& c) {
| ^~~~~~~~~~~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:19:25: error: 'FHEPubKey' was not declared in this scope
19 | void squareWithThinBoot(FHEPubKey& pk, Ctxt& c) {
| ^~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:19:36: error: 'pk' was not declared in this scope
19 | void squareWithThinBoot(FHEPubKey& pk, Ctxt& c) {
| ^~
HElib/benchmarks/bench_thinboot.cpp:19:40: error: 'Ctxt' was not declared in this scope; did you mean 'helib::Ctxt'?
19 | void squareWithThinBoot(FHEPubKey& pk, Ctxt& c) {
| ^~~~
| helib::Ctxt
In file included from /opt/HElib/helib_pack/include/helib/helib.h:22,
from HElib/benchmarks/bench_thinboot.cpp:16:
/opt/HElib/helib_pack/include/helib/Ctxt.h:260:7: note: 'helib::Ctxt' declared here
260 | class Ctxt {
| ^~~~
HElib/benchmarks/bench_thinboot.cpp:19:46: error: 'c' was not declared in this scope
19 | void squareWithThinBoot(FHEPubKey& pk, Ctxt& c) {
| ^
HElib/benchmarks/bench_thinboot.cpp: In function 'void BM_thinboot(benchmark::State&, long int, long int, long int, long int, long int, long int, int, std::vector<long int>, std::vector<long int>, std::vector<long int>)':
HElib/benchmarks/bench_thinboot.cpp:38:25: error: 'convert' was not declared in this scope; did you mean 'helib::convert'?
38 | NTL::Vec<long> mvec = convert<NTL::Vec<long>>(mvector);
| ^~~~~~~
| helib::convert
In file included from /opt/HElib/helib_pack/include/helib/DoubleCRT.h:19,
from /opt/HElib/helib_pack/include/helib/helib.h:20,
from HElib/benchmarks/bench_thinboot.cpp:16:
/opt/HElib/helib_pack/include/helib/NumbTh.h:333:4: note: 'helib::convert' declared here
333 | T1 convert(const T2& v2)
| ^~~~~~~
HElib/benchmarks/bench_thinboot.cpp:38:46: error: expected primary-expression before '>' token
38 | NTL::Vec<long> mvec = convert<NTL::Vec<long>>(mvector);
| ^~
HElib/benchmarks/bench_thinboot.cpp:47:26: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<long int>')
39 | std::cout << "m=" << m
| ~~~~~~~~~~~~~~~~~~~~~~
40 | << ", p=" << p
| ~~~~~~~~~~~~~~
41 | << ", r=" << r
| ~~~~~~~~~~~~~~
42 | << ", bits=" << bits
| ~~~~~~~~~~~~~~~~~~~~
43 | << ", c=" << c
| ~~~~~~~~~~~~~~
44 | << ", skHwt=" << t
| ~~~~~~~~~~~~~~~~~~
45 | << ", c_m=" << c_m
| ~~~~~~~~~~~~~~~~~~
46 | << ", mvec=" << mvec
| ~~~~~~~~~~~~~~~~~~~~
47 | << ", gens=" << gens
| ~~~~~~~~~~~~ ^~ ~~~~
| | |
| | std::vector<long int>
| std::basic_ostream<char>
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:108:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
108 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:108:36: note: no known conversion for argument 1 from 'std::vector<long int>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
108 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10.1.0/ostream:117:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]'
117 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:117:32: note: no known conversion for argument 1 from 'std::vector<long int>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
117 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/10.1.0/ostream:127:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
127 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:127:30: note: no known conversion for argument 1 from 'std::vector<long int>' to 'std::ios_base& (*)(std::ios_base&)'
127 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/10.1.0/ostream:166:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
166 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:166:23: note: no known conversion for argument 1 from 'std::vector<long int>' to 'long int'
166 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/10.1.0/ostream:170:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
170 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:170:32: note: no known conversion for argument 1 from 'std::vector<long int>' to 'long unsigned int'
170 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/10.1.0/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
174 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:174:23: note: no known conversion for argument 1 from 'std::vector<long int>' to 'bool'
174 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/10.1.0/ostream:784,
from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/bits/ostream.tcc:91:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
91 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10.1.0/bits/ostream.tcc:92:22: note: no known conversion for argument 1 from 'std::vector<long int>' to 'short int'
92 | operator<<(short __n)
| ~~~~~~^~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:181:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
181 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:181:33: note: no known conversion for argument 1 from 'std::vector<long int>' to 'short unsigned int'
181 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/10.1.0/ostream:784,
from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/bits/ostream.tcc:105:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
105 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10.1.0/bits/ostream.tcc:106:20: note: no known conversion for argument 1 from 'std::vector<long int>' to 'int'
106 | operator<<(int __n)
| ~~~~^~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:192:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
192 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:192:31: note: no known conversion for argument 1 from 'std::vector<long int>' to 'unsigned int'
192 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/10.1.0/ostream:201:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
201 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:201:28: note: no known conversion for argument 1 from 'std::vector<long int>' to 'long long int'
201 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/10.1.0/ostream:205:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
205 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:205:37: note: no known conversion for argument 1 from 'std::vector<long int>' to 'long long unsigned int'
205 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10.1.0/ostream:220:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
220 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:220:25: note: no known conversion for argument 1 from 'std::vector<long int>' to 'double'
220 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/10.1.0/ostream:224:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
224 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:224:24: note: no known conversion for argument 1 from 'std::vector<long int>' to 'float'
224 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/10.1.0/ostream:232:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
232 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:232:30: note: no known conversion for argument 1 from 'std::vector<long int>' to 'long double'
232 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/10.1.0/ostream:245:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
245 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:245:30: note: no known conversion for argument 1 from 'std::vector<long int>' to 'const void*'
245 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
In file included from /usr/include/c++/10.1.0/ostream:784,
from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/bits/ostream.tcc:119:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]'
119 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10.1.0/bits/ostream.tcc:120:34: note: no known conversion for argument 1 from 'std::vector<long int>' to 'std::basic_ostream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
120 | operator<<(__streambuf_type* __sbin)
| ~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/10.1.0/string:55,
from /opt/google/benchmark/include/benchmark/benchmark.h:178,
from HElib/benchmarks/bench_thinboot.cpp:13:
/usr/include/c++/10.1.0/bits/basic_string.h:6458:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
6458 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/10.1.0/bits/basic_string.h:6458:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: 'std::vector<long int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/bits/ios_base.h:46,
from /usr/include/c++/10.1.0/ios:42,
from /usr/include/c++/10.1.0/ostream:38,
from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/system_error:262:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)'
262 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/10.1.0/system_error:262:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'const std::error_code&'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:506:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)'
506 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:506:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: deduced conflicting types for parameter '_CharT' ('char' and 'std::vector<long int>')
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:511:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)'
511 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:511:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'char'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:517:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)'
517 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:517:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'char'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:523:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)'
523 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:523:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'signed char'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:528:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)'
528 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:528:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'unsigned char'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:589:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)'
589 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:589:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: mismatched types 'const _CharT*' and 'std::vector<long int>'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/ostream:784,
from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/bits/ostream.tcc:321:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)'
321 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/10.1.0/bits/ostream.tcc:321:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'const char*'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:606:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)'
606 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:606:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'const char*'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:619:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)'
619 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:619:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'const signed char*'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:624:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)'
624 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:624:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'const unsigned char*'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/iostream:39,
from HElib/benchmarks/bench_thinboot.cpp:14:
/usr/include/c++/10.1.0/ostream:773:5: note: candidate: 'template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&)'
773 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
/usr/include/c++/10.1.0/ostream:773:5: note: template argument deduction/substitution failed:
/usr/include/c++/10.1.0/ostream: In substitution of 'template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ostream<char>&; _Tp = std::vector<long int>]':
HElib/benchmarks/bench_thinboot.cpp:47:29: required from here
/usr/include/c++/10.1.0/ostream:773:5: error: no type named 'type' in 'struct std::enable_if<false, std::basic_ostream<char>&>'
In file included from /opt/HElib/helib_pack/include/helib/NumbTh.h:21,
from /opt/HElib/helib_pack/include/helib/DoubleCRT.h:19,
from /opt/HElib/helib_pack/include/helib/helib.h:20,
from HElib/benchmarks/bench_thinboot.cpp:16:
/usr/include/c++/10.1.0/complex:554:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::complex<_Tp>&)'
554 | operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/10.1.0/complex:554:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: 'std::vector<long int>' is not derived from 'const std::complex<_Tp>'
47 | << ", gens=" << gens
| ^~~~
In file included from /usr/include/c++/10.1.0/memory:84,
from /opt/HElib/helib_pack/include/helib/NumbTh.h:30,
from /opt/HElib/helib_pack/include/helib/DoubleCRT.h:19,
from /opt/HElib/helib_pack/include/helib/helib.h:20,
from HElib/benchmarks/bench_thinboot.cpp:16:
/usr/include/c++/10.1.0/bits/shared_ptr.h:69:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__shared_ptr<_Tp, _Lp>&)'
69 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/10.1.0/bits/shared_ptr.h:69:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: 'std::vector<long int>' is not derived from 'const std::__shared_ptr<_Tp, _Lp>'
47 | << ", gens=" << gens
| ^~~~
In file included from /opt/HElib/helib_pack/include/helib/Ptxt.h:20,
from /opt/HElib/helib_pack/include/helib/helib.h:26,
from HElib/benchmarks/bench_thinboot.cpp:16:
/usr/include/c++/10.1.0/iomanip:79:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Resetiosflags)'
79 | operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/iomanip:79:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'std::_Resetiosflags'
47 | << ", gens=" << gens
| ^~~~
In file included from /opt/HElib/helib_pack/include/helib/Ptxt.h:20,
from /opt/HElib/helib_pack/include/helib/helib.h:26,
from HElib/benchmarks/bench_thinboot.cpp:16:
/usr/include/c++/10.1.0/iomanip:109:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setiosflags)'
109 | operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/iomanip:109:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'std::_Setiosflags'
47 | << ", gens=" << gens
| ^~~~
In file included from /opt/HElib/helib_pack/include/helib/Ptxt.h:20,
from /opt/HElib/helib_pack/include/helib/helib.h:26,
from HElib/benchmarks/bench_thinboot.cpp:16:
/usr/include/c++/10.1.0/iomanip:143:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setbase)'
143 | operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/iomanip:143:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'std::_Setbase'
47 | << ", gens=" << gens
| ^~~~
In file included from /opt/HElib/helib_pack/include/helib/Ptxt.h:20,
from /opt/HElib/helib_pack/include/helib/helib.h:26,
from HElib/benchmarks/bench_thinboot.cpp:16:
/usr/include/c++/10.1.0/iomanip:178:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setfill<_CharT>)'
178 | operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/iomanip:178:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: 'std::vector<long int>' is not derived from 'std::_Setfill<_CharT>'
47 | << ", gens=" << gens
| ^~~~
In file included from /opt/HElib/helib_pack/include/helib/Ptxt.h:20,
from /opt/HElib/helib_pack/include/helib/helib.h:26,
from HElib/benchmarks/bench_thinboot.cpp:16:
/usr/include/c++/10.1.0/iomanip:208:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setprecision)'
208 | operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/iomanip:208:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'std::_Setprecision'
47 | << ", gens=" << gens
| ^~~~
In file included from /opt/HElib/helib_pack/include/helib/Ptxt.h:20,
from /opt/HElib/helib_pack/include/helib/helib.h:26,
from HElib/benchmarks/bench_thinboot.cpp:16:
/usr/include/c++/10.1.0/iomanip:238:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setw)'
238 | operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/iomanip:238:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: cannot convert 'gens' (type 'std::vector<long int>') to type 'std::_Setw'
47 | << ", gens=" << gens
| ^~~~
In file included from /opt/HElib/helib_pack/include/helib/Ptxt.h:20,
from /opt/HElib/helib_pack/include/helib/helib.h:26,
from HElib/benchmarks/bench_thinboot.cpp:16:
/usr/include/c++/10.1.0/iomanip:311:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Put_money<_MoneyT>)'
311 | operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/iomanip:311:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: 'std::vector<long int>' is not derived from 'std::_Put_money<_MoneyT>'
47 | << ", gens=" << gens
| ^~~~
In file included from /opt/HElib/helib_pack/include/helib/Ptxt.h:20,
from /opt/HElib/helib_pack/include/helib/helib.h:26,
from HElib/benchmarks/bench_thinboot.cpp:16:
/usr/include/c++/10.1.0/iomanip:363:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Put_time<_CharT>)'
363 | operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_time<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/10.1.0/iomanip:363:5: note: template argument deduction/substitution failed:
HElib/benchmarks/bench_thinboot.cpp:47:29: note: 'std::vector<long int>' is not derived from 'std::_Put_time<_CharT>'
47 | << ", gens=" << gens
| ^~~~
HElib/benchmarks/bench_thinboot.cpp:51:3: error: 'FHEcontext' was not declared in this scope
51 | FHEcontext context(m, p, r, gens, ords);
| ^~~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:52:3: error: 'context' was not declared in this scope
52 | context.zMStar.set_cM(c_m/100.0);
| ^~~~~~~
HElib/benchmarks/bench_thinboot.cpp:55:3: error: 'buildModChain' was not declared in this scope; did you mean 'helib::buildModChain'?
55 | buildModChain(context, bits, c, /*willBeBootstrappable=*/true, /*skHwt*/t);
| ^~~~~~~~~~~~~
| helib::buildModChain
In file included from /opt/HElib/helib_pack/include/helib/helib.h:21,
from HElib/benchmarks/bench_thinboot.cpp:16:
/opt/HElib/helib_pack/include/helib/Context.h:504:6: note: 'helib::buildModChain' declared here
504 | void buildModChain(Context& context, long nBits, long nDgts=3,
| ^~~~~~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:66:3: error: 'FHESecKey' was not declared in this scope
66 | FHESecKey secret_key(context);
| ^~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:67:3: error: 'secret_key' was not declared in this scope
67 | secret_key.GenSecKey();
| ^~~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:69:3: error: 'addSome1DMatrices' was not declared in this scope; did you mean 'helib::addSome1DMatrices'?
69 | addSome1DMatrices(secret_key);
| ^~~~~~~~~~~~~~~~~
| helib::addSome1DMatrices
In file included from /opt/HElib/helib_pack/include/helib/helib.h:23,
from HElib/benchmarks/bench_thinboot.cpp:16:
/opt/HElib/helib_pack/include/helib/keySwitching.h:154:6: note: 'helib::addSome1DMatrices' declared here
154 | void addSome1DMatrices(SecKey& sKey, long bound=FHE_KEYSWITCH_THRESH, long keyID=0);
| ^~~~~~~~~~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:70:3: error: 'addFrbMatrices' was not declared in this scope; did you mean 'helib::addFrbMatrices'?
70 | addFrbMatrices(secret_key);
| ^~~~~~~~~~~~~~
| helib::addFrbMatrices
In file included from /opt/HElib/helib_pack/include/helib/helib.h:23,
from HElib/benchmarks/bench_thinboot.cpp:16:
/opt/HElib/helib_pack/include/helib/keySwitching.h:166:6: note: 'helib::addFrbMatrices' declared here
166 | void addFrbMatrices(SecKey& sKey, long keyID=0);
| ^~~~~~~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:77:3: error: 'FHEPubKey' was not declared in this scope
77 | FHEPubKey& public_key = secret_key;
| ^~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:77:14: error: 'public_key' was not declared in this scope
77 | FHEPubKey& public_key = secret_key;
| ^~~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:78:9: error: 'EncryptedArray' does not name a type
78 | const EncryptedArray& ea = *(context.ea);
| ^~~~~~~~~~~~~~
HElib/benchmarks/bench_thinboot.cpp:80:17: error: 'ea' was not declared in this scope
80 | long nslots = ea.size();
| ^~
HElib/benchmarks/bench_thinboot.cpp:88:3: error: 'Ctxt' was not declared in this scope; did you mean 'helib::Ctxt'?
88 | Ctxt ctxt(public_key);
| ^~~~
| helib::Ctxt
In file included from /opt/HElib/helib_pack/include/helib/helib.h:22,
from HElib/benchmarks/bench_thinboot.cpp:16:
/opt/HElib/helib_pack/include/helib/Ctxt.h:260:7: note: 'helib::Ctxt' declared here
260 | class Ctxt {
| ^~~~
HElib/benchmarks/bench_thinboot.cpp:89:14: error: 'ctxt' was not declared in this scope; did you mean 'ptxt'?
89 | ea.encrypt(ctxt, public_key, ptxt);
| ^~~~
| ptxt
HElib/benchmarks/bench_thinboot.cpp:91:5: error: 'squareWithThinBoot' was not declared in this scope
91 | squareWithThinBoot(public_key, ctxt);
| ^~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/helib_benchmark.dir/build.make:83: CMakeFiles/helib_benchmark.dir/bench_thinboot.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/helib_benchmark.dir/all] Error 2
make: *** [Makefile:104: all] Error 2
Follow-up: The same applies for Ubuntu 18.4 LTS and gcc 7.5.0. I also tried git checkout v1.0.0
and git checkout v1.0.1
. Same (or at least similar, I didn't check exactly) result.
Probably I'm just mistaking the purpose of the benchmark directory? In my understanding, bench_{thin,fat}boot
are two readily delivered performance benchmark programs?
Even though the cmake file explicitly forces C++11, std::enable_if_t
is used which was introduced in C++14. However, when enabling C++14 only this error disappears. Additionally, the new version does not fix the problem.
Hi! I get other error if I update used classes. My error is :
sh-4.4$ ./helib_benchmark 2020-09-04T08:37:05+00:00 Running ./helib_benchmark Run on (6 X 2095.08 MHz CPU s) CPU Caches: L1 Data 32 KiB (x6) L1 Instruction 32 KiB (x6) L2 Unified 4096 KiB (x6) L3 Unified 16384 KiB (x6) Load Average: 0.12, 0.07, 0.06 WARNING Library was built as DEBUG. Timings may be affected. 1m=1271, p=2, r=1, bits=580, c=2, skHwt=64, c_m=100, mvec=[31 41] Initialising context object... Building modulus chain... inv: non-invertible matrix Aborted (core dumped)
How I can fix it ? Any ideas to fix the error? Thank you very much for the help!