build: Bump minimum libc to 2.17 for release binaries #17538

pull fanquake wants to merge 3 commits into bitcoin:master from fanquake:bump_libc_217 changing 2 files +22 −18
  1. fanquake commented at 6:36 pm on November 20, 2019: member

    Closes: #17525. Taken over from #17531.

    Debian 8 (Jessie) has:

    • g++ version 4.9.2
    • libc version 2.19

    CentOS 7 has:

    • g++ version 4.8.5
    • libc version 2.17

    Ubuntu 16.04.4 (Xenial, oldest supported Ubuntu) has:

    • g++ version 5.3.1
    • libc version 2.23.0

    Taking the minimum of these as our target. According to GNU ABI document this corresponds to:

    • GCC 4.8.5: GCC_4.8.0
    • (glibc) GLIBC_2_17

    This also contains a (long needed) commit to disallow dynamic linking to stdc++, as our releases statically link against that.

  2. fanquake added the label Build system on Nov 20, 2019
  3. fanquake added the label Needs release note on Nov 20, 2019
  4. fanquake added the label Needs gitian build on Nov 20, 2019
  5. fanquake added the label Needs Conceptual Review on Nov 20, 2019
  6. fanquake added this to the milestone 0.20.0 on Nov 20, 2019
  7. in contrib/devtools/symbol-check.py:29 in 8af3331556 outdated
    32-# - libc version 2.11.1 (http://packages.ubuntu.com/search?keywords=libc6&searchon=names&suite=lucid&section=all)
    33-# - libstdc++ version 4.4.3 (http://packages.ubuntu.com/search?suite=lucid&section=all&arch=any&keywords=libstdc%2B%2B&searchon=names)
    34+# - g++ version 5.3.1 (https://packages.ubuntu.com/search?keywords=g%2B%2B&searchon=names&suite=xenial&section=all)
    35+# - libc version 2.23.0 (https://packages.ubuntu.com/search?keywords=libc6&searchon=names&suite=xenial&section=all)
    36+#
    37+# CentOS 7 has:
    


    MarcoFalke commented at 6:41 pm on November 20, 2019:
    0# CentOS 7. EOL: June 30, 2024. https://wiki.centos.org/FAQ/General#head-fe8a0be91ee3e7dea812e8694491e1dde5b75e6d
    
  8. in contrib/devtools/symbol-check.py:19 in 8af3331556 outdated
    15@@ -16,30 +16,30 @@
    16 import sys
    17 import os
    18 
    19-# Debian 6.0.9 (Squeeze) has:
    20+# Debian 8 (Jessie) has:
    


    MarcoFalke commented at 6:41 pm on November 20, 2019:
    0# Debian 8 Jessie. EOL: 2020. https://wiki.debian.org/DebianReleases#Production_Releases
    
  9. in contrib/devtools/symbol-check.py:24 in 8af3331556 outdated
    24-# - libstdc++ version 4.4.5 (https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=libstdc%2B%2B6)
    25+# - g++ version 4.9.2 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=g%2B%2B)
    26+# - libc version 2.19 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=libc6)
    27 #
    28-# Ubuntu 10.04.4 (Lucid Lynx) has:
    29+# Ubuntu 16.04 (Xenial) has:
    


    MarcoFalke commented at 6:43 pm on November 20, 2019:
    0# Ubuntu 16.04 Xenial. EOL: April, 2021. https://help.ubuntu.com/community/EOL#Ubuntu_16.04_Xenial_Xerus
    

    flack commented at 9:45 am on November 21, 2019:

    @MarcoFalke there seems to be some ambiguity about the EOL date for 16.04, this page says it’s April 2024, and April 2021 is only the “End of Standard Support”:

    https://wiki.ubuntu.com/Releases


    fanquake commented at 3:37 pm on November 21, 2019:
    I’ve changed it to use the 2024 date.
  10. MarcoFalke approved
  11. MarcoFalke commented at 6:44 pm on November 20, 2019: member

    ACK

    Could mention the EOL dates and remove all the links from the OP? They don’t need to end up in the git merge log, imo.

  12. sidhujag commented at 8:46 pm on November 20, 2019: none
    concept ACK can we remove some fallbacks from src/compat/glibc_compat.cpp?
  13. DrahtBot commented at 4:37 am on November 21, 2019: member

    Gitian builds

    File commit a8d9f7dfa72395e95c9f197b47f2120e19f1b1d2(master) commit c8089a048d6ee3fe075fc5285914f0eeb896108d(master and this pull)
    bitcoin-0.19.99-osx-unsigned.dmg 8eef55beace60a07... 6547e8efa99fa999...
    bitcoin-0.19.99-osx64.tar.gz 81a13f06c30b6b33... 2feaeb78c8bb755e...
    bitcoin-0.19.99-win64-debug.zip adefda3582e2cca7... 019d77c46f9a74cd...
    bitcoin-0.19.99-win64-setup-unsigned.exe 2b3676e6fd590a4d... f4ac34e7b5549d7e...
    bitcoin-0.19.99-win64.zip 8399a82dc840e384... ffbd90208257e97a...
    bitcoin-0.19.99.tar.gz 61e7b8babb17c1e4... 06eaa609b5da80b7...
    bitcoin-core-osx-0.20-res.yml ae0f132170bf83e9... 62a47eb9b043bf97...
    bitcoin-core-win-0.20-res.yml 5ea584117989cd85... d6c47447aa69d40d...
    linux-build.log c77fa64606fda051... 63d073441a6278a6...
    osx-build.log a737f7c10644abe8... d0c100b16b628cdb...
    win-build.log 879d025e1e14b8a4... 8bff5350dda6e883...
    bitcoin-core-osx-0.20-res.yml.diff c270dc93ba53209b...
    bitcoin-core-win-0.20-res.yml.diff 59a707fe79220974...
    linux-build.log.diff 430628fe651a218f...
    osx-build.log.diff 82a26251e2d1024b...
    win-build.log.diff f4a404d4dfae6122...
  14. DrahtBot removed the label Needs gitian build on Nov 21, 2019
  15. MarcoFalke commented at 2:37 pm on November 21, 2019: member

    Failure:

     0  GEN      qt/locale/bitcoin_zh_TW.qm
     1  GEN      qt/qrc_bitcoin_locale.cpp
     2  CXX      qt/qt_libbitcoinqt_a-qrc_bitcoin_locale.o
     3  AR       qt/libbitcoinqt.a
     4  CXXLD    qt/bitcoin-qt
     5make[2]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-linux-gnu/src'
     6make[1]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-linux-gnu/src'
     7Making all in doc/man
     8make[1]: Entering directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-linux-gnu/doc/man'
     9make[1]: Nothing to be done for 'all'.
    10make[1]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-linux-gnu/doc/man'
    11make[1]: Entering directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-linux-gnu'
    12make[1]: Nothing to be done for 'all-am'.
    13make[1]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-linux-gnu'
    14+ make -j1 -C src check-security
    15make: Entering directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-linux-gnu/src'
    16Checking binary security...
    17make: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-linux-gnu/src'
    18+ make -j1 -C src check-symbols
    19make: Entering directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-linux-gnu/src'
    20Checking glibc back compat...
    21bitcoin-cli: export of symbol environ not allowed
    22bitcoin-cli: export of symbol _environ not allowed
    23bitcoin-cli: export of symbol __environ not allowed
    24bitcoin-tx: export of symbol environ not allowed
    25bitcoin-tx: export of symbol _environ not allowed
    26bitcoin-tx: export of symbol __environ not allowed
    27bitcoin-wallet: export of symbol environ not allowed
    28bitcoin-wallet: export of symbol _environ not allowed
    29bitcoin-wallet: export of symbol __environ not allowed
    30test/test_bitcoin: export of symbol _environ not allowed
    31test/test_bitcoin: export of symbol environ not allowed
    32test/test_bitcoin: export of symbol __environ not allowed
    33qt/bitcoin-qt: export of symbol _environ not allowed
    34qt/bitcoin-qt: export of symbol environ not allowed
    35qt/bitcoin-qt: export of symbol __environ not allowed
    36Makefile:15062: recipe for target 'check-symbols' failed
    37make: *** [check-symbols] Error 1
    38make: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-linux-gnu/src'
    
  16. fanquake force-pushed on Nov 21, 2019
  17. fanquake commented at 3:39 pm on November 21, 2019: member

    I’ve updated this to include the dates, and removed the links from the PR / commit bodies.

    concept ACK can we remove some fallbacks from src/compat/glibc_compat.cpp?

    If we decide to do that, it wont be done as part of this PR.

    bitcoin-cli: export of symbol environ not allowed bitcoin-cli: export of symbol _environ not allowed

    Will look into this now.

  18. in contrib/devtools/symbol-check.py:24 in 41d029bd52 outdated
    24-# - libstdc++ version 4.4.5 (https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=libstdc%2B%2B6)
    25+# - g++ version 4.9.2 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=g%2B%2B)
    26+# - libc version 2.19 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=libc6)
    27 #
    28-# Ubuntu 10.04.4 (Lucid Lynx) has:
    29+# Ubuntu 16.04 (Xenial) EOL: 2024. https://help.ubuntu.com/community/EOL#Ubuntu_16.04_Xenial_Xerus
    


    MarcoFalke commented at 3:57 pm on November 21, 2019:
    0# Ubuntu 16.04 (Xenial) EOL: 2024. https://wiki.ubuntu.com/Releases
    
  19. laanwj commented at 8:17 am on November 22, 2019: member

    ACK

    Failure:

    This only increases the allowed versions in the symbol checker. I’m confused how it could make it detect a new exported symbol. Do you build with the same configuration as the gitian descriptors?

    (not that I think exporting __environ is very bad, I think it could be added to allowed symbols, but I don’t think it’s related to this PR)

  20. MarcoFalke commented at 1:21 pm on November 22, 2019: member

    Do you build with the same configuration as the gitian descriptors

    It should use the gitian descriptor of each commit, but they weren’t changed in between, so it shouldn’t matter either way.

  21. laanwj commented at 7:11 pm on November 22, 2019: member

    So the changes here cause an exported (not imported) symbol to be flagged? I’m really confused.

    Seems more likely that that was introduced in #17270 which added

    0//! Necessary on some platforms
    1extern char** environ;
    
  22. build: Disallow dynamic linking against c++ library
    Ever since statically linking Qt, we've been linking the C++ library
    statically too (-static-libstdc++). Take this into
    account in the symbol checker.
    b77d5ad59f
  23. build: Bump minimum versions in symbol checker
    Debian 8 (Jessie) has:
    - g++ version 4.9.2
    - libc version 2.19
    
    Ubuntu 16.04.4 (Xenial) has:
    - g++ version 5.3.1
    - libc version 2.23.0
    
    CentOS 7 has:
    - g++ version 4.8.5
    - libc version 2.17
    
    Taking the minimum of these as our target.
    According to the GNU ABI document this corresponds to:
    
    - GCC 4.8.5: GCC_4.8.0
    - (glibc)    GLIBC_2_17
    
    Co-Authored-By: fanquake <fanquake@gmail.com>
    16a7be1663
  24. fanquake force-pushed on Nov 22, 2019
  25. doc: add glibc 2.17 requirement to release-notes 8f15a31760
  26. fanquake removed the label Needs release note on Nov 22, 2019
  27. fanquake commented at 8:58 pm on November 22, 2019: member

    Discussed with @laanwj and the environ issue is going to be fixed separately from increasing the minimum required glibc version.

    Rebased, added a release note and fixed the nit from above.

  28. laanwj commented at 9:28 pm on November 22, 2019: member
    re-ACK 8f15a317602727d24f60d0bbf43f851b33df3228
  29. MarcoFalke added the label Needs gitian build on Nov 23, 2019
  30. DrahtBot commented at 9:10 am on November 24, 2019: member

    Gitian builds

    File commit 0b79caf658019de2c65a53c9e11fd1d2f4c369b6(master) commit d1a9b4635d57d0adf3b8f07a03592eb31e1c471a(master and this pull)
    bitcoin-0.19.99-osx-unsigned.dmg 2f8db30ccf876813... 5efeab24549cf448...
    bitcoin-0.19.99-osx64.tar.gz e692e7414fd60d08... eb3e7b0aa935caea...
    bitcoin-0.19.99-win64-debug.zip d5aac0d177e3dd19... 4346c2fc2d1fd81c...
    bitcoin-0.19.99-win64-setup-unsigned.exe 99e74ad4f140b9f8... b6ed84de64ed5f4b...
    bitcoin-0.19.99-win64.zip 5ee17a36809deed3... 33750c415b2a26fc...
    bitcoin-0.19.99.tar.gz 60c0d2b9351b2072... 3d09282f21183a14...
    bitcoin-core-osx-0.20-res.yml 496ef99b99af9cbc... 723605bb81b4e29b...
    bitcoin-core-win-0.20-res.yml e59bdc5fb20fdf13... 7820a3221d949c84...
    linux-build.log 3a0ebaaea4f04719... babce648e03f04f3...
    osx-build.log ac5e595f7863b747... 66d1c9051477389b...
    win-build.log 0e887a344ee447e9... cf72a25498201384...
    bitcoin-core-osx-0.20-res.yml.diff d414ea8cc5bf6ee7...
    bitcoin-core-win-0.20-res.yml.diff e07a6a821dba0333...
    linux-build.log.diff bc1dea1d2acac0f1...
    osx-build.log.diff 3780509d11991a98...
    win-build.log.diff 717598f5a37dfed3...
  31. DrahtBot removed the label Needs gitian build on Nov 24, 2019
  32. MarcoFalke referenced this in commit 7463181798 on Nov 24, 2019
  33. MarcoFalke merged this on Nov 24, 2019
  34. MarcoFalke closed this on Nov 24, 2019

  35. fanquake removed the label Needs Conceptual Review on Nov 25, 2019
  36. fanquake deleted the branch on Nov 25, 2019
  37. MarcoFalke referenced this in commit e6f167bfdf on Nov 25, 2019
  38. sidhujag referenced this in commit d8d6e00d8d on Nov 25, 2019
  39. sidhujag referenced this in commit 912a39b439 on Nov 25, 2019
  40. MarkLTZ referenced this in commit 1211cfa425 on Nov 29, 2019
  41. fanquake referenced this in commit dd157feed7 on Dec 12, 2019
  42. fanquake referenced this in commit 40101e5b81 on Dec 18, 2019
  43. fanquake referenced this in commit f7453dcc03 on Dec 31, 2019
  44. laanwj referenced this in commit 7a311fa54a on Jan 22, 2020
  45. kallewoof referenced this in commit 4888a90581 on Jan 23, 2020
  46. sidhujag referenced this in commit dc4da91312 on Jan 24, 2020
  47. amitiuttarwar referenced this in commit bad3d22a0a on Jan 28, 2020
  48. JeremyRubin referenced this in commit ef2926225b on Feb 7, 2020
  49. hebasto referenced this in commit b3e4942529 on Mar 22, 2020
  50. hebasto referenced this in commit 763b839fad on Mar 22, 2020
  51. hebasto referenced this in commit f642b49af7 on Mar 22, 2020
  52. HashUnlimited referenced this in commit 3db5bda34c on Apr 17, 2020
  53. laanwj referenced this in commit 5d18c0ae18 on May 13, 2020
  54. sidhujag referenced this in commit f2791f758f on May 14, 2020
  55. hebasto commented at 5:45 pm on August 16, 2020: member

    @fanquake @laanwj

    I’m confused with the commit 16a7be1663b02ddefa1e4f0309be49b725ffb388 “build: Bump minimum versions in symbol checker”.

    The commit message and PR title state that minimum version of glibc is 2.17 from now. From release notes:

    glibc 2.17 or greater is now required to run the release binaries.

    But the name of MAX_VERSIONS dictionary, and the ver <= max_versions[lib] in https://github.com/bitcoin/bitcoin/blob/ffad34816722cdf27a0a7c16539ddd1d655602e0/contrib/devtools/symbol-check.py#L175 convince me that 2.17 is the maximum allowed version of glibc symbols.

    Please help me to get the right idea on this.

    UPDATE: I got it. Sorry for noise.

  56. hebasto referenced this in commit 040d51c17d on Aug 24, 2020
  57. fanquake referenced this in commit c6b730dbfc on Aug 25, 2020
  58. sidhujag referenced this in commit 8e9b5a0862 on Aug 25, 2020
  59. sidhujag referenced this in commit 6a9f836f72 on Nov 10, 2020
  60. sidhujag referenced this in commit f569979667 on Nov 10, 2020
  61. sidhujag referenced this in commit 9766374435 on Nov 10, 2020
  62. fanquake referenced this in commit 52f0be3a93 on Mar 10, 2021
  63. laanwj referenced this in commit af6ee17545 on Mar 16, 2021
  64. backpacker69 referenced this in commit f68d109afb on Mar 28, 2021
  65. kittywhiskers referenced this in commit dc0e918126 on Aug 28, 2021
  66. UdjinM6 referenced this in commit a9c8a3d221 on Aug 30, 2021
  67. UdjinM6 referenced this in commit ccc223d231 on Aug 30, 2021
  68. PastaPastaPasta referenced this in commit bbc8623245 on Aug 31, 2021
  69. UdjinM6 referenced this in commit 38a36dedf4 on Sep 7, 2021
  70. PastaPastaPasta referenced this in commit b184989b4d on Sep 17, 2021
  71. thelazier referenced this in commit 45c6fd5823 on Sep 25, 2021
  72. fanquake referenced this in commit 6bde42e29e on Nov 17, 2021
  73. 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: 2024-12-19 03:12 UTC

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