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

[BUILD] Build break with external CMake nlohman_json package #2352

Closed
marcalff opened this issue Oct 9, 2023 · 0 comments · Fixed by #2353
Closed

[BUILD] Build break with external CMake nlohman_json package #2352

marcalff opened this issue Oct 9, 2023 · 0 comments · Fixed by #2353
Assignees
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@marcalff
Copy link
Member

marcalff commented Oct 9, 2023

Install a nlohman_json package, for example in /opt/nlohmann_json-3.10.5

Build using:

ccmake \
-DCMAKE_PREFIX_PATH="/opt/protobuf-3.19.4;/opt/googletest-1.12.1;/opt/nlohmann_json-3.10.5;/opt/benchmark-1.8.2" \
-DBUILD_SHARED_LIBS=ON \
-DOTELCPP_PROTO_PATH=/home/malff/CODE/MY_GITHUB/opentelemetry-proto \
-DWITH_OTLP_HTTP=ON \
-DWITH_OTLP_GRPC=OFF \
-DWITH_BENCHMARK=OFF \
 ../opentelemetry-cpp

Build ... it fails:

[ 85%] Building CXX object exporters/otlp/CMakeFiles/otlp_http_log_record_exporter_test.dir/test/otlp_http_log_record_exporter_test.cc.o
/home/malff/CODE/MY_GITHUB/opentelemetry-cpp/exporters/otlp/test/otlp_http_log_record_exporter_test.cc:31:12: fatal error: nlohmann/json.hpp: No such file or directory
   31 | #  include "nlohmann/json.hpp"
      |            ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [exporters/otlp/CMakeFiles/otlp_http_log_record_exporter_test.dir/build.make:76: exporters/otlp/CMakeFiles/otlp_http_log_record_exporter_test.dir/test/otlp_http_log_record_exporter_test.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5489: exporters/otlp/CMakeFiles/otlp_http_log_record_exporter_test.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
@marcalff marcalff added the bug Something isn't working label Oct 9, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 9, 2023
@marcalff marcalff changed the title [BUILD] Build break with external CMake [BUILD] Build break with external CMake nlohman_json package Oct 9, 2023
@marcalff marcalff self-assigned this Oct 9, 2023
marcalff added a commit to marcalff/opentelemetry-cpp that referenced this issue Oct 9, 2023
@marcalff marcalff added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 9, 2023
marcalff added a commit that referenced this issue Oct 10, 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 triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant