Open shreyajain17 opened 4 years ago
I am experiencing a similar problem while building the debug version on Ubuntu 20.04. My gcc version is 9.3.0. Here is the log
[ 62%] Building CXX object src/model_server/CMakeFiles/unity.dir/server/registration.cpp.o
In file included from /home/pradeep/repos/turicreate/src/core/storage/serialization/serialize.hpp:8,
from /home/pradeep/repos/turicreate/src/core/storage/serialization/serialization_includes.hpp:6,
from /home/pradeep/repos/turicreate/src/core/parallel/atomic.hpp:12,
from /home/pradeep/repos/turicreate/src/core/data/flexible_type/flexible_type.hpp:15,
from /home/pradeep/repos/turicreate/src/model_server/lib/toolkit_class_specification.hpp:10,
from /home/pradeep/repos/turicreate/src/model_server/lib/toolkit_class_registry.hpp:8,
from /home/pradeep/repos/turicreate/src/model_server/server/registration.hpp:9,
from /home/pradeep/repos/turicreate/src/model_server/server/registration.cpp:6:
/home/pradeep/repos/turicreate/src/core/storage/serialization/iarchive.hpp: In instantiation of ‘void turi::iarchive::read_into(T&) [with T = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<128, 128, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >]’:
/home/pradeep/repos/turicreate/src/core/storage/serialization/iarchive.hpp:242:9: required from ‘static void turi::archive_detail::deserialize_impl<InArcType, T, true>::exec(InArcType&, T&) [with InArcType = turi::iarchive; T = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<128, 128, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >]’
/home/pradeep/repos/turicreate/src/core/storage/serialization/iarchive.hpp:257:65: required from ‘turi::iarchive& turi::operator>>(turi::iarchive&, T&) [with T = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<128, 128, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >]’
/home/pradeep/repos/turicreate/src/core/util/hash_value.hpp:65:39: required from here
/home/pradeep/repos/turicreate/src/core/storage/serialization/iarchive.hpp:120:15: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<128, 128, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
120 | memcpy(&c, buf + off, sizeof(T));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pradeep/repos/turicreate/src/external/boost/boost_1_68_0/boost/multiprecision/cpp_int.hpp:12,
from /home/pradeep/repos/turicreate/src/core/util/int128_types.hpp:44,
from /home/pradeep/repos/turicreate/src/core/data/flexible_type/flexible_type.hpp:16,
from /home/pradeep/repos/turicreate/src/model_server/lib/toolkit_class_specification.hpp:10,
from /home/pradeep/repos/turicreate/src/model_server/lib/toolkit_class_registry.hpp:8,
from /home/pradeep/repos/turicreate/src/model_server/server/registration.hpp:9,
from /home/pradeep/repos/turicreate/src/model_server/server/registration.cpp:6:
/home/pradeep/repos/turicreate/src/external/boost/boost_1_68_0/boost/multiprecision/number.hpp:41:7: note: ‘class boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<128, 128, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >’ declared here
41 | class number
| ^~~~~~
cc1plus: error: unrecognized command line option ‘-Wno-unknown-warning-option’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-parentheses-equality’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-constant-logical-operand’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-mismatched-tags’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-deprecated-register’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-unused-command-line-argument’ [-Werror]
cc1plus: all warnings being treated as errors
make[2]: *** [src/model_server/CMakeFiles/unity.dir/build.make:63: src/model_server/CMakeFiles/unity.dir/server/registration.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3952: src/model_server/CMakeFiles/unity.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
I just noticed there is a PR out to fix this here. I will be very happy to have that one resolved. :pray: Also, is there a temporary workaround in the meanwhile (apart from disabling -Werror)?
I just noticed there is a PR to fix this here. I will be very happy to have that one resolved. 🙏 Also, is there a temporary workaround in the meanwhile (apart from disabling -Werror)?
@pradkrish - I think the temporary workaround would be to apply the changes (or at least the first commit) from the pull request you reference.
@hoytak - It's not clear to me what still needs to be done in that pull request. Can you take over the pull request?
Thanks, I rebased the branch on master locally and I was able to build the debug version. Then while running make
to build C++ unit tests, it failed with the following error.
[ 79%] Building CXX object test/util/CMakeFiles/SpanTests.cxxtest.dir/SpanTests.cxx.o
In file included from /usr/include/c++/9/vector:67,
from /home/pradeep/repos/turicreate/src/core/util/Span.hpp:12,
from /home/pradeep/repos/turicreate/test/util/SpanTests.cxx:9:
/usr/include/c++/9/bits/stl_vector.h: In instantiation of ‘class std::vector<const int, std::allocator<const int> >’:
/home/pradeep/repos/turicreate/test/util/SpanTests.cxx:66:41: required from here
/usr/include/c++/9/bits/stl_vector.h:398:66: error: static assertion failed: std::vector must have a non-const, non-volatile value_type
398 | static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value,
| ^~~~~
cc1plus: error: unrecognized command line option ‘-Wno-unknown-warning-option’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-parentheses-equality’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-constant-logical-operand’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-mismatched-tags’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-deprecated-register’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-unused-command-line-argument’ [-Werror]
cc1plus: all warnings being treated as errors
make[2]: *** [test/util/CMakeFiles/SpanTests.cxxtest.dir/build.make:63: test/util/CMakeFiles/SpanTests.cxxtest.dir/SpanTests.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8206: test/util/CMakeFiles/SpanTests.cxxtest.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
Running
make -j8
onturicreate/debug
breaks with following errors -However, you can build
turicreate/debug/src