-
Notifications
You must be signed in to change notification settings - Fork 27
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
Ubuntu 16.04 make error #11
Comments
What version |
:) |
~$ g++ --version
g++ (GCC) 7.2.1 20171128
Copyright (C) 2017 Free Software Foundation, Inc.
Probably a syntax error as C++17 has A PR is welcome to add a |
Resolved in master, see #12, and dcousens/ranger@aa3b771 |
|
Update from g++ 7.2.0 to g++ 7.3.0 Now the Errors are:
|
i got the error, too . gcc 7.3 |
@efvhi you are building from master? |
Can reproduce... will fix |
Great cant wait for it :) |
On ubuntu 16.04 with g++ 5.4.0, try this diff --git a/Makefile b/Makefile
index ebe06fe..3e5f32a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CXX=g++
-CFLAGS=-pedantic -std=c++1z -W -Wall -Wcast-qual -Wconversion -Werror -Wextra -Wwrite-strings
+CFLAGS=-pedantic -std=c++1z -W -Wall -Wcast-qual -Wconversion -Wextra -Wwrite-strings
#OFLAGS=-O3 -ggdb3
OFLAGS=-O3
LFLAGS=-lcrypto
diff --git a/include/ranger.hpp b/include/ranger.hpp
index fceceb8..f71df28 100644
--- a/include/ranger.hpp
+++ b/include/ranger.hpp
@@ -149,7 +149,8 @@ auto ptr_range (R& r) {
return __ranger::Range<pointer>(r.data(), r.data() + r.size());
}
-inline auto zstr_range (const char* z) {
+inline auto zstr_range (const char* z_) {
+ auto z = reinterpret_cast<const unsigned char*>(z_);
using pointer = decltype(z);
auto r = z;
diff --git a/src/parser.cpp b/src/parser.cpp
index 48af06b..dbe4c7c 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -15,6 +15,11 @@
#include "statistics.hpp"
// #include "leveldb.hpp"
+#ifndef __cpp_if_constexpr
+template <typename Block>
+constexpr decltype(dumpUnspents<Block>::BLANK_TXIN) dumpUnspents<Block>::BLANK_TXIN;
+#endif
+
using backing_vector_t = std::vector<uint8_t>;
using block_t = decltype(Block(ptr_range(backing_vector_t()), ptr_range(backing_vector_t())));
using thread_function_t = std::function<void(void)>; |
Duplicate of #15 - which is fixed |
The text was updated successfully, but these errors were encountered: