galeone/openat

install problem

tionebDotsamapha opened this issue · 1 comments

hi !

i would try your OpenAt but after cmd : CC=clang CXX=clang++ make

[ 10%] Built target gumbo_parser
[ 10%] Built target openat_do_always
[ 28%] Built target curlpp
[ 46%] Built target curlpp_static
[ 57%] Built target gumbo_query_shared
[ 68%] Built target gumbo_query_static
[ 71%] Built target test_id
[ 72%] Building CXX object src/CMakeFiles/openat.dir/at/shapeshift.cc.o
/home/pi/OpenAt/openat/src/at/shapeshift.cc: In member function ‘virtual at::min_max_t at::Shapeshift::depositLimit(at::currency_pair_t)’:
/home/pi/OpenAt/openat/src/at/shapeshift.cc:41:21: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
return min_max_t{
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:42:59: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
.min = std::stod(res.at("min").getstd::string()),
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc: In member function ‘virtual std::vectorat::exchange_info_t at::Shapeshift::info()’:
/home/pi/OpenAt/openat/src/at/shapeshift.cc:59:46: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
markets.push_back(exchange_info_t{
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:60:29: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
.pair = pair,
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:62:30: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
min_max_t{.min = market.at("min").get(),
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:62:68: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
min_max_t{.min = market.at("min").get(),
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:63:77: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
.max = market.at("limit").get()},
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:65:58: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
market.at("rate").getstd::string()), // rate is a string
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc: In member function ‘virtual at::exchange_info_t at::Shapeshift::info(at::currency_pair_t)’:
/home/pi/OpenAt/openat/src/at/shapeshift.cc:86:27: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
return exchange_info_t{
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:87:21: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
.pair = pair,
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:89:22: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
min_max_t{
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:91:42: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
.get(), // minumum instead of min
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:92:57: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
.max = market.at("limit").get()},
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc:93:48: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic]
.rate = market.at("rate").get(), // rate is no more a string
^
/home/pi/OpenAt/openat/src/at/shapeshift.cc: In member function ‘virtual std::pair<at::deposit_status_t, unsigned int> at::Shapeshift::timeRemeaningForTransaction(at::hash_t)’:
/home/pi/OpenAt/openat/src/at/shapeshift.cc:120:21: error: missing template arguments before ‘(’ token
return std::pair(res["status"].get<deposit_status_t>(),
^
src/CMakeFiles/openat.dir/build.make:182: recipe for target 'src/CMakeFiles/openat.dir/at/shapeshift.cc.o' failed
make[2]: *** [src/CMakeFiles/openat.dir/at/shapeshift.cc.o] Error 1
CMakeFiles/Makefile2:1401: recipe for target 'src/CMakeFiles/openat.dir/all' failed
make[1]: *** [src/CMakeFiles/openat.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

can you help me please?
Thanks
Ben

Hi, thank you for trying OpenAT! Yes I can help you for sure:

The problem is:

missing template arguments before ‘(’ token
return std::pair(res["status"].get<deposit_status_t>(),

at the line return std::pair I'm omitting the types for the template type pair because C++17 is able to automatically deduct the right type (http://en.cppreference.com/w/cpp/language/class_template_argument_deduction).

The problem is, hence, that your compiler do not support completely C++17.
In my setup, I've tested it with clang 5 and gcc 7 and works well.

Also, the compiler must be specified when running cmake and not make, hence:

mkdir build
cd build
CC=clang CXX=clang++ cmake  ..
make

If clang is newer enough, it will work.