Project

General

Profile

Actions

Bug #62804

open

Jaegertracing compile failure

Added by Adam Emerson 8 months ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Category:
build
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Compilation fails with:

In file included from /home/aemerson/work/ceph/main/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.h:16,
                 from /home/aemerson/work/ceph/main/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc:6:
/home/aemerson/work/ceph/main/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc: In member function ‘virtual void opentelemetry::v1::exporter::jaeger::TUDPTransport::close()’:
/home/aemerson/work/ceph/main/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc:71:7: error: ‘::close’ has not been declared; did you mean ‘pclose’?
   71 |     ::THRIFT_CLOSESOCKET(socket_);
      |       ^~~~~~~~~~~~~~~~~~

It can be fixed with:

diff --git a/exporters/jaeger/src/TUDPTransport.cc b/exporters/jaeger/src/TUDPTransport.cc
index e4111273..0ea86288 100644
--- a/exporters/jaeger/src/TUDPTransport.cc
+++ b/exporters/jaeger/src/TUDPTransport.cc
@@ -3,6 +3,8 @@

 #include <sstream>  // std::stringstream

+#include <unistd.h>
+
 #include "TUDPTransport.h" 
 #include "opentelemetry/sdk_config.h" 

applied to jaegertracing/opentelemetry-cpp

Actions #1

Updated by Alex Ainscow 4 months ago

opentelemetry appears to have removed support for jaeger exporter.

https://github.com/open-telemetry/opentelemetry-cpp/pull/2031

Actions #2

Updated by Leonid Usov 4 months ago

I believe that this is a problem of thrift rather than jaegertracing. Thrift.h in my environment has the `unistd.h` include and I'm struggling to know how come that's the case, as the file is in the brew Cellar. I haven't noticed any patch in the brew formulae that would make the change, and on the github I see `stdlib.h` include at the same line in Thrift.h for both 0.18.1 and 0.19.0: https://github.com/apache/thrift/blame/v0.19.0/lib/cpp/src/thrift/Thrift.h

/opt/homebrew/Cellar/thrift/0.18.1_1/include/thrift/Thrift.h

...
#ifndef _THRIFT_THRIFT_H_
#define _THRIFT_THRIFT_H_ 1

#include <thrift/transport/PlatformSocket.h>

#include <thrift/thrift-config.h>

#include <unistd.h>   // <-- here
#include <assert.h>

Actions

Also available in: Atom PDF