Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not compile with clang 16 and libc++ #2106

Closed
owent opened this issue Apr 20, 2023 · 0 comments · Fixed by #2107
Closed

Can not compile with clang 16 and libc++ #2106

owent opened this issue Apr 20, 2023 · 0 comments · Fixed by #2107
Labels
bug Something isn't working

Comments

@owent
Copy link
Member

owent commented Apr 20, 2023

Describe your environment

OS: Linux
Compiler: Clang 16.0.1 with -stdlib=libc++
Build system: cmake
otel-cpp version: v1.9.0

Steps to reproduce

Just compile otel-cpp.

What is the expected behavior?
Success

What is the actual behavior?

[ 61%] Building CXX object ext/src/http/client/curl/CMakeFiles/opentelemetry_http_client_curl.dir/http_client_factory_curl.cc.o
In file included from ~/opentelemetry-cpp-v1.9.0/ext/src/http/client/curl/http_client_factory_curl.cc:4:
In file included from ~/opentelemetry-cpp-v1.9.0/ext/include/opentelemetry/ext/http/client/curl/http_client_curl.h:6:
~/opentelemetry-cpp-v1.9.0/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h:185:45: error: no template named 'function' in namespace 'std'
  CURLcode SendAsync(Session *session, std::function<void(HttpOperation &)> callback = nullptr);
                                       ~~~~~^
~/opentelemetry-cpp-v1.9.0/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h:310:10: error: no template named 'function' in namespace 'std'
    std::function<void(HttpOperation &)> callback;
    ~~~~~^
~/opentelemetry-cpp-v1.9.0/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h:185:77: error: cannot initialize a parameter of type 'int' with an rvalue of type 'std::nullptr_t'
  CURLcode SendAsync(Session *session, std::function<void(HttpOperation &)> callback = nullptr);
                                                                            ^          ~~~~~~~
~/opentelemetry-cpp-v1.9.0/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h:185:77: note: passing argument to parameter 'callback' here
3 errors generated.
gmake[2]: *** [ext/src/http/client/curl/CMakeFiles/opentelemetry_http_client_curl.dir/build.make:76: ext/src/http/client/curl/CMakeFiles/opentelemetry_http_client_curl.dir/http_client_factory_curl.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:692: ext/src/http/client/curl/CMakeFiles/opentelemetry_http_client_curl.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
'/opt/cmake/bin/cmake' '--install' '.' '--prefix' '/home/owent/workspace/tencent/opentelemetry-cpp-ecosystem/third_party/install/linux-x86_64-clang'
-- Install configuration: "RelWithDebInfo"
@owent owent added the bug Something isn't working label Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant