doc: add alpine build instructions #32559

pull willcl-ark wants to merge 2 commits into bitcoin:master from willcl-ark:alpine-build-docs changing 2 files +52 −0
  1. willcl-ark commented at 9:49 am on May 19, 2025: member

    Closes: #32512

    • Provide Alpine build instructions in build-unix.md.
    • Instructions cover building all components except USDT, which requires some libc-specific functionality.
  2. DrahtBot commented at 9:49 am on May 19, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32559.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  3. DrahtBot added the label Docs on May 19, 2025
  4. in doc/build-unix.md:148 in 5937bc78ae outdated
    143+
    144+#### Dependency Build Instructions
    145+
    146+Build requirements:
    147+
    148+    apk add build-base cmake libressl libtool linux-headers python3
    


    hebasto commented at 10:59 am on May 19, 2025:
    Why libtool?

    hebasto commented at 11:01 am on May 19, 2025:
    I’d add pkgconf.

    fanquake commented at 11:43 am on May 19, 2025:
    libressl ?

    willcl-ark commented at 9:19 am on May 20, 2025:

    Crikey that’s an old hangover….

    I ported initial requirements from my current Alpine Dockerfile

    I foolishly assumed this was just the case of Alpine splitting packages more granularly that e.g. Ubuntu, but taking a closer look now suspect this is a hangover from pre 0.12 where we supported SSL on RPC?

    Removed in 5332082d009


    willcl-ark commented at 9:19 am on May 20, 2025:
    Thanks, dropped libtool and added pkgconf
  5. willcl-ark force-pushed on May 20, 2025
  6. doc: add alpine build instructions 5332082d00
  7. willcl-ark force-pushed on May 20, 2025
  8. in depends/README.md:58 in 030c06562c outdated
    52@@ -53,6 +53,21 @@ To build dependencies for the current arch+OS:
    53 
    54     gmake
    55 
    56+### Alpine
    57+
    58+    apk add bash build-base cmake curl m4 make patch
    


    fanquake commented at 3:54 pm on May 20, 2025:
    Don’t think you need m4 here?

    willcl-ark commented at 6:41 pm on May 20, 2025:
    Verified correct. thanks
  9. in depends/README.md:69 in 030c06562c outdated
    64+To build dependencies for the current arch+OS:
    65+
    66+    make
    67+
    68+> [!TIP]
    69+> Avoid parallel build jobs when building depends on Alpine.
    


    luke-jr commented at 6:22 pm on May 20, 2025:
    Why?

    fanquake commented at 6:24 pm on May 20, 2025:
    Can be dropped after #32568.

    fanquake commented at 10:03 am on June 4, 2025:
    #32568 landed.

    willcl-ark commented at 10:08 am on June 4, 2025:
    Dropped in 64986e1a44e108628b245ca977d2b8eb69ed5580
  10. willcl-ark force-pushed on May 20, 2025
  11. doc: add alpine depends build instructions 64986e1a44
  12. willcl-ark force-pushed on Jun 4, 2025
  13. willcl-ark marked this as ready for review on Jun 4, 2025
  14. in doc/build-unix.md:152 in 64986e1a44
    147+
    148+    apk add build-base cmake linux-headers pkgconf python3
    149+
    150+Now, you can either build from self-compiled [depends](#dependencies) or install the required dependencies:
    151+
    152+    apk add libevent-dev boost-dev
    


    hebasto commented at 4:04 pm on June 27, 2025:
    FWIW, linux-headers is a dependency of boost-dev on my system.
  15. in depends/README.md:66 in 64986e1a44
    61+
    62+    apk add bison linux-headers ninja-build pkgconf python3 xz
    63+
    64+To build dependencies for the current arch+OS:
    65+
    66+    make
    


    hebasto commented at 4:09 pm on June 27, 2025:
    not even a nit: gmake, which explicitly refers to GNU Make, also works.
  16. in doc/build-unix.md:165 in 64986e1a44
    160+ZMQ dependencies (provides ZMQ API):
    161+
    162+    apk add zeromq-dev
    163+
    164+User-Space, Statically Defined Tracing (USDT) is not directly compatible on
    165+Alpine as it uses libc functionality not available on musl.
    


    hebasto commented at 4:12 pm on June 27, 2025:

    However, depends build the systemtap package. The subsequent configuration results in:

    0# cmake -B build --toolchain depends/x86_64-pc-linux-musl/toolchain.cmake
    1<snip>
    2  USDT tracing ........................ ON
    3<snip>
    

    And the build succeeds.

    cc @0xB10C

  17. in depends/README.md:62 in 64986e1a44
    57+
    58+    apk add bash build-base cmake curl make patch
    59+
    60+Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
    61+
    62+    apk add bison linux-headers ninja-build pkgconf python3 xz
    


    hebasto commented at 4:37 pm on June 27, 2025:
    1. I think we should consider a note from apk:
    0Executing ninja-build-1.12.1-r1.post-install
    1* this only installs ninja to /usr/lib/ninja-build/bin/ninja
    2* add that to your path to use it, or invoke it directly.
    3* for most uses, you want samurai instead:
    4*  $ apk add samurai
    5* which has a "ninja" executable compatible with ninja.
    

    and install samurai. Otherwise, Qt still complains:

    0CMake Warning at qtbase/cmake/QtBuildHelpers.cmake:12 (message):
    1  The officially supported CMake generator for building Qt is Ninja / Ninja
    2  Multi-Config.  You are using: 'Unix Makefiles' instead.  Thus, you might
    3  encounter issues.  Use at your own risk.
    
    1. Is xz really necessary?
  18. hebasto commented at 4:39 pm on June 27, 2025: member
    Tested 64986e1a44e108628b245ca977d2b8eb69ed5580 on Alpine Linux v3.22.

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: 2025-07-13 12:13 UTC

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