[depends] Allow depends system to support armv7l #12474

pull hkjn wants to merge 1 commits into bitcoin:master from hkjn:fix-armv7-depends changing 3 files +5 −1
  1. hkjn commented at 1:12 PM on February 17, 2018: contributor

    Credit for the actual patches goes to @theuni, I just tested them on an armv7l machine.

    This change allows the depends system to build our dependencies on 32-bit ARM / armv7l architecture. I.e. with this patch, the following steps now builds fine:

    $ uname -m
    armv7l
    $ ./autogen.sh
    $ cd depends && make NO_QT=1 && cd ..
    $ ./configure --prefix=$(pwd)/depends/armv7l-unknown-linux-gnueabihf
    $ make
    

    Without this patch, the cd depends && make NO_QT=1 command fails on armv7l.

  2. fanquake added the label Build system on Feb 17, 2018
  3. hkjn force-pushed on Feb 17, 2018
  4. fanquake commented at 3:06 AM on February 19, 2018: member

    Travis failure on the arm-linux-gnueabihf build:

    Extracting openssl...
    /home/travis/build/bitcoin/bitcoin/depends/sources/openssl-1.0.1k.tar.gz: OK
    Preprocessing openssl...
    Configuring openssl...
    Configuring for 
    Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]
    pick os/compiler from:
    BC-32 BS2000-OSD BSD-generic32 BSD-generic64
    <snip>
    unixware-7-gcc vos-gcc vxworks-mips
    
    NOTE: If in doubt, on Unix-ish systems use './config'.
    make: *** [/home/travis/build/bitcoin/bitcoin/depends/work/build/arm-linux-gnueabihf/openssl/1.0.1k-e3fad431e69/./.stamp_configured] Error 1
    make: Leaving directory `/home/travis/build/bitcoin/bitcoin/depends'
    

    android-armv7 and linux-armv4 are listed in the snipped os/compiler options.

  5. hkjn force-pushed on Feb 19, 2018
  6. hkjn commented at 2:24 PM on February 19, 2018: contributor

    Indeed @fanquake, sorry about that, I had messed up one line in depends/packages/openssl.mk. Repushed d79ee76, hopefully Travis will be happier this time..

  7. theuni commented at 2:48 PM on February 19, 2018: member

    Disclaimer: these were quick hacks to see what it would take to build on non-x86, I'd prefer a change that's a little more obvious. Mind testing this instead of the first chunk?

    diff --git a/depends/Makefile b/depends/Makefile
    index 0ddd348e53..14e94ba453 100644
    --- a/depends/Makefile
    +++ b/depends/Makefile
    @@ -21,7 +21,6 @@ BUILD_ID_SALT ?= salt
     host:=$(BUILD)
     ifneq ($(HOST),)
     host:=$(HOST)
    -host_toolchain:=$(HOST)-
     endif
    
     ifneq ($(DEBUG),)
    diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk
    index 6f60d6b3fd..144e5f88b7 100644
    --- a/depends/hosts/default.mk
    +++ b/depends/hosts/default.mk
    @@ -1,3 +1,7 @@
    +ifneq ($(host),$(build))
    +host_toolchain:=$(host)-
    +endif
    +
     default_host_CC = $(host_toolchain)gcc
     default_host_CXX = $(host_toolchain)g++
     default_host_AR = $(host_toolchain)ar
    
  8. hkjn commented at 3:14 PM on February 19, 2018: contributor

    Sure @theuni, see second commit f8719f8. (Let me know also if you'd like me to close the PR if you want to take the change instead; I'll admit that at this stage no changes to the build system are particularly obvious to me. :))

    I'll squash commits into a single one (unless someone thinks there should be several) after review.

  9. theuni commented at 7:45 PM on February 19, 2018: member

    @hkjn thanks! This PR is fine. I assume the new change works fine for you? If so, looks good to me after squashing.

  10. hkjn force-pushed on Feb 20, 2018
  11. hkjn commented at 12:03 PM on February 20, 2018: contributor

    @theuni yup, this patch still fixes build system when using depends locally for me.

    I've squashed the commits.

  12. [depends] Allow depends system to support armv7l ac91ea64c2
  13. hkjn commented at 2:44 PM on February 20, 2018: contributor

    The last Travis failure seems unrelated; it's for x86_64, and the failing test is mempool_limit.py.

    I'll try rebasing to a later commit to trigger another build, as I'm not a member of the bitcoin org on github and can't start Travis builds directly..

  14. hkjn force-pushed on Feb 20, 2018
  15. theuni commented at 5:26 PM on February 20, 2018: member

    Thanks! utACK ac91ea64c2b1daec8fee0bfde443c18cf87595ae @laanwj unfortunately this will cause PRs to rebuild depends. It may be helpful to merge changes like these on a Friday afternoon to help with Travis slow-downs.

  16. laanwj added this to the milestone 0.16.1 on Feb 23, 2018
  17. laanwj added the label Needs backport on Feb 23, 2018
  18. laanwj commented at 4:12 PM on February 23, 2018: member

    @theuni OK, as it is Friday afternoon (Dutch time) will merge it now. Also seems to make sense to backport to 0.16, and as 0.16.0 has been tagged I'll do that immediately too.

  19. laanwj merged this on Feb 23, 2018
  20. laanwj closed this on Feb 23, 2018

  21. laanwj referenced this in commit 28b8061d9f on Feb 23, 2018
  22. laanwj referenced this in commit b0f692f81e on Feb 23, 2018
  23. laanwj removed the label Needs backport on Feb 23, 2018
  24. hkjn deleted the branch on Feb 26, 2018
  25. HashUnlimited referenced this in commit 0300f9b26c on Mar 16, 2018
  26. UdjinM6 referenced this in commit 04d1671b9c on Jan 5, 2019
  27. CryptoCentric referenced this in commit b0d26543f8 on Jul 11, 2019
  28. DrahtBot locked this on Sep 8, 2021

Milestone
0.16.1


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-28 06:15 UTC

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