Skip to content

build: Alpine portability issues #32512

@fanquake

Description

@fanquake

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions