Skip to content
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

Unit tests fail to build on AlpineLinux #9155

Open
bl4ckb0ne opened this issue Sep 22, 2021 · 3 comments
Open

Unit tests fail to build on AlpineLinux #9155

bl4ckb0ne opened this issue Sep 22, 2021 · 3 comments
Labels
build build issues; typically submitted using template

Comments

@bl4ckb0ne
Copy link

Describe the bug

Unit tests fail to build on AlpineLinux (musl libc) and gcc 10.3.1

$ gcc --version
gcc (Alpine 10.3.1_git20210921) 10.3.1 20210921
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Here's the build log

ninja: job failed: /usr/bin/c++ -DCPUINFO_SUPPORTED_PLATFORM=1 -DEIGEN_MPL2_ONLY -DEIGEN_USE_THREADS -DENABLE_CPU_FP16_TRAINING_OPS -DENABLE_ORT_FORMAT_LOAD -DJSON_USE_IMPLICIT_CONVERSIONS=1 -DNSYNC_ATOMIC_CPP11 -DONNX_ML=1 -DONNX_NAMESPACE=onnx -DONNX_USE_LITE_PROTO=1 -DORT_ENABLE_ORT_FORMAT_RUNTIME_GRAPH_OPTIMIZATION -DPLATFORM_POSIX -DSKIP_DEFAULT_LOGGER_TESTS -D__ONNX_NO_DOC_STRINGS -I/tmp/onnxruntime/include/onnxruntime -I/tmp/onnxruntime/include/onnxruntime/core/session -I/tmp/onnxruntime/cmake/external/nsync/public -I/tmp/onnxruntime/build -I/tmp/onnxruntime/onnxruntime -I/tmp/onnxruntime/cmake/external/date/include -I/tmp/onnxruntime/cmake/external/flatbuffers/include -I/tmp/onnxruntime/onnxruntime/test/util/include -I/tmp/onnxruntime/cmake/external/eigen -I/tmp/onnxruntime/cmake/external/optional-lite/include -I/tmp/onnxruntime/cmake/external/SafeInt -I/tmp/onnxruntime/cmake/external/mp11/include -I/tmp/onnxruntime/cmake/external/pytorch_cpuinfo/include -I/tmp/onnxruntime/cmake/external/json/single_include -I/tmp/onnxruntime/cmake/external/onnx -I/tmp/onnxruntime/build/external/onnx -I/tmp/onnxruntime/cmake/external/protobuf/src -I/tmp/onnxruntime/cmake/external/re2 -I/tmp/onnxruntime/cmake/external/pytorch_cpuinfo/deps/clog/include -isystem /tmp/onnxruntime/cmake/external/googletest/googletest/include -isystem /tmp/onnxruntime/cmake/external/googletest/googletest -isystem /tmp/onnxruntime/cmake/external/googletest/googlemock/include -isystem /tmp/onnxruntime/cmake/external/googletest/googlemock -ffunction-sections -fdata-sections -DCPUINFO_SUPPORTED -O3 -DNDEBUG -DGSL_UNENFORCED_ON_CONTRACT_VIOLATION -fPIE -Wall -Wextra -Wno-deprecated-copy -Wno-nonnull-compare -Wno-error=sign-compare -Wno-error=uninitialized -Wno-parentheses -Wno-error=comment -std=gnu++17 -MD -MT CMakeFiles/onnxruntime_test_all.dir/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc.o -MF CMakeFiles/onnxruntime_test_all.dir/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc.o.d -o CMakeFiles/onnxruntime_test_all.dir/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc.o -c /tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_SinFloat_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2083:57: error: no matching function for call to 'TrigFloatTest<sinf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2083 |   TrigFloatTest<::sinf>(test, {1.1f, -1.1f, 2.2f, -2.2f});
      |                                                         ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2083:57: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2083 |   TrigFloatTest<::sinf>(test, {1.1f, -1.1f, 2.2f, -2.2f});
      |                                                         ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_SinDouble_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2088:53: error: no matching function for call to 'TrigDoubleTest<sin>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2088 |   TrigDoubleTest<::sin>(test, {1.1, -1.1, 2.2, -2.2});
      |                                                     ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2053:6: note: candidate: 'template<double (& op)(double) noexcept> void onnxruntime::test::TrigDoubleTest(onnxruntime::test::OpTester&, std::initializer_list<double>, std::unordered_set<std::__cxx11::basic_string<char> >)'
 2053 | void TrigDoubleTest(OpTester& test, std::initializer_list<double> input,
      |      ^~~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2053:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2088:53: error: could not convert 'sin' from '<unresolved overloaded function type>' to 'double (&)(double) noexcept'
 2088 |   TrigDoubleTest<::sin>(test, {1.1, -1.1, 2.2, -2.2});
      |                                                     ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_SinFloat16_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2094:61: error: no matching function for call to 'TrigFloat16Test<sinf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2094 |     TrigFloat16Test<::sinf>(test, {1.1f, -1.1f, 2.2f, -2.2f});
      |                                                             ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2067:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloat16Test(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2067 | void TrigFloat16Test(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2067:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2094:61: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2094 |     TrigFloat16Test<::sinf>(test, {1.1f, -1.1f, 2.2f, -2.2f});
      |                                                             ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_CosFloat_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2100:57: error: no matching function for call to 'TrigFloatTest<cosf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2100 |   TrigFloatTest<::cosf>(test, {1.1f, -1.1f, 2.2f, -2.2f});
      |                                                         ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2100:57: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2100 |   TrigFloatTest<::cosf>(test, {1.1f, -1.1f, 2.2f, -2.2f});
      |                                                         ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_CosDouble_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2106:85: error: no matching function for call to 'TrigDoubleTest<cos>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>, <brace-enclosed initializer list>)'
 2106 |     TrigDoubleTest<::cos>(test, {1.1, -1.1, 2.2, -2.2}, {kTensorrtExecutionProvider});
      |                                                                                     ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2053:6: note: candidate: 'template<double (& op)(double) noexcept> void onnxruntime::test::TrigDoubleTest(onnxruntime::test::OpTester&, std::initializer_list<double>, std::unordered_set<std::__cxx11::basic_string<char> >)'
 2053 | void TrigDoubleTest(OpTester& test, std::initializer_list<double> input,
      |      ^~~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2053:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2106:85: error: could not convert 'cos' from '<unresolved overloaded function type>' to 'double (&)(double) noexcept'
 2106 |     TrigDoubleTest<::cos>(test, {1.1, -1.1, 2.2, -2.2}, {kTensorrtExecutionProvider});
      |                                                                                     ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_CosFloat16_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2115:61: error: no matching function for call to 'TrigFloat16Test<cosf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2115 |     TrigFloat16Test<::cosf>(test, {1.1f, -1.1f, 2.2f, -2.2f});
      |                                                             ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2067:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloat16Test(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2067 | void TrigFloat16Test(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2067:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2115:61: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2115 |     TrigFloat16Test<::cosf>(test, {1.1f, -1.1f, 2.2f, -2.2f});
      |                                                             ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_Tan_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2120:69: error: no matching function for call to 'TrigFloatTest<tanf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2120 |   TrigFloatTest<::tanf>(test, {-100.0f, -50.0f, 0.0f, 50.0f, 100.0f});
      |                                                                     ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2120:69: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2120 |   TrigFloatTest<::tanf>(test, {-100.0f, -50.0f, 0.0f, 50.0f, 100.0f});
      |                                                                     ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_Asin_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2125:64: error: no matching function for call to 'TrigFloatTest<asinf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2125 |   TrigFloatTest<::asinf>(test, {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
      |                                                                ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2125:64: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2125 |   TrigFloatTest<::asinf>(test, {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
      |                                                                ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_Acos_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2130:64: error: no matching function for call to 'TrigFloatTest<acosf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2130 |   TrigFloatTest<::acosf>(test, {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
      |                                                                ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2130:64: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2130 |   TrigFloatTest<::acosf>(test, {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
      |                                                                ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_Atan_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2135:66: error: no matching function for call to 'TrigFloatTest<atanf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2135 |   TrigFloatTest<::atanf>(test, {-10.0f, -5.0f, 0.0f, 5.0f, 10.0f});
      |                                                                  ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2135:66: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2135 |   TrigFloatTest<::atanf>(test, {-10.0f, -5.0f, 0.0f, 5.0f, 10.0f});
      |                                                                  ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_Sinh_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2140:64: error: no matching function for call to 'TrigFloatTest<sinhf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2140 |   TrigFloatTest<::sinhf>(test, {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
      |                                                                ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2140:64: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2140 |   TrigFloatTest<::sinhf>(test, {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
      |                                                                ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_Cosh_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2145:64: error: no matching function for call to 'TrigFloatTest<coshf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2145 |   TrigFloatTest<::coshf>(test, {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
      |                                                                ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2145:64: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2145 |   TrigFloatTest<::coshf>(test, {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
      |                                                                ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_Asinh_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2150:65: error: no matching function for call to 'TrigFloatTest<asinhf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2150 |   TrigFloatTest<::asinhf>(test, {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
      |                                                                 ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2150:65: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2150 |   TrigFloatTest<::asinhf>(test, {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
      |                                                                 ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_Acosh_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2155:66: error: no matching function for call to 'TrigFloatTest<acoshf>(onnxruntime::test::OpTester&, <brace-enclosed initializer list>)'
 2155 |   TrigFloatTest<::acoshf>(test, {1.0f, 1.1f, 3.0f, 10.0f, 100.0f});
      |                                                                  ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2155:66: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2155 |   TrigFloatTest<::acoshf>(test, {1.0f, 1.1f, 3.0f, 10.0f, 100.0f});
      |                                                                  ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc: In member function 'virtual void onnxruntime::test::MathOpTest_Atanh_Test::TestBody()':
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2160:95: error: no matching function for call to 'TrigFloatTest<atanhf>(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2160 |   TrigFloatTest<::atanhf>(test, std::initializer_list<float>({-1.0f, -0.5f, 0.0f, 0.5f, 1.0f}));
      |                                                                                               ^
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note: candidate: 'template<float (& op)(float) noexcept> void onnxruntime::test::TrigFloatTest(onnxruntime::test::OpTester&, std::initializer_list<float>)'
 2040 | void TrigFloatTest(OpTester& test, std::initializer_list<float> input) {
      |      ^~~~~~~~~~~~~
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2040:6: note:   template argument deduction/substitution failed:
/tmp/onnxruntime/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:2160:95: error: binding reference of type 'float (&)(float) noexcept' to 'float(float)' discards qualifiers
 2160 |   TrigFloatTest<::atanhf>(test, std::initializer_list<float>({-1.0f, -0.5f, 0.0f, 0.5f, 1.0f}));
      |                                                                                               ^
ninja: subcommand failed

Urgency

The build succeeds with -Donnxruntime_BUILD_UNIT_TESTS=OFF, but unit tests would be nice to improve the package.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): AlpineLinux edge
  • ONNX Runtime installed from (source or binary): source
  • ONNX Runtime version: master
  • Python version: 3.9.7
  • GCC/Compiler version (if compiling from source): gcc (Alpine 10.3.1_git20210921) 10.3.1 20210921

To Reproduce

$ ./build.sh --config Release --build_shared_lib --parallel

or

$ cmake -S cmake \
		-B build \
		-G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr/ \
		-DCMAKE_PREFIX_PATH=/usr/ \
		-DCMAKE_BUILD_TYPE=Release \
		-Donnxruntime_BUILD_SHARED_LIB=ON \
		-DONNX_USE_PROTOBUF_SHARED_LIBS=ON \
		.
$ cmake --build build

Expected behavior

Unit tests to build and to execute

Additional context

Maybe it's coming from the standard, -std=c++17 instead of -std=gnu++17

@yufenglee yufenglee added the build build issues; typically submitted using template label Sep 22, 2021
@stale
Copy link

stale bot commented Apr 19, 2022

This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@stale stale bot added the stale issues that have not been addressed in a while; categorized by a bot label Apr 19, 2022
@decahedron1
Copy link
Contributor

I can't get ONNX Runtime built on Alpine at all because of this. If I enable tests I run into this issue, but if I disable them I run into #7571...

@stale stale bot removed the stale issues that have not been addressed in a while; categorized by a bot label Apr 29, 2022
@bl4ckb0ne
Copy link
Author

I have given up on building the tests on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template
Projects
None yet
Development

No branches or pull requests

3 participants