rnburn / zipkin-cpp-opentracing

OpenTracing Tracer implementation for Zipkin in C++
Apache License 2.0
51 stars 45 forks source link

New Pure virtual Clone method in SpanContext is not defined in OtSpanContext #29

Closed nefethael closed 5 years ago

nefethael commented 5 years ago

I'm trying to compile this project with Yocto and it fails to compile opentracing.cc with

| /yocto/zipkin-cpp-opentracing/1.0+gitAUTOINC+e0cd6fd352-r0/git/zipkin_opentracing/src/opentracing.cc:270:17: error: cannot declare field 'zipkin::OtSpan::span_context_' to be of abstract type 'zipkin::OtSpanContext'
|    OtSpanContext span_context_;
|                  ^~~~~~~~~~~~~
| /yocto/zipkin-cpp-opentracing/1.0+gitAUTOINC+e0cd6fd352-r0/git/zipkin_opentracing/src/opentracing.cc:49:7: note:   because the following virtual functions are pure within 'zipkin::OtSpanContext':
|  class OtSpanContext : public ot::SpanContext {
|        ^~~~~~~~~~~~~
| In file included from /yocto/zipkin-cpp-opentracing/1.0+gitAUTOINC+e0cd6fd352-r0/recipe-sysroot/usr/include/opentracing/tracer.h:5:0,
|                  from /yocto/zipkin-cpp-opentracing/1.0+gitAUTOINC+e0cd6fd352-r0/git/zipkin_opentracing/include/zipkin/opentracing.h:1,
|                  from /yocto/zipkin-cpp-opentracing/1.0+gitAUTOINC+e0cd6fd352-r0/git/zipkin_opentracing/src/opentracing.cc:2:
| /yocto/zipkin-cpp-opentracing/1.0+gitAUTOINC+e0cd6fd352-r0/recipe-sysroot/usr/include/opentracing/span.h:34:40: note:     virtual std::unique_ptr<opentracing::v3_unstable::SpanContext> opentracing::v3_unstable::SpanContext::Clone() const
|    virtual std::unique_ptr<SpanContext> Clone() const noexcept = 0;
|                                         ^~~~~

It's introduced by https://github.com/opentracing/opentracing-cpp/commit/301ac821dd3ca2d5d972e33adf871ae05449df2b commit. Does this project is compatible with latest opentracing-cpp project, or does it need specific version?

rnburn commented 5 years ago

It works with the latest OT 1.5 release; but yeah, it hasn't implemented the changes on master yet.

nefethael commented 5 years ago

@rnburn Ok thanks, I couldn't find version dependencies, it compiles fine with 1.5.

All-embracing commented 5 years ago

This issue still exists, is there any way to get the latest OT 1.5 release? Errors happen at zipkin-cpp-opentracing/zipkin_opentracing/src/opentracing.cc:270:17: error: cannot declare field ‘zipkin::OtSpan::spancontext’ to be of abstract type ‘zipkin::OtSpanContext’ OtSpanContext spancontext; ^ /home/lewky/opentracing/zipkin-cpp-opentracing/zipkin_opentracing/src/opentracing.cc:49:7: note: because the following virtual functions are pure within ‘zipkin::OtSpanContext’: class OtSpanContext : public ot::SpanContext { ^ In file included from /usr/local/include/opentracing/tracer.h:5:0, from /home/lewky/opentracing/zipkin-cpp-opentracing/zipkin_opentracing/include/zipkin/opentracing.h:1,