build: Alpine portability issues #32512

issue fanquake openend 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

    0/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
    1   37 | #include <linux/futex.h>
    2      |          ^~~~~~~~~~~~~~~
    3compilation terminated.
    
    0/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
    1   64 | #  include <linux/fs.h>
    2      |            ^~~~~~~~~~~~
    3compilation terminated.
    
    0/bitcoin/src/common/netif.cpp:16:10: fatal error: linux/rtnetlink.h: No such file or directory
    1   16 | #include <linux/rtnetlink.h>
    2      |          ^~~~~~~~~~~~~~~~~~~
    

    aarch64

    0/bitcoin/src/crypto/sha256.cpp:19:10: fatal error: asm/hwcap.h: No such file or directory
    1   19 | #include <asm/hwcap.h>
    2      |          ^~~~~~~~~~~~~
    3compilation 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


fanquake

Labels
Build system


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

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