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

[C++] Examples fail with Protobuf error #19804

Closed
asfimport opened this issue Oct 11, 2018 · 6 comments
Closed

[C++] Examples fail with Protobuf error #19804

asfimport opened this issue Oct 11, 2018 · 6 comments

Comments

@asfimport
Copy link

I used fresh clean installation of Ubuntu 18.04 and Debian

  1. Follow by instruction to install https://arrow.apache.org/install/

  2. Download example from https://github.com/apache/arrow/tree/master/cpp/examples/parquet/parquet-arrow/src

3) g++ -Wall -fexceptions -lparquet -larrow -O3 -Iinclude -c reader-writer.cc -o reader-writer.o

At the compile stage I see Errors: 


/usr/include/parquet/util/memory.h:44:33: error: template argument 1 is invalid std::unique_ptr<::arrow::Codec> result;

I went and changed ::arrow::Codec to ::arrow::util::Codec in the header file and it's been compiled with a warning:

/usr/bin/ld: warning: libarrow.so.10, needed by /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libparquet.so, may conflict with libarrow.so.11

4) g++  -o parquet_test reader-writer.o  -s  -lparquet -larrow

  1. Run it ./parquet_test

[libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: orc_proto.proto

[libprotobuf FATAL google/protobuf/descriptor.cc:1164] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):

terminate called after throwing an instance of 'google::protobuf::FatalException'

  what():  CHECK failed: generated_database_->Add(encoded_file_descriptor, size):

Aborted

Environment: Ubuntu 18.04
Debian GNU
Reporter: Yury Zhyshko
Assignee: Kouhei Sutou / @kou

Note: This issue was originally created as ARROW-3485. Please see the migration documentation for further details.

@asfimport
Copy link
Author

@asfimport
Copy link
Author

Wes McKinney / @wesm:
[~yzhishko] it appears you have old versions of libarrow and/or libprotobuf installed on your system. Can you remove those and try installing again?

@asfimport
Copy link
Author

Yury Zhyshko:
No previous arrow or parquet versions installed. Protobuf is at version 10. It's absolutely clean installation of ubuntu, so, I expect to have working straight forward. NOTE: by installing just parquet or arrow libraries I can't compile the example at all.

@asfimport
Copy link
Author

Wes McKinney / @wesm:
Oh I think I see the problem. @kou should the libparquet-dev packages be removed from the installation page? If you remove libparquet-dev I think it will work

@asfimport
Copy link
Author

Kouhei Sutou / @kou:
There were libparquet-dev package for apache/parquet-cpp at packages.red-data-tools.org. It uses 1.4.1 as its version.

Apache Arrow 0.11.0 starts including Apache Parquet C++ and libparquet-dev package uses Apache Parquet C++ in Apache Arrow. The libparquet-dev packages uses 0.11.0 as its version.

0.11.0 is less than 1.4.1. So libparquet-dev packages for apache/parquet-cpp was preferred.

I've removed all libparquet-dev packages for apache/parquet-cpp from packages.red-data-tools.org. Now, you can install libparquet-dev for Apache Parquet C++ in Apache Arrow 0.11.0 by default.

 

Workaround: You can force to install the specified version by sudo apt install -y -V libparquet-dev=0.11.0-1.

@asfimport
Copy link
Author

Yury Zhyshko:
Awesome. Thanks for quick reply.

@asfimport asfimport added this to the 0.12.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants