[libcxx-commits] [PATCH] D148566: [libcxxabi] copy back std::string_view patches from LLVM

Nick Desaulniers via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 22 14:01:49 PDT 2023


nickdesaulniers added a comment.

In D148566#4361245 <https://reviews.llvm.org/D148566#4361245>, @nickdesaulniers wrote:

> Hmm...some unittests are failing to link...
>
>   /usr/bin/ld: /tmp/lit-tmp-xl26yrf1/unittest_demangle-74952e.o: in function `std::__1::basic_string_view<char, std::__1::char_traits<char> >::basic_string_view[abi:v170000](char const*, unsigned long)':
>   unittest_demangle.pass.cpp:(.text._ZNSt3__117basic_string_viewIcNS_11char_traitsIcEEEC2B7v170000EPKcm[_ZNSt3__117basic_string_viewIcNS_11char_traitsIcEEEC2B7v170000EPKcm]+0x6d): undefined reference to `abort_message'
>   /usr/bin/ld: unittest_demangle.pass.cpp:(.text._ZNSt3__117basic_string_viewIcNS_11char_traitsIcEEEC2B7v170000EPKcm[_ZNSt3__117basic_string_viewIcNS_11char_traitsIcEEEC2B7v170000EPKcm]+0xca): undefined reference to `abort_message'
>   /usr/bin/ld: /tmp/lit-tmp-xl26yrf1/unittest_demangle-74952e.o: in function `unsigned long std::__1::__char_traits_length_checked[abi:v170000]<std::__1::char_traits<char> >(std::__1::char_traits<char>::char_type const*)':
>   unittest_demangle.pass.cpp:(.text._ZNSt3__128__char_traits_length_checkedB7v170000INS_11char_traitsIcEEEEmPKNT_9char_typeE[_ZNSt3__128__char_traits_length_checkedB7v170000INS_11char_traitsIcEEEEmPKNT_9char_typeE]+0x40): undefined reference to `abort_message'
>   /usr/bin/ld: /tmp/lit-tmp-xl26yrf1/unittest_demangle-74952e.o: in function `std::__1::basic_string_view<char, std::__1::char_traits<char> >::remove_prefix[abi:v170000](unsigned long)':
>   unittest_demangle.pass.cpp:(.text._ZNSt3__117basic_string_viewIcNS_11char_traitsIcEEE13remove_prefixB7v170000Em[_ZNSt3__117basic_string_viewIcNS_11char_traitsIcEEE13remove_prefixB7v170000Em]+0x5e): undefined reference to `abort_message'
>   /usr/bin/ld: /tmp/lit-tmp-xl26yrf1/unittest_demangle-74952e.o: in function `std::__1::basic_string_view<char, std::__1::char_traits<char> >::front[abi:v170000]() const':
>   unittest_demangle.pass.cpp:(.text._ZNKSt3__117basic_string_viewIcNS_11char_traitsIcEEE5frontB7v170000Ev[_ZNKSt3__117basic_string_viewIcNS_11char_traitsIcEEE5frontB7v170000Ev]+0x51): undefined reference to `abort_message'
>   /usr/bin/ld: /tmp/lit-tmp-xl26yrf1/unittest_demangle-74952e.o:unittest_demangle.pass.cpp:(.text._ZNKSt3__117basic_string_viewIcNS_11char_traitsIcEEEixB7v170000Em[_ZNKSt3__117basic_string_viewIcNS_11char_traitsIcEEEixB7v170000Em]+0x5e): more undefined references to `abort_message' follow
>   /usr/bin/ld: /home/libcxx-builder/.buildkite-agent/builds/google-libcxx-builder-3bf078479ae8-1/llvm-project/libcxx-ci/build/generic-cxx2b/test/Output/unittest_demangle.pass.cpp.dir/t.tmp.exe: hidden symbol `abort_message' isn't defined
>   /usr/bin/ld: final link failed: bad value
>
> related to https://reviews.llvm.org/D149092 (or https://reviews.llvm.org/D150825)

I can build DemangleTests just fine, though I do set `-DLLVM_ENABLE_LLD=ON` to link with LLD rather than BFD. Let me try BFD.

Strange, setting `-DLLVM_USE_LINKER=ld` (and hacking out `LINKER_SUPPORTS_COLOR_DIAGNOSTICS` from the cmake rules):

  $ cd llvm/build; ninja DemangleTests; cd -
  $ llvm-readelf -p .comment llvm/build/unittests/Demangle/DemangleTests
  String dump of section '.comment':
  [     0] GCC: (Debian 12.2.0-14) 12.2.0
  [    1f] Android (10006735, +pgo, +bolt, +lto, -mlgo, based on r487747b) clang version 17.0.1 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)

(Shows that I was able to link via ld.bfd successfully) I wonder what else could be going wrong for this particular presubmit? `_LIBCPP_VERBOSE_ABORT` is not set AFAICT.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148566/new/

https://reviews.llvm.org/D148566



More information about the libcxx-commits mailing list