[
https://issues.apache.org/jira/browse/THRIFT-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031698#comment-14031698
]
Roger Meier commented on THRIFT-2520:
-------------------------------------
the issues is caused on the test suite:
{noformat}
$ cd test/cpp/
$ make check
make TestServer TestClient StressTest StressTestNonBlocking
make[1]: Entering directory `/tmp/thrift/test/cpp'
/bin/sh ../../libtool --tag=CXX --mode=link g++ -Wall -g -O2 -std=c++11
-L/usr/lib -o TestServer TestServer.o libtestgencpp.la
../../lib/cpp/libthrift.la ../../lib/cpp/libthriftz.la
../../lib/cpp/libthriftnb.la -levent -lboost_program_options -lssl -lcrypto
-lrt -lpthread
libtool: link: g++ -Wall -g -O2 -std=c++11 -o .libs/TestServer TestServer.o
-L/usr/lib ./.libs/libtestgencpp.a /tmp/thrift/lib/cpp/.libs/libthrift.so
../../lib/cpp/.libs/libthrift.so ../../lib/cpp/.libs/libthriftz.so
../../lib/cpp/.libs/libthriftnb.so -levent -lboost_program_options -lssl
-lcrypto -lrt -lpthread
TestServer.o: In function
`thrift::test::ThriftTestAsyncProcessorT<apache::thrift::protocol::TDummyProtocol>::return_testVoid(std::tr1::function<void
(bool)>, int, apache::thrift::protocol::TDummyProtocol*, void*)':
/tmp/thrift/test/cpp/gen-cpp/ThriftTest.tcc:9459: undefined reference to
`vtable for thrift::test::ThriftTest_testVoid_presult'
/tmp/thrift/test/cpp/gen-cpp/ThriftTest.tcc:9478: undefined reference to
`thrift::test::ThriftTest_testVoid_presult::~ThriftTest_testVoid_presult()'
/tmp/thrift/test/cpp/gen-cpp/ThriftTest.tcc:9478: undefined reference to
`thrift::test::ThriftTest_testVoid_presult::~ThriftTest_testVoid_presult()'
TestServer.o: In function
`thrift::test::ThriftTestAsyncProcessorT<apache::thrift::protocol::TDummyProtocol>::return_testVoid(std::tr1::function<void
(bool)>, int, apache::thrift::protocol::TProtocol*, void*)':
/tmp/thrift/test/cpp/gen-cpp/ThriftTest.tcc:9400: undefined reference to
`vtable for thrift::test::ThriftTest_testVoid_presult'
/tmp/thrift/test/cpp/gen-cpp/ThriftTest.tcc:9419: undefined reference to
`thrift::test::ThriftTest_testVoid_presult::~ThriftTest_testVoid_presult()'
/tmp/thrift/test/cpp/gen-cpp/ThriftTest.tcc:9419: undefined reference to
`thrift::test::ThriftTest_testVoid_presult::~ThriftTest_testVoid_presult()'
TestServer.o: In function `ThriftTest_testVoid_args':
{noformat}
I'm using debian wheezy.+ boost 1.54
> cpp:cob_style generates incorrect .tcc file
> -------------------------------------------
>
> Key: THRIFT-2520
> URL: https://issues.apache.org/jira/browse/THRIFT-2520
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Compiler
> Affects Versions: 1.0
> Environment: Linux gcc
> Reporter: Nobuaki Sukegawa
>
> With cob_style switch, thrift compiler generates non-template method
> definitions into .tcc files, which results in link errors whenever you
> include a service header from multiple implementation files.
> Moving non-template methods to .cpp file resolves the problem.
> This problem is present only in recent master branch.
> pull request url:
> https://github.com/apache/thrift/pull/118
--
This message was sent by Atlassian JIRA
(v6.2#6252)