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

opentelemetry-cpp 1.8.3 does not install opentelemetry-cpp-config.cmake, 1.8.2 works correctly. #2059

Closed
compoundradius opened this issue Mar 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@compoundradius
Copy link

compoundradius commented Mar 15, 2023

Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch.

Steps to reproduce
Describe exactly how to reproduce the error. Include a code sample if applicable.

export MY_INSTALL_DIR=$HOME/.local
git clone --recurse-submodules -b v1.8.3 --depth 1 --shallow-submodules https://github.com/open-telemetry/opentelemetry-cpp && \
    cd opentelemetry-cpp && \
    CC="clang-16" CXX="clang++-16" cmake -S . -B build -GNinja -DWITH_OTLP=ON \
	-DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR \
	-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" \
	-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" \
	-DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=mold" && \
    cmake --build build && \
    cmake --install build 

What is the expected behavior?
What did you expect to see?

cd ~/.local
➜  .local find . -name "opentelemetry-cpp-config.cmake" -print
➜  .local 
``
No results:
Downgrade to 1.8.2:

git clone --recurse-submodules -b v1.8.2 --depth 1 --shallow-submodules https://github.com/open-telemetry/opentelemetry-cpp &&
cd opentelemetry-cpp &&
CC="clang-16" CXX="clang++-16" cmake -S . -B build -GNinja -DWITH_OTLP=ON
-DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold"
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold"
-DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=mold" &&
cmake --build build &&
cmake --install build

cd ~/.local
➜ .local find . -name "opentelemetry-cpp-config.cmake" -print
./lib/cmake/opentelemetry-cpp/opentelemetry-cpp-config.cmake



**What is the actual behavior?**
What did you see instead?

**Additional context**
Add any other context about the problem here.
@compoundradius compoundradius added the bug Something isn't working label Mar 15, 2023
@lalitb
Copy link
Member

lalitb commented Mar 15, 2023

Yes, there a breaking change in v1.8.3, unfortunately not communicated well. Starting v1.8.3 (PR #2022), the cmake install rules are not created by default, and need to explicitly specify the CMAKE option OPENTELEMETRY_INSTALL to create them. Please use this option from now. It is still not finalized if default install should be enabled back.

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

No branches or pull requests

2 participants