Closed eleven-pixel closed 1 year ago
This looks very much like an out-of-date compiler. What's your system? Either way, there are two possible outcomes. We either try to make it work on older systems, or simply declare that it's supported on Ubuntu >=22 (or maybe >=20) or equivalent. Provided that it's a rather specialized application, it doesn't make much sense to invest an effort in the former... It might be sensible to enforce a minimum C++ standard compliance level, but it would still be "if there still is a problem, point to the reference platform in the README.md."
It might be sensible to enforce a minimum C++ standard compliance level
For reference, as following:
index 171b518..da083db 100755
--- a/build.sh
+++ b/build.sh
@@ -16,10 +16,12 @@ NVCC=${NVCC:-nvcc}
CUDA=$(dirname $(dirname $(which $NVCC)))
SPDK="deps/spdk-v22.09"
CUDA_ARCH="-arch=sm_80 -gencode arch=compute_70,code=sm_70"
+CXXSTD=`$CXX -dM -E -x c++ /dev/null | \
+ awk '{ if($2=="__cplusplus" && $3<"2011") print "-std=c++11"; }'`
INCLUDE="-I$SPDK/include -I$SPDK/isa-l/.. -I$SPDK/dpdk/build/include"
CFLAGS="$SECTOR_SIZE -O2 -g $INCLUDE -D__ADX__"
-CPPFLAGS="$CFLAGS \
+CPPFLAGS="$CFLAGS $CXXSTD \
-fno-omit-frame-pointer -Wall -Wextra -Wno-unused-parameter \
-Wno-missing-field-initializers -fno-strict-aliasing \
-march=native -Wformat -Wformat-security \
It's likely to be fixed by #6. Or at least there is hardly anything else we can offer.
/filecoin/supra_seal$ ./build.sh
~~src/pc1/pc1.cpp:148:40: error: ‘coordinator’ was not declared in this scope system.coordinators[coord_id] = &coordinator; ^~~src/pc1/pc1.cpp:148:40: note: suggested alternative: ‘coordinator_t’ system.coordinators[coord_id] = &coordinator; ^~~coordinator_t In file included from src/pc1/pc1.cpp:50:0: src/pc1/system_buffers_t.hpp: In instantiation of ‘int system_buffers_t~~~~~~ In file included from src/pc1/../sealing/../util/thread_pool_t.hpp:13:0, from src/pc1/../sealing/topology_t.hpp:10, from src/pc1/pc1.hpp:6, from src/pc1/pc1.cpp:31: /usr/include/c++/7/atomic:194:7: note: ‘std::atomic<_Tp>::atomic() noexcept [with _Tp = node_id_t]’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘’ atomic() noexcept = default; ^~In file included from src/pc1/pc1.cpp:50:0: src/pc1/system_buffers_t.hpp: In instantiation of ‘int system_buffers_t~~~~~~ src/pc1/system_buffers_t.hpp: In instantiation of ‘int system_buffers_t~/usr/include/c++/7/atomic:741:17: note: after user-defined conversion: constexpr std::atomic~In file included from src/pc1/../nvme/nvme.hpp:20:0, from src/pc1/pc1.cpp:36: src/pc1/../nvme/ring_t.hpp: In instantiation of ‘ring_buffer_valid_t ring_buffer_t<T, _VALID_THRESHOLD, SIZE>::get_valid(size_t) [with T = batch_t<page_t<sealing_config_t<64> >, 1>; unsigned int _VALID_THRESHOLD = 1; int SIZE = 1048576; ring_buffer_valid_t = std::atomic~/usr/include/c++/7/atomic:741:17: note: after user-defined conversion: constexpr std::atomic~In file included from src/pc1/../nvme/nvme.hpp:20:0, from src/pc1/pc1.cpp:36: src/pc1/../nvme/ring_t.hpp: In instantiation of ‘ring_buffer_valid_t ring_buffer_t<T, _VALID_THRESHOLD, SIZE>::get_valid(size_t) [with T = batch_t<page_t<sealing_config_t<32> >, 1>; unsigned int _VALID_THRESHOLD = 1; int SIZE = 1048576; ring_buffer_valid_t = std::atomic~/usr/include/c++/7/atomic:741:17: note: after user-defined conversion: constexpr std::atomic~In file included from src/pc1/../nvme/nvme.hpp:20:0, from src/pc1/pc1.cpp:36: src/pc1/../nvme/ring_t.hpp: In instantiation of ‘ring_buffer_valid_t ring_buffer_t<T, _VALID_THRESHOLD, SIZE>::get_valid(size_t) [with T = batch_t<page_t<sealing_config_t<16> >, 1>; unsigned int _VALID_THRESHOLD = 1; int SIZE = 1048576; ring_buffer_valid_t = std::atomic~/usr/include/c++/7/atomic:741:17: note: after user-defined conversion: constexpr std::atomic~In file included from src/pc1/../nvme/nvme.hpp:20:0, from src/pc1/pc1.cpp:36: src/pc1/../nvme/ring_t.hpp: In instantiation of ‘ring_buffer_valid_t ring_buffer_t<T, _VALID_THRESHOLD, SIZE>::get_valid(size_t) [with T = batch_t<page_t<sealing_config_t<8> >, 1>; unsigned int _VALID_THRESHOLD = 1; int SIZE = 1048576; ring_buffer_valid_t = std::atomic~/usr/include/c++/7/atomic:741:17: note: after user-defined conversion: constexpr std::atomic~In file included from src/pc1/../nvme/nvme.hpp:20:0, from src/pc1/pc1.cpp:36: src/pc1/../nvme/ring_t.hpp: In instantiation of ‘ring_buffer_valid_t ring_buffer_t<T, _VALID_THRESHOLD, SIZE>::get_valid(size_t) [with T = batch_t<page_t<sealing_config_t<4> >, 1>; unsigned int _VALID_THRESHOLD = 1; int SIZE = 1048576; ring_buffer_valid_t = std::atomic~/usr/include/c++/7/atomic:741:17: note: after user-defined conversion: constexpr std::atomic~In file included from src/pc1/../nvme/nvme.hpp:20:0, from src/pc1/pc1.cpp:36: src/pc1/../nvme/ring_t.hpp: In instantiation of ‘ring_buffer_valid_t ring_buffer_t<T, _VALID_THRESHOLD, SIZE>::get_valid(size_t) [with T = batch_t<page_t<sealing_config_t<2> >, 1>; unsigned int _VALID_THRESHOLD = 1; int SIZE = 1048576; ring_buffer_valid_t = std::atomic~/usr/include/c++/7/atomic:741:17: note: after user-defined conversion: constexpr std::atomic~