[
https://issues.apache.org/jira/browse/ARROW-15700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17493835#comment-17493835
]
Jeroen van Straten commented on ARROW-15700:
--------------------------------------------
> Or is there some way we can fall back to bundled if the system version is too
> old?
I don't think that would work right in general. If:
* libprotobuf is installed on the system but is too old,
* libarrow builds with a statically-linked bundled version, and
* a user tries to build a library/application that directly or transitively
links to both the system libprotobuf and libarrow,
I'm pretty sure you'd either get link errors for duplicate symbols, or
undefined behavior due to libprotobuf's shared global state in conjunction with
different class definitions from the different versions. So, if libprotobuf is
found but too old, the build system should fail, unless the user explicitly
specifies they want to use a bundled version. From your description that seems
to be what it's doing already, except that the Substrait consumer code code
fails to build with the minimum acceptable version.
Before we just increase that minimum version I'm going to try rewriting the
code to make it work with it. After all... Ubuntu 18.04 LTS only end-of-lifes
in 2028. There should probably be a CI/nightly to cover the minimum version
case as well.
> [C++] Compilation error on Ubuntu 18.04
> ---------------------------------------
>
> Key: ARROW-15700
> URL: https://issues.apache.org/jira/browse/ARROW-15700
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, Compute IR, Continuous Integration
> Reporter: Antoine Pitrou
> Assignee: Jeroen van Straten
> Priority: Blocker
> Labels: pull-request-available, substrait
> Fix For: 8.0.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> See Crossbow build logs here:
> https://github.com/ursacomputing/crossbow/runs/5211900067?check_suite_focus=true#step:5:1389
> {code}
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc: In member
> function 'arrow::Status
> arrow::engine::{anonymous}::ScalarToProtoImpl::Visit(const
> arrow::StringScalar&)':
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:469:78: error:
> no matching function for call to
> 'arrow::engine::{anonymous}::ScalarToProtoImpl::FromBuffer(<unresolved
> overloaded function type>, const arrow::StringScalar&)'
> Status Visit(const StringScalar& s) { return FromBuffer(&Lit::set_string,
> s); }
>
> ^
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:447:10: note:
> candidate: template<class ScalarWithBufferValue> arrow::Status
> arrow::engine::{anonymous}::ScalarToProtoImpl::FromBuffer(void
> (substrait::Expression_Literal::*)(std::__cxx11::string&&), const
> ScalarWithBufferValue&)
> Status FromBuffer(void
> (substrait::Expression::Literal::*set)(std::string&&),
> ^~~~~~~~~~
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:447:10: note:
> template argument deduction/substitution failed:
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:469:59: note:
> cannot convert '& substrait::Expression_Literal::set_string' (type
> '<unresolved overloaded function type>') to type 'void
> (substrait::Expression_Literal::*)(std::__cxx11::string&&) {aka void
> (substrait::Expression_Literal::*)(std::__cxx11::basic_string<char>&&)}'
> Status Visit(const StringScalar& s) { return FromBuffer(&Lit::set_string,
> s); }
> ^~~~
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc: In member
> function 'arrow::Status
> arrow::engine::{anonymous}::ScalarToProtoImpl::Visit(const
> arrow::BinaryScalar&)':
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:470:78: error:
> no matching function for call to
> 'arrow::engine::{anonymous}::ScalarToProtoImpl::FromBuffer(<unresolved
> overloaded function type>, const arrow::BinaryScalar&)'
> Status Visit(const BinaryScalar& s) { return FromBuffer(&Lit::set_binary,
> s); }
>
> ^
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:447:10: note:
> candidate: template<class ScalarWithBufferValue> arrow::Status
> arrow::engine::{anonymous}::ScalarToProtoImpl::FromBuffer(void
> (substrait::Expression_Literal::*)(std::__cxx11::string&&), const
> ScalarWithBufferValue&)
> Status FromBuffer(void
> (substrait::Expression::Literal::*set)(std::string&&),
> ^~~~~~~~~~
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:447:10: note:
> template argument deduction/substitution failed:
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:470:59: note:
> cannot convert '& substrait::Expression_Literal::set_binary' (type
> '<unresolved overloaded function type>') to type 'void
> (substrait::Expression_Literal::*)(std::__cxx11::string&&) {aka void
> (substrait::Expression_Literal::*)(std::__cxx11::basic_string<char>&&)}'
> Status Visit(const BinaryScalar& s) { return FromBuffer(&Lit::set_binary,
> s); }
> ^~~~
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc: In member
> function 'arrow::Status
> arrow::engine::{anonymous}::ScalarToProtoImpl::Visit(const
> arrow::FixedSizeBinaryScalar&)':
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:473:48: error:
> no matching function for call to
> 'arrow::engine::{anonymous}::ScalarToProtoImpl::FromBuffer(<unresolved
> overloaded function type>, const arrow::FixedSizeBinaryScalar&)'
> return FromBuffer(&Lit::set_fixed_binary, s);
> ^
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:447:10: note:
> candidate: template<class ScalarWithBufferValue> arrow::Status
> arrow::engine::{anonymous}::ScalarToProtoImpl::FromBuffer(void
> (substrait::Expression_Literal::*)(std::__cxx11::string&&), const
> ScalarWithBufferValue&)
> Status FromBuffer(void
> (substrait::Expression::Literal::*set)(std::string&&),
> ^~~~~~~~~~
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:447:10: note:
> template argument deduction/substitution failed:
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:473:23: note:
> cannot convert '& substrait::Expression_Literal::set_fixed_binary' (type
> '<unresolved overloaded function type>') to type 'void
> (substrait::Expression_Literal::*)(std::__cxx11::string&&) {aka void
> (substrait::Expression_Literal::*)(std::__cxx11::basic_string<char>&&)}'
> return FromBuffer(&Lit::set_fixed_binary, s);
> ^~~~
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc: In member
> function 'arrow::Status
> arrow::engine::{anonymous}::ScalarToProtoImpl::Visit(const
> arrow::ExtensionScalar&)':
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:598:77: error:
> no matching function for call to
> 'arrow::engine::{anonymous}::ScalarToProtoImpl::FromBuffer(<unresolved
> overloaded function type>, const arrow::FixedSizeBinaryScalar&)'
> checked_cast<const
> FixedSizeBinaryScalar&>(*s.value));
> ^
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:447:10: note:
> candidate: template<class ScalarWithBufferValue> arrow::Status
> arrow::engine::{anonymous}::ScalarToProtoImpl::FromBuffer(void
> (substrait::Expression_Literal::*)(std::__cxx11::string&&), const
> ScalarWithBufferValue&)
> Status FromBuffer(void
> (substrait::Expression::Literal::*set)(std::string&&),
> ^~~~~~~~~~
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:447:10: note:
> template argument deduction/substitution failed:
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:597:25: note:
> cannot convert '& substrait::Expression_Literal::set_uuid' (type '<unresolved
> overloaded function type>') to type 'void
> (substrait::Expression_Literal::*)(std::__cxx11::string&&) {aka void
> (substrait::Expression_Literal::*)(std::__cxx11::basic_string<char>&&)}'
> return FromBuffer(&Lit::set_uuid,
> ^~~~
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:603:77: error:
> no matching function for call to
> 'arrow::engine::{anonymous}::ScalarToProtoImpl::FromBuffer(<unresolved
> overloaded function type>, const arrow::FixedSizeBinaryScalar&)'
> checked_cast<const
> FixedSizeBinaryScalar&>(*s.value));
> ^
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:447:10: note:
> candidate: template<class ScalarWithBufferValue> arrow::Status
> arrow::engine::{anonymous}::ScalarToProtoImpl::FromBuffer(void
> (substrait::Expression_Literal::*)(std::__cxx11::string&&), const
> ScalarWithBufferValue&)
> Status FromBuffer(void
> (substrait::Expression::Literal::*set)(std::string&&),
> ^~~~~~~~~~
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:447:10: note:
> template argument deduction/substitution failed:
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:602:25: note:
> cannot convert '& substrait::Expression_Literal::set_fixed_char' (type
> '<unresolved overloaded function type>') to type 'void
> (substrait::Expression_Literal::*)(std::__cxx11::string&&) {aka void
> (substrait::Expression_Literal::*)(std::__cxx11::basic_string<char>&&)}'
> return FromBuffer(&Lit::set_fixed_char,
> ^~~~
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc: In function
> 'arrow::Result<std::unique_ptr<substrait::Expression> >
> arrow::engine::ToProto(const arrow::compute::Expression&,
> arrow::engine::ExtensionSet*)':
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:860:74: error:
> 'bool substrait::Expression_Literal::has_i32() const' is private within this
> context
> if (arguments[1]->has_literal() && arguments[1]->literal().has_i32()) {
> ^
> In file included from
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.h:29:0,
> from
> /arrow/cpp/src/arrow/engine/substrait/expression_internal.cc:20:
> src/arrow/engine/generated/substrait/expression.pb.h:6207:13: note: declared
> private here
> inline bool Expression_Literal::has_i32() const {
> ^~~~~~~~~~~~~~~~~~
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)