doc: note why we can't use thread_local with glibc back compat #18709

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:document_thread_local_glibc changing 1 files +4 −1
  1. fanquake commented at 9:02 AM on April 20, 2020: member

    Given that we went through a gitian build to remember why this is the case, we might as well make a note of it in configure.ac.

    From [#18681](/bitcoin-bitcoin/18681/):

    Looking at the Linux build log, this has failed with:

    Checking glibc back compat...
    bitcoind: symbol __cxa_thread_atexit_impl from unsupported version GLIBC_2.18
    bitcoind: failed IMPORTED_SYMBOLS
    bitcoin-cli: symbol __cxa_thread_atexit_impl from unsupported version GLIBC_2.18
    bitcoin-cli: failed IMPORTED_SYMBOLS
    bitcoin-tx: symbol __cxa_thread_atexit_impl from unsupported version GLIBC_2.18
    bitcoin-tx: failed IMPORTED_SYMBOLS
    bitcoin-wallet: symbol __cxa_thread_atexit_impl from unsupported version GLIBC_2.18
    bitcoin-wallet: failed IMPORTED_SYMBOLS
    test/test_bitcoin: symbol __cxa_thread_atexit_impl from unsupported version GLIBC_2.18
    test/test_bitcoin: failed IMPORTED_SYMBOLS
    bench/bench_bitcoin: symbol __cxa_thread_atexit_impl from unsupported version GLIBC_2.18
    bench/bench_bitcoin: failed IMPORTED_SYMBOLS
    qt/bitcoin-qt: symbol __cxa_thread_atexit_impl from unsupported version GLIBC_2.18
    

    __cxa_thread_atexit_impl is used for thread_local variable destruction:

    To implement this support, glibc defines __cxa_thread_atexit_impl exclusively for use by libstdc++ (which has the __cxa_thread_atexit to wrap around it), that registers destructors for thread_local variables in a list. Upon thread or process exit, the destructors are called in reverse order in which they were added.

    As suggested, this only became available in glibc 2.18. From the 2.18 release notes:

    • Add support for calling C++11 thread_local object destructors on thread and program exit. This needs compiler support for offloading C++11 destructor calls to glibc.
  2. doc: note why we can't use thread_local with glibc back compat 20a30922fb
  3. fanquake added the label Docs on Apr 20, 2020
  4. fanquake added the label Build system on Apr 20, 2020
  5. MarcoFalke commented at 9:49 AM on April 20, 2020: member

    ACK

  6. DrahtBot commented at 12:26 PM on April 20, 2020: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  7. hebasto approved
  8. hebasto commented at 2:18 PM on April 20, 2020: member

    ACK 20a30922fbf6ba14e250ca649239af115dbbe7b0

  9. hebasto commented at 7:51 PM on April 20, 2020: member

    It is absolutely unrelated, but would you mind adding a typo fix in https://github.com/bitcoin/bitcoin/blob/c4c3f110eb93243fc8f740070240f50b0008f206/configure.ac#L259 s/liner/linker/ ?

  10. MarcoFalke added the label Needs Guix build on Apr 20, 2020
  11. MarcoFalke removed the label Needs Guix build on Apr 21, 2020
  12. doc: fix typo in configure.ac
    s/liner/linker/
    b155fcda51
  13. fanquake commented at 2:07 AM on April 21, 2020: member

    It is absolutely unrelated, but would you mind adding a typo fix in

    Done.

  14. hebasto approved
  15. hebasto commented at 9:22 AM on April 21, 2020: member

    ACK b155fcda5186c59fc4fb2a9eaaf791d132e0ab30

  16. fanquake merged this on Apr 22, 2020
  17. fanquake closed this on Apr 22, 2020

  18. fanquake deleted the branch on Apr 22, 2020
  19. sidhujag referenced this in commit e466d0eb3a on Apr 23, 2020
  20. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me