-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Closed
Copy link
Labels
Description
On the latest Alpine Linux release (3.10), there are build issues which prevent compilation for two packages:
- openssl (known issue w/
termio
which is fixed in later versions) - zeromq (4.3.1 patch is too fuzzy for Alpine
patch
)
To reproduce this issue and the fix, clone this repo on Alpine 3.10, cd depends && make NO_QT=1
. By solving these 2 items, the depends system builds without issue on Alpine and I've been able to compile the Bitcoin binaries without issue as well.
Expected behavior
Dependencies should build without an issue.
Actual behavior
OpenSSL termio header not found:
gcc -m64 -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -DOPENSSL_THREADS -D_REENTRANT -pipe -O2 -I/home/alpine/bitcoin/depends/x86_64-pc-linux-gnu/include -fPIC -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -c -o ui_openssl.o ui_openssl.c
ui_openssl.c:232:11: fatal error: termio.h: No such file or directory
# include <termio.h>
^~~~~~~~~~
compilation terminated.
ZeroMQ patch won't apply:
make zeromq
Preprocessing zeromq...
patching file src/windows.hpp
Possibly reversed hunk 1 at 105
Hunk 1 FAILED 58/58.
#include <winsock2.h>
#include <windows.h>
#include <mswsock.h>
+
+#if defined __MINGW64_VERSION_MAJOR && __MINGW64_VERSION_MAJOR < 4
+// Workaround for mingw-w64 < v4.0 which did not include ws2ipdef.h in iphlpapi.h.
+// Fixed in mingw-w64 by 9bd8fe9148924840d315b4c915dd099955ea89d1.
+#include <ws2def.h>
+#include <ws2ipdef.h>
+#endif
#include <iphlpapi.h>
#if !defined __MINGW32__
make: *** [funcs.mk:254: /home/alpine/bitcoin/depends/work/build/x86_64-pc-linux-gnu/zeromq/4.3.1-41472d87c95/.stamp_preprocessed] Error 1
To reproduce
In Alpine Linux 3.10:
apk update
apk add git cmake make curl gcc g++ perl automake autoconf libtool pkgconfig python3
git clone https://github.com/bitcoin/bitcoin.git && cd bitcoin
cd depends
make NO_QT=1
System information
This is on the master
branch as of commit f8b0b19.
Machine specs:
- OS: Alpine Linux 3.10
- CPU/RAM: AWS m5.8xlarge
- Disk size: 80 GB
- Disk Type (HD/SDD): EBS volume
cat /etc/alpine-release
3.10.2
ch4ot1c