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

Expose stacktrace libraries as build features #202

Merged
merged 4 commits into from
Jan 18, 2025

Conversation

uilianries
Copy link
Contributor

@uilianries uilianries commented Jan 16, 2025

Hello! As I commented in the issue #195, this PR exposes all stacktrace libraries as boost features, mirroring what's available in the CMakeLists.txt in this project. So users will be able to build or not specific libraries present in this project. Here are some keypoints to evaluate these new changes:

close #195

Signed-off-by: Uilian Ries <[email protected]>
@apolukhin
Copy link
Member

apolukhin commented Jan 16, 2025

CI breaks with the following message:

 clang-linux.compile.c++ bin.v2/libs/stacktrace/test/from_exception_disabled_none_ho.test/clang-linux-15/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden/test_from_exception_none.o
clang-linux.link bin.v2/libs/stacktrace/test/from_exception_disabled_none_ho.test/clang-linux-15/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden/from_exception_disabled_none_ho
/usr/bin/ld: bin.v2/libs/stacktrace/test/from_exception_disabled_none_ho.test/clang-linux-15/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden/from_exception_disabled_none_ho: hidden symbol `_ZN5boost10stacktrace6detail18this_thread_frames7collectEPPKvmm' in bin.v2/libs/stacktrace/test/from_exception_disabled_none_ho.test/clang-linux-15/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden/test_from_exception_none.o is referenced by DSO
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Same for GCC:

gcc.compile.c++ bin.v2/libs/stacktrace/test/from_exception_disabled_bt_ho.test/gcc-9/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden/test_from_exception_none.o
gcc.link bin.v2/libs/stacktrace/test/from_exception_disabled_bt_ho.test/gcc-9/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden/from_exception_disabled_bt_ho
/usr/bin/ld: bin.v2/libs/stacktrace/build/gcc-9/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden/libboost_stacktrace_from_exception.so.1.88.0: undefined reference to `boost::stacktrace::detail::this_thread_frames::collect(void const**, unsigned long, unsigned long)'
collect2: error: ld returned 1 exit status

    "g++-9"  -Wl,-rpath -Wl,"/home/runner/work/stacktrace/boost-root/bin.v2/libs/stacktrace/build/gcc-9/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden" -Wl,-rpath-link -Wl,"/home/runner/work/stacktrace/boost-root/bin.v2/libs/stacktrace/build/gcc-9/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden" -o "bin.v2/libs/stacktrace/test/from_exception_disabled_bt_ho.test/gcc-9/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden/from_exception_disabled_bt_ho" -Wl,--start-group "bin.v2/libs/stacktrace/test/from_exception_disabled_bt_ho.test/gcc-9/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden/test_from_exception_none.o" "bin.v2/libs/stacktrace/build/gcc-9/release/x86_64/cxxstd-2a-iso/threading-multi/visibility-hidden/libboost_stacktrace_from_exception.so.1.88.0"  -Wl,-Bstatic -lbacktrace -Wl,-Bdynamic -lrt -ldl -Wl,--end-group -fPIC -m64 -pthread -std=c++2a -fvisibility=hidden -fvisibility-inlines-hidden -lpthread

@uilianries
Copy link
Contributor Author

@apolukhin Thank you for informing, I'll check it. I only tested on Linux-GCC (locally) so far.

@uilianries
Copy link
Contributor Author

@apolukhin Could please run the CI again. I just updated the code to avoid injecting those common constants to all libraries. Locally, I was able to reproduce the CI error and mitigate it by reverting that.

@coveralls
Copy link

Coverage Status

coverage: 86.371%. remained the same
when pulling b0d687c on uilianries:b2/lib-options
into ea28232 on boostorg:develop.

@apolukhin apolukhin merged commit 54934a3 into boostorg:develop Jan 18, 2025
42 checks passed
@apolukhin
Copy link
Member

Many thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose Boost.Stacktrace Internal Libraries as Optional in Boost.Build
3 participants