Problems with C++ client

90 views
Skip to first unread message

duaneo...@gmail.com

unread,
Jul 1, 2016, 10:41:47 AM7/1/16
to Hypertable User
Hello Doug,

We're experimenting with standalone installation of Hypertable 0.9.8.11 and trying to compile C++ example from
http://www.hypertable.com/documentation/code_examples/cpp

But it's failing with following errors:
g++ -c -g -Wall -D_REENTRANT -std=c++11 -I/opt/hypertable/current/include -I/opt/hypertable/current/include/thrift ht_test.cc
g
++ ht_test.o -g -rdynamic -lfcgi++ -lfcgi -L/opt/hypertable/current/lib -lHyperThrift -lHyperCommon -lHypertable -lthrift -levent -lboost_system -lboost_program_options -lboost_filesystem -lsigar-amd64-linux -lre2 -lcurses -ltcmalloc_minimal -o test
ht_test
.o: In function `Hypertable::Thrift::ClientHelper::ClientHelper(std::string const&, int, int)':
/opt/hypertable/current/include/ThriftBroker/Client.h:46: undefined reference to `
apache::thrift::transport::TSocket::TSocket(std::string const&, int)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x428): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::namespace_create(std::string const&)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x430): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::create_namespace(std::string const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x438): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::table_create(long, std::string const&, Hypertable::ThriftGen::Schema const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x440): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::table_alter(long, std::string const&, Hypertable::ThriftGen::Schema const&)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x448): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::refresh_table(long, std::string const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x450): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::namespace_open(std::string const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x458): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::open_namespace(std::string const&)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x4f0): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::scanner_open(long, std::string const&, Hypertable::ThriftGen::ScanSpec const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x4f8): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::open_scanner(long, std::string const&, Hypertable::ThriftGen::ScanSpec const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x500): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::async_scanner_open(long, std::string const&, long, Hypertable::ThriftGen::ScanSpec const&)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x508): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::open_scanner_async(long, std::string const&, long, Hypertable::ThriftGen::ScanSpec const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x550): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::scanner_get_cells_as_arrays(std::vector<std::vector<std::string, std::allocator<std::string> >, std::allocator<std::vector<std::string, std::allocator<std::string> > > >&, long)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x558): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::next_cells_as_arrays(std::vector<std::vector<std::string, std::allocator<std::string> >, std::allocator<std::vector<std::string, std::allocator<std::string> > > >&, long)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x560): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::scanner_get_cells_serialized(std::string&, long)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x568): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::next_cells_serialized(std::string&, long)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x580): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::scanner_get_row_as_arrays(std::vector<std::vector<std::string, std::allocator<std::string> >, std::allocator<std::vector<std::string, std::allocator<std::string> > > >&, long)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x588): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::next_row_as_arrays(std::vector<std::vector<std::string, std::allocator<std::string> >, std::allocator<std::vector<std::string, std::allocator<std::string> > > >&, long)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x590): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::scanner_get_row_serialized(std::string&, long)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x598): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::next_row_serialized(std::string&, long)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5a0): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::get_row(std::vector<Hypertable::ThriftGen::Cell, std::allocator<Hypertable::ThriftGen::Cell> >&, long, std::string const&, std::string const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5a8): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::get_row_as_arrays(std::vector<std::vector<std::string, std::allocator<std::string> >, std::allocator<std::vector<std::string, std::allocator<std::string> > > >&, long, std::string const&, std::string const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5b0): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::get_row_serialized(std::string&, long, std::string const&, std::string const&)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5b8): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::get_cell(std::string&, long, std::string const&, std::string const&, std::string const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5c0): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::get_cells(std::vector<Hypertable::ThriftGen::Cell, std::allocator<Hypertable::ThriftGen::Cell> >&, long, std::string const&, Hypertable::ThriftGen::ScanSpec const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5c8): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::get_cells_as_arrays(std::vector<std::vector<std::string, std::allocator<std::string> >, std::allocator<std::vector<std::string, std::allocator<std::string> > > >&, long, std::string const&, Hypertable::ThriftGen::ScanSpec const&)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5d0): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::get_cells_serialized(std::string&, long, std::string const&, Hypertable::ThriftGen::ScanSpec const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5d8): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::shared_mutator_refresh(long, std::string const&, Hypertable::ThriftGen::MutateSpec const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5e0): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::refresh_shared_mutator(long, std::string const&, Hypertable::ThriftGen::MutateSpec const&)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5e8): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::shared_mutator_set_cells(long, std::string const&, Hypertable::ThriftGen::MutateSpec const&, std::vector<Hypertable::ThriftGen::Cell, std::allocator<Hypertable::ThriftGen::Cell> > const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5f0): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::offer_cells(long, std::string const&, Hypertable::ThriftGen::MutateSpec const&, std::vector<Hypertable::ThriftGen::Cell, std::allocator<Hypertable::ThriftGen::Cell> > const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x5f8): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::shared_mutator_set_cells_as_arrays(long, std::string const&, Hypertable::ThriftGen::MutateSpec const&, std::vector<std::vector<std::string, std::allocator<std::string> >, std::allocator<std::vector<std::string, std::allocator<std::string> > > > const&)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x600): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::offer_cells_as_arrays(long, std::string const&, Hypertable::ThriftGen::MutateSpec const&, std::vector<std::vector<std::string, std::allocator<std::string> >, std::allocator<std::vector<std::string, std::allocator<std::string> > > > const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x608): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::shared_mutator_set_cell(long, std::string const&, Hypertable::ThriftGen::MutateSpec const&, Hypertable::ThriftGen::Cell const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x610): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::offer_cell(long, std::string const&, Hypertable::ThriftGen::MutateSpec const&, Hypertable::ThriftGen::Cell const&)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x618): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::shared_mutator_set_cell_as_array(long, std::string const&, Hypertable::ThriftGen::MutateSpec const&, std::vector<std::string, std::allocator<std::string> > const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x620): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::offer_cell_as_array(long, std::string const&, Hypertable::ThriftGen::MutateSpec const&, std::vector<std::string, std::allocator<std::string> > const&)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x628): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::mutator_open(long, std::string const&, int, int)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x630): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::open_mutator(long, std::string const&, int, int)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x638): undefined reference to `
Hypertable::ThriftGen::ClientServiceClient::async_mutator_open(long, std::string const&, long, int)'
ht_test.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x640): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::open_mutator_async(long, std::string const&, long, int)'

ht_test
.o:(.rodata._ZTVN10Hypertable6Thrift6ClientE[_ZTVN10Hypertable6Thrift6ClientE]+0x680): undefined reference to `Hypertable::ThriftGen::ClientServiceClient::set_cell(long, std::string const&, Hypertable::ThriftGen::Cell const&)'

...skipped...

Can you please give the right Makefile options and example for latest version?

Yadwinder Grewal

unread,
Jul 1, 2016, 10:55:39 AM7/1/16
to hyperta...@googlegroups.com
"undefined reference to `apache::thrift:......"

You are missing the apache thrift library. 

Here's a link on how to install thrift on ubuntu.

There are some pre and post install scripts you can run which may help set up the environment for you.





--
You received this message because you are subscribed to the Google Groups "Hypertable User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hypertable-us...@googlegroups.com.
To post to this group, send email to hyperta...@googlegroups.com.
Visit this group at https://groups.google.com/group/hypertable-user.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages