-
Notifications
You must be signed in to change notification settings - Fork 423
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
Linking error with prebuilt opentelemetry-cpp and gcc 4.8 #834
Comments
Signed-off-by: owent <admin@owent.net>
Thanks for reporting @owent. Was absl library installed in the default system path? I am trying to understand what was different as this error was not caught in our CI build. and possibly we need to add tests for this? |
I build abseil into my custom path, and then use the abseil to build opentelemetry-cpp.All libraries are installed into installation path.The build script may like below(The real script we use is more complex, because we build all denpendcies within our build system, not only abseil). WORK_DIR="$PWD";
mkdir -p "$WORK_DIR/build-abseil" && "$WORK_DIR/build-abseil" ;
cmake <PATH of abseil> -DCMAKE_BUILD_TYPE=RelWithDebInfo "-DCMAKE_INSTALL_PREFIX=<installation path>" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_TESTING=OFF
cmake --build . -j --target install
mkdir -p "$WORK_DIR/opentelemetry-cpp" && "$WORK_DIR/opentelemetry-cpp" ;
cmake <PATH of opentelemetry-cpp> "-DCMAKE_INSTALL_PREFIX=<installation path>" -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE "-DCMAKE_FIND_ROOT_PATH=<installation path>" "-DCMAKE_PREFIX_PATH=<installation path>" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DWITH_STL=OFF -DWITH_ABSEIL=ON
cmake --build . -j --target install And the this problem only happen when we have a application outside I think if we add CI matrix for this situation, maybe we could use VCPKG in the runner and install all dependencies with it? And then add |
Describe your environment
cmake 3.20.0
gcc 4.8
centos 7
Steps to reproduce
Using cmake to build and install opentelemetry-cpp, and then use installed opentelemetry-cpp targets (cmake config) to link.
What is the expected behavior?
Success
What is the actual behavior?
Additional context
There are two problem.
# include "absl/types/variant.h"
in api/include/opentelemetry/nostd/variant.h:50 always use localabsl/types/variant.h
.ThrowBadVariantAccess
in core.cc:29 should be replaced by linkingabsl::bad_variant_access
.The text was updated successfully, but these errors were encountered: