Skip to content

Arrow link error after installing on Ubuntu #20459

@ghamarian

Description

@ghamarian

Describe the bug
I used vcpkg to install arrow versions 4 and 5, trying to build my code that uses parquet fails by giving link errors of undefined reference.

The same code works on OSX but fails on ubuntu.

My cmake snippet is as follows:

 


find_package(Arrow CONFIG REQUIRED)
get_filename_component(MY_SEARCH_DIR ${Arrow_CONFIG} DIRECTORY)
find_package(Parquet CONFIG REQUIRED PATHS ${MY_SEARCH_DIR})
find_package(Thrift CONFIG REQUIRED)

and the linking: 

target_link_libraries(vision_obj
PUBLIC
....
thrift::thrift
re2::re2 arrow_static parquet_static
)

Environment

  • OS: [e.g. Windows/Linux etc...]
  • Compiler: revision

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install arrow
  2. Create a simple file using parquet
  3. Add the instructions above to your cmakelists.txt file
  4. Compile and link on Ubuntu 18.04
  5. See error
    Repro code when

Failure logs
Please see the attached file for complete logs

../../vcpkg_installed/x64-linux/debug/lib/libparquet.a(writer.cc.o): In function `parquet::arrow::GetSchemaMetadata(arrow::Schema const&, arrow::MemoryPool*, parquet::ArrowWriterProperties const&, std::shared_ptr<arrow::KeyValueMetadata const>*)':
/projects/vcpkg/buildtrees/arrow/src/rrow-4.0.0-6814571e0d.clean/cpp/src/parquet/arrow/writer.cc:422: undefined reference to `arrow::ipc::SerializeSchema(arrow::Schema const&, arrow::MemoryPool*)'
/projects/vcpkg/buildtrees/arrow/src/rrow-4.0.0-6814571e0d.clean/cpp/src/parquet/arrow/writer.cc:429: undefined reference to `arrow::util::base64_encode[abi:cxx11](unsigned char const*, unsigned int)'
../../vcpkg_installed/x64-linux/debug/lib/libparquet.a(column_writer.cc.o): In function `parquet::ConvertDictionaryToDense(arrow::Array const&, arrow::MemoryPool*, std::shared_ptr<arrow::Array>*)':
/projects/vcpkg/buildtrees/arrow/src/rrow-4.0.0-6814571e0d.clean/cpp/src/parquet/column_writer.cc:1016: undefined reference to `arrow::compute::ExecContext::ExecContext(arrow::MemoryPool*, arrow::compute::FunctionRegistry*)'
/projects/vcpkg/buildtrees/arrow/src/rrow-4.0.0-6814571e0d.clean/cpp/src/parquet/column_writer.cc:1017: undefined reference to `arrow::compute::Cast(arrow::Datum const&, std::shared_ptr<arrow::DataType>, arrow::compute::CastOptions const&, arrow::compute::ExecContext*)'
../../vcpkg_installed/x64-linux/debug/lib/libparquet.a(column_writer.cc.o): In function `parquet::ColumnProperties::ColumnProperties(parquet::Encoding::type, arrow::Compression::type, bool, bool, unsigned long)':
/projects/vcpkg/buildtrees/arrow/src/rrow-4.0.0-6814571e0d.clean/cpp/src/parquet/properties.h:128: undefined reference to `arrow::util::Codec::UseDefaultCompressionLevel()'
../../vcpkg_installed/x64-linux/debug/lib/libparquet.a(column_writer.cc.o): In function `apache::thrift::transport::TTransportException::TTransportException(apache::thrift::transport::TTransportException::TTransportExceptionType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/projects/gs-vision-c/vcpkg_installed/x64-linux/include/thrift/transport/TTransportException.h:63: undefined reference to `vtable for apache::thrift::transport::TTransportException'
../../vcpkg_installed/x64-linux/debug/lib/libparquet.a(column_writer.cc.o): In function `apache::thrift::transport::TTransport::open()':
/projects/gs-vision-c/vcpkg_installed/x64-linux/include/thrift/transport/TTransport.h:85: undefined reference to `typeinfo for apache::thrift::transport::TTransportException'
../../vcpkg_installed/x64-linux/debug/lib/libparquet.a(column_writer.cc.o): In function `apache::thrift::transport::TTransport::close()':
/projects/gs-vision-c/vcpkg_installed/x64-linux/include/thrift/transport/TTransport.h:92: undefined reference to `typeinfo for apache::thrift::transport::TTransportException'
../../vcpkg_installed/x64-linux/debug/lib/libparquet.a(column_writer.cc.o): In function `apache::thrift::transport::TTransport::read_virt(unsigned char*, unsigned int)':
/projects/gs-vision-c/vcpkg_installed/x64-linux/include/thrift/transport/TTransport.h:108: undefined reference to `typeinfo for apache::thrift::transport::TTransportException'
../../vcpkg_installed/x64-linux/debug/lib/libparquet.a(column_writer.cc.o): In function `apache::thrift::transport::TTransport::write_virt(unsigned char const*, unsigned int)':
/projects/gs-vision-c/vcpkg_installed/x64-linux/include/thrift/transport/TTransport.h:156: undefined reference to `typeinfo for a ...

Additional context
Add any other context about the problem here.
linkerror.txt

Metadata

Metadata

Assignees

Labels

category:port-bugThe issue is with a library, which is something the port should already support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions