apple / turicreate

Turi Create simplifies the development of custom machine learning models.
BSD 3-Clause "New" or "Revised" License
11.2k stars 1.14k forks source link

Running C++ units failed #3444

Open KHHD opened 2 years ago

KHHD commented 2 years ago

I am experiencing problem while building turicreate from source on Ubuntu 20.04.

while running make to build C++ unit tests, it failed with the following error. the same error as https://github.com/apple/turicreate/issues/3243#issuecomment-725956527


[ 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/oem/Desktop/turicreate/src/core/util/Span.hpp:12, from /home/oem/Desktop/turicreate/test/util/SpanTests.cxx:9: /usr/include/c++/9/bits/stl_vector.h: In instantiation of ‘class std::vector<const int, std::allocator >’: /home/oem/Desktop/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