build: Alpine portability issues #32512

issue fanquake opened this issue on May 15, 2025
  1. fanquake commented at 1:07 PM on May 15, 2025: member

    Currently, when building on Alpine Linux, the build might fail in the following ways:

    x86_64 && aarch64

    /bitcoin/depends/work/build/x86_64-pc-linux-musl/native_capnp/1.1.0-725f3670538/src/kj/mutex.c++:37:10: fatal error: linux/futex.h: No such file or directory
       37 | #include <linux/futex.h>
          |          ^~~~~~~~~~~~~~~
    compilation terminated.
    
    /bitcoin/depends/work/build/x86_64-pc-linux-musl/qt/6.7.3-be399392c6d/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:64:12: fatal error: linux/fs.h: No such file or directory
       64 | #  include <linux/fs.h>
          |            ^~~~~~~~~~~~
    compilation terminated.
    
    /bitcoin/src/common/netif.cpp:16:10: fatal error: linux/rtnetlink.h: No such file or directory
       16 | #include <linux/rtnetlink.h>
          |          ^~~~~~~~~~~~~~~~~~~
    

    aarch64

    /bitcoin/src/crypto/sha256.cpp:19:10: fatal error: asm/hwcap.h: No such file or directory
       19 | #include <asm/hwcap.h>
          |          ^~~~~~~~~~~~~
    compilation terminated.
    

    These are all due to missinglinux-headers (which are not installed by default). They can be installed with apk add linux-headers.

    We don't currently have any Alpine build docs, so they could be added, with a note about needing the headers being required, or, the code could be changed.

  2. fanquake added the label Build system on May 15, 2025
  3. fanquake closed this on Aug 1, 2025

  4. fanquake referenced this in commit b8025b30cc on Aug 1, 2025

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-22 18:12 UTC

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