jaegertracing / jaeger-client-cpp

🛑 This library is DEPRECATED!
https://jaegertracing.io/
Apache License 2.0
138 stars 126 forks source link

Build error!Help!!!! #71

Closed wolfelven closed 6 years ago

wolfelven commented 6 years ago

My main code : auto config = jaegertracing::Config( false, jaegertracing::samplers::Config(jaegertracing::kSamplerTypeConst, 1), jaegertracing::reporters::Config( jaegertracing::reporters::Config::kDefaultQueueSize, std::chrono::seconds(1), true)); std::shared_ptropentracing::Tracer tracer = jaegertracing::Tracer::make("c++", config); auto span = tracer->StartSpan("abc"); std::this_thread::sleep_for(std::chrono::milliseconds{10}); span->Finish(); std::this_thread::sleep_for(std::chrono::seconds{5}); tracer->Close();

then build error is : clang++ -DGXX_EXPERIMENTAL_CXX0X -D__cplusplus=201103L -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 -stdlib=libc++ -MMD -MP -MF"src/jaegertracing/thrift-gen/Agent.d" -MT"src/jaegertracing/thrift-gen/Agent.o" -o "src/jaegertracing/thrift-gen/Agent.o" "../src/jaegertracing/thrift-gen/Agent.cpp" ../src/jaegertracing/thrift-gen/Agent.cpp:70:10: error: no member named 'incrementRecursionDepth' in 'apache::thrift::protocol::TProtocol'; did you mean 'incrementInputRecursionDepth'? oprot->incrementRecursionDepth(); ^~~~~~~ incrementInputRecursionDepth /usr/local/include/thrift/protocol/TProtocol.h:557:8: note: 'incrementInputRecursionDepth' declared here void incrementInputRecursionDepth() { ^ ../src/jaegertracing/thrift-gen/Agent.cpp:87:10: error: no member named 'decrementRecursionDepth' in 'apache::thrift::protocol::TProtocol'; did you mean 'decrementInputRecursionDepth'? oprot->decrementRecursionDepth(); ^~~~~~~ decrementInputRecursionDepth /usr/local/include/thrift/protocol/TProtocol.h:562:8: note: 'decrementInputRecursionDepth' declared here void decrementInputRecursionDepth() { --input_recursiondepth; } ^ ../src/jaegertracing/thrift-gen/Agent.cpp:98:10: error: no member named 'incrementRecursionDepth' in 'apache::thrift::protocol::TProtocol'; did you mean 'incrementInputRecursionDepth'? oprot->incrementRecursionDepth(); ^~~~~~~ incrementInputRecursionDepth /usr/local/include/thrift/protocol/TProtocol.h:557:8: note: 'incrementInputRecursionDepth' declared here void incrementInputRecursionDepth() { ^ ../src/jaegertracing/thrift-gen/Agent.cpp:115:10: error: no member named 'decrementRecursionDepth' in 'apache::thrift::protocol::TProtocol'; did you mean 'decrementInputRecursionDepth'? oprot->decrementRecursionDepth(); ^~~~~~~ decrementInputRecursionDepth /usr/local/include/thrift/protocol/TProtocol.h:562:8: note: 'decrementInputRecursionDepth' declared here void decrementInputRecursionDepth() { --input_recursiondepth; } ^ ../src/jaegertracing/thrift-gen/Agent.cpp:166:10: error: no member named 'incrementRecursionDepth' in 'apache::thrift::protocol::TProtocol'; did you mean 'incrementInputRecursionDepth'? oprot->incrementRecursionDepth(); ^~~~~~~ incrementInputRecursionDepth /usr/local/include/thrift/protocol/TProtocol.h:557:8: note: 'incrementInputRecursionDepth' declared here void incrementInputRecursionDepth() { ^ ../src/jaegertracing/thrift-gen/Agent.cpp:175:10: error: no member named 'decrementRecursionDepth' in 'apache::thrift::protocol::TProtocol'; did you mean 'decrementInputRecursionDepth'? oprot->decrementRecursionDepth(); ^~~~~~~ decrementInputRecursionDepth /usr/local/include/thrift/protocol/TProtocol.h:562:8: note: 'decrementInputRecursionDepth' declared here void decrementInputRecursionDepth() { --input_recursiondepth; } ^ ../src/jaegertracing/thrift-gen/Agent.cpp:186:10: error: no member named 'incrementRecursionDepth' in 'apache::thrift::protocol::TProtocol'; did you mean 'incrementInputRecursionDepth'? oprot->incrementRecursionDepth(); ^~~~~~~ incrementInputRecursionDepth /usr/local/include/thrift/protocol/TProtocol.h:557:8: note: 'incrementInputRecursionDepth' declared here void incrementInputRecursionDepth() { ^ ../src/jaegertracing/thrift-gen/Agent.cpp:195:10: error: no member named 'decrementRecursionDepth' in 'apache::thrift::protocol::TProtocol'; did you mean 'decrementInputRecursionDepth'? oprot->decrementRecursionDepth(); ^~~~~~~ decrementInputRecursionDepth /usr/local/include/thrift/protocol/TProtocol.h:562:8: note: 'decrementInputRecursionDepth' declared here void decrementInputRecursionDepth() { --input_recursiondepth; } ^ 8 errors generated. make: *** [src/jaegertracing/thrift-gen/Agent.o] Error 1

my local thrift version is 0.9.3

wolfelven commented 6 years ago

Making all in test cd ../../.. && /bin/sh /Users/xujie/Downloads/thrift-0.9.2/missing automake-1.15 --foreign lib/cpp/test/Makefile cd ../../.. && /bin/sh ./config.status lib/cpp/test/Makefile depfiles config.status: creating lib/cpp/test/Makefile config.status: executing depfiles commands /bin/sh ../../../libtool --tag=CXX --mode=link g++ -Wall -Wextra -pedantic -g -O2 -std=c++11 -L/usr/local/lib -L/usr/local/opt/openssl/lib -o processor_test processor/ProcessorTest.o processor/EventLog.o processor/ServerThread.o libprocessortest.la ../../../lib/cpp/libthrift.la ../../../lib/cpp/libthriftnb.la -L/usr/local/lib -levent -l/usr/local/lib/libboost_unit_test_framework.a -lssl -lcrypto -lpthread libtool: link: g++ -Wall -Wextra -pedantic -g -O2 -std=c++11 -o .libs/processor_test processor/ProcessorTest.o processor/EventLog.o processor/ServerThread.o -Wl,-bind_at_load -L/usr/local/lib -L/usr/local/opt/openssl/lib ./.libs/libprocessortest.a -L/usr/local/opt/boost/lib ../../../lib/cpp/.libs/libthrift.dylib ../../../lib/cpp/.libs/libthriftnb.dylib /usr/local/lib/libevent.dylib -l/usr/local/lib/libboost_unit_test_framework.a -lssl -lcrypto -lpthread ld: library not found for -l/usr/local/lib/libboost_unit_test_framework.a clang: error: linker command failed with exit code 1 (use -v to see invocation) make[4]: [processor_test] Error 1 make[3]: [all-recursive] Error 1 make[2]: [all-recursive] Error 1 make[1]: [all-recursive] Error 1 make: *** [all] Error 2

isaachier commented 6 years ago

It seems you are using the wrong version of Thrift. Then, the second comment show you do not have the Boost unit test library.

isaachier commented 6 years ago

Closing for now.