Skip to content

Fix Bazel c++ toolchain#282

Merged
vporoshok merged 1 commit intoppfrom
bazel_flags_fix
Apr 6, 2026
Merged

Fix Bazel c++ toolchain#282
vporoshok merged 1 commit intoppfrom
bazel_flags_fix

Conversation

@gshigin
Copy link
Copy Markdown
Collaborator

@gshigin gshigin commented Apr 3, 2026

On the current pp branch, the tree did not build with:

bazel test -c dbg --asan --test_output=all --cache_test_results=no //...

Narrowing it down, the failure was:

bazel build -c dbg --asan bare_bones_coredump_test

with linker errors:

/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/14/libstdc++exp.a(stacktrace.o): in function `std::(anonymous namespace)::init()':
(.text._ZNSt12_GLOBAL__N_14initEv+0x3c): undefined reference to `__cxa_guard_acquire'
/usr/bin/ld: (.text._ZNSt12_GLOBAL__N_14initEv+0x68): undefined reference to `__cxa_guard_release'
/usr/bin/ld: (.text._ZNSt12_GLOBAL__N_14initEv+0x8c): undefined reference to `__cxa_guard_abort'

This was due to library link order. Replacing static linking (-l:libstdc++.a) with dynamic (-lstdc++) fixes it.

@gshigin gshigin requested a review from vporoshok as a code owner April 3, 2026 11:49
@gshigin gshigin requested a review from cherep58 April 3, 2026 11:49
@gshigin gshigin self-assigned this Apr 3, 2026
@gshigin gshigin added the bug Something isn't working label Apr 3, 2026
@vporoshok vporoshok merged commit e207bf7 into pp Apr 6, 2026
55 of 67 checks passed
@vporoshok vporoshok deleted the bazel_flags_fix branch April 6, 2026 08:32
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 this pull request may close these issues.

3 participants