apache / apache/arrow

[C++] Compilation errors with current Intel LLVM compiler

Open
#38,937 1 comment 0 reactions 0 assignees View on GitHub
Component: C++ Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug, including details regarding any error messages, version, and platform.

I am building Arrow 14.0.1 on Linux with the Intel LLVM 2024.0.0 compiler, and the GCC 7.4.0 C++ library on the backend.

I am seeing the following compile errors:
```
[ 1%] Building CXX object src/arrow/CMakeFiles/arrow_objlib.dir/integration/json_internal.cc.o
/home/src/arrow/14.0.1/cpp/src/arrow/integration/json_internal.cc:1308:44: error: no matching function for call to 'quoted'
1308 | return Status::Invalid("Value ", std::quoted(val),
| ^~~~~~~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/iomanip:461:5: note: candidate template ignored: could not match 'const _CharT *' against 'std::string_view' (aka 'basic_string_view')
461 | quoted(const _CharT* __string,
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/iomanip:470:5: note: candidate template ignored: could not match 'basic_string' against 'basic_string_view'
470 | quoted(const basic_string<_CharT, _Traits, _Alloc>& __string,
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/iomanip:480:5: note: candidate template ignored: could not match 'basic_string' against 'basic_string_view'
480 | quoted(basic_string<_CharT, _Traits, _Alloc>& __string,
| ^
1 error generated.
```

```
[ 91%] Building CXX object src/arrow/util/CMakeFiles/arrow-utility-test.dir/span_test.cc.o
/home/src/arrow/14.0.1/cpp/src/arrow/util/span_test.cc:36:23: error: no viable constructor or deduction guide for deduction of template arguments of 'vector'
36 | os << PrintToString(std::vector(span.begin(), span.end()));
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/util/string_builder.h:49:10: note: in instantiation of function template specialization 'arrow::util::operator<<' requested here
49 | stream << head;
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/util/string_builder.h:54:3: note: in instantiation of function template specialization 'arrow::util::StringBuilderRecursive &>' requested here
54 | StringBuilderRecursive(stream, std::forward(head));
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/util/string_builder.h:55:3: note: in instantiation of function template specialization 'arrow::util::StringBuilderRecursive &, const char (&)[7], arrow::util::span &>' requested here
55 | StringBuilderRecursive(stream, std::forward(tail)...);
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/util/string_builder.h:61:3: note: in instantiation of function template specialization 'arrow::util::StringBuilderRecursive &, const char (&)[7], arrow::util::span &>' requested here
61 | StringBuilderRecursive(ss.stream(), std::forward(args)...);
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/util/span_test.cc:101:5: note: in instantiation of function template specialization 'arrow::util::StringBuilder &, const char (&)[7], arrow::util::span &>' requested here
101 | ARROW_SCOPED_TRACE("l = ", l, ", r = ", r);
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/testing/gtest_util.h:142:61: note: expanded from macro 'ARROW_SCOPED_TRACE'
142 | #define ARROW_SCOPED_TRACE(...) SCOPED_TRACE(::arrow::util::StringBuilder(__VA_ARGS__))
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:295:7: note: candidate function template not viable: no known conversion from 'int *' to 'size_type' (aka 'unsigned long') for 1st argument; dereference the argument with *
295 | vector(size_type __n, const value_type& __value,
| ^ ~~~~~~~~~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:283:7: note: candidate template ignored: couldn't infer template argument '_Tp'
283 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:411:2: note: candidate template ignored: couldn't infer template argument '_Tp'
411 | vector(_InputIterator __first, _InputIterator __last,
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:348:7: note: candidate template ignored: could not match 'vector<_Tp, _Alloc>' against 'int *'
348 | vector(const vector& __x, const allocator_type& __a)
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:358:7: note: candidate template ignored: could not match 'vector<_Tp, _Alloc>' against 'int *'
358 | vector(vector&& __rv, const allocator_type& __m)
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:383:7: note: candidate template ignored: could not match 'initializer_list' (aka 'initializer_list<_Tp>') against 'int *'
383 | vector(initializer_list __l,
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:270:7: note: candidate function template not viable: requires single argument '__a', but 2 arguments were provided
270 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:326:7: note: candidate function template not viable: requires single argument '__x', but 2 arguments were provided
326 | vector(const vector& __x)
| ^ ~~~~~~~~~~~~~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:344:7: note: candidate function template not viable: requires single argument '__x', but 2 arguments were provided
344 | vector(vector&& __x) noexcept
| ^ ~~~~~~~~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:216:11: note: candidate function template not viable: requires 1 argument, but 2 were provided
216 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:259:7: note: candidate function template not viable: requires 0 arguments, but 2 were provided
259 | vector()
| ^

/home/src/arrow/14.0.1/cpp/src/arrow/util/span_test.cc:36:23: error: no viable constructor or deduction guide for deduction of template arguments of 'vector'
36 | os << PrintToString(std::vector(span.begin(), span.end()));
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/util/string_builder.h:49:10: note: in instantiation of function template specialization 'arrow::util::operator<<>' requested here
49 | stream << head;
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/util/string_builder.h:54:3: note: in instantiation of function template specialization 'arrow::util::StringBuilderRecursive> &>' requested here
54 | StringBuilderRecursive(stream, std::forward(head));
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/util/string_builder.h:55:3: note: in instantiation of function template specialization 'arrow::util::StringBuilderRecursive> &, const char (&)[7], arrow::util::span> &>' requested here
55 | StringBuilderRecursive(stream, std::forward(tail)...);
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/util/string_builder.h:61:3: note: in instantiation of function template specialization 'arrow::util::StringBuilderRecursive> &, const char (&)[7], arrow::util::span> &>' requested here
61 | StringBuilderRecursive(ss.stream(), std::forward(args)...);
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/util/span_test.cc:101:5: note: in instantiation of function template specialization 'arrow::util::StringBuilder> &, const char (&)[7], arrow::util::span> &>' requested here
101 | ARROW_SCOPED_TRACE("l = ", l, ", r = ", r);
| ^
/home/src/arrow/14.0.1/cpp/src/arrow/testing/gtest_util.h:142:61: note: expanded from macro 'ARROW_SCOPED_TRACE'
142 | #define ARROW_SCOPED_TRACE(...) SCOPED_TRACE(::arrow::util::StringBuilder(__VA_ARGS__))
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:295:7: note: candidate function template not viable: no known conversion from 'std::basic_string *' to 'size_type' (aka 'unsigned long') for 1st argument
295 | vector(size_type __n, const value_type& __value,
| ^ ~~~~~~~~~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:283:7: note: candidate template ignored: couldn't infer template argument '_Tp'
283 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:411:2: note: candidate template ignored: couldn't infer template argument '_Tp'
411 | vector(_InputIterator __first, _InputIterator __last,
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:348:7: note: candidate template ignored: could not match 'vector<_Tp, _Alloc>' against 'std::basic_string *'
348 | vector(const vector& __x, const allocator_type& __a)
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:358:7: note: candidate template ignored: could not match 'vector<_Tp, _Alloc>' against 'std::basic_string *'
358 | vector(vector&& __rv, const allocator_type& __m)
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:383:7: note: candidate template ignored: could not match 'initializer_list' (aka 'initializer_list<_Tp>') against 'std::basic_string *'
383 | vector(initializer_list __l,
| ^
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:270:7: note: candidate function template not viable: requires single argument '__a', but 2 arguments were provided
270 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:326:7: note: candidate function template not viable: requires single argument '__x', but 2 arguments were provided
326 | vector(const vector& __x)
| ^ ~~~~~~~~~~~~~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:344:7: note: candidate function template not viable: requires single argument '__x', but 2 arguments were provided
344 | vector(vector&& __x) noexcept
| ^ ~~~~~~~~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:216:11: note: candidate function template not viable: requires 1 argument, but 2 were provided
216 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/home/built/gcc/7.4.0/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:259:7: note: candidate function template not viable: requires 0 arguments, but 2 were provided
259 | vector()
| ^
2 errors generated.
```

### Component(s)

C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.