src/randomenv.cpp: fix uclibc build #23030

pull ffontaine wants to merge 1 commits into bitcoin:master from ffontaine:master changing 1 files +1 −1
  1. ffontaine commented at 9:42 PM on September 18, 2021: contributor

    Don't include sys/auxv.h if HAVE_STRONG_GETAUXVAL is not defined to avoid a build failure on uclibc

    Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

  2. src/randomenv.cpp: fix uclibc build
    Don't include sys/auxv.h if HAVE_STRONG_GETAUXVAL is not defined to
    avoid a build failure on uclibc
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
    68a568fefb
  3. MarcoFalke commented at 7:14 AM on September 19, 2021: member

    This was added by you to fix a build failure on uclibc in 330cb33985d0ce97c20f4a0f0bbda0fbffe098d4

  4. ffontaine commented at 7:57 AM on September 19, 2021: contributor

    I know, I replaced #ifdef __linux__ by #if defined(HAVE_STRONG_GETAUXVAL) || defined(HAVE_WEAK_GETAUXVAL) but defined(HAVE_WEAK_GETAUXVAL) should be removed as uclibc-ng don't have sys/auxv.h. I didn't notice this mistake until now because there was no build failure. However, the build fails now that those symbols are correctly defined in configure by https://github.com/bitcoin/bitcoin/commit/41a413b31746cc749f3c64ed8070cea9cc6cfdbe.

  5. laanwj commented at 12:43 PM on September 20, 2021: member

    I wonder if it's time to get rid of HAVE_WEAK_GETAUXVAL. I think it's confusing. Either we build against a C library that has this functionality, or not. We don't do this weak linking thing for any other symbols and recently got rid of the other glibc backwards compatibility stuff.

    Unless there is still a current platform that really needs it (Android?), I'd prefer to remove it from the build system, it has caused enough issues.

  6. fanquake commented at 9:44 AM on September 23, 2021: member

    Unless there is still a current platform that really needs it (Android?), I'd prefer to remove it from the build system, it has caused enough issues.

    Had a look at this. The Android NDK docs claim that you can use getauxval() beginning with API level 18 and later. However the docs in crc32c_arm64_check.h claim: https://github.com/bitcoin/bitcoin/blob/86c3b84388813c9d6cab6031bc36d87a8a169fee/src/crc32c/src/crc32c_arm64_check.h#L23

    Although, both of those may be irrelevant, given we are moving to using std::filesystem. Support for that only landed in NDK 22, so we should be able to assume getauxval() availability?

  7. laanwj commented at 1:43 PM on September 23, 2021: member

    Although, both of those may be irrelevant, given we are moving to using std::filesystem. Support for that only landed in NDK 22, so we should be able to assume getauxval() availability?

    Thanks for checking! Yes, that makes sense.

  8. fanquake referenced this in commit 4446ef0a54 on Sep 24, 2021
  9. fanquake commented at 6:53 AM on September 28, 2021: member

    I'm going to close this in favour of #23082. @ffontaine can you test that PR against uclibc-ng?

  10. fanquake closed this on Sep 28, 2021

  11. laanwj referenced this in commit 7f81f5459f on Sep 30, 2021
  12. sidhujag referenced this in commit 068ba9dc4e on Sep 30, 2021
  13. rebroad referenced this in commit 653de38f4b on Oct 13, 2021
  14. janus referenced this in commit 88cc764415 on Nov 11, 2021
  15. DrahtBot locked this on Oct 30, 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 21:14 UTC

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