Commit Graph

96 Commits

Author SHA1 Message Date
Carl Dong
c1ae726a13 guix: More thoroughly control native toolchain 2021-04-05 11:00:39 -04:00
Hennadii Stepanov
ec76bad655
build, qt: Fix static builds on macOS Big Sur
See details and the patch: https://bugreports.qt.io/browse/QTBUG-87014
2021-03-25 03:17:40 +02:00
Wladimir J. van der Laan
23b15601df
Merge #17227: Qt: Add Android packaging support
246774e264 depends: fix Qt precompiled headers bug (Igor Cota)
8e7ad4146d depends: disable Qt Vulkan support on Android (Igor Cota)
ba46adaa1a CI: add Android APK build to cirrus (Igor Cota)
7563720e30 CI: add Android APK build script (Igor Cota)
ebfb10cb75 Qt: add Android packaging support (Igor Cota)

Pull request description:

  ![bitcoin-qt](https://user-images.githubusercontent.com/762502/67396157-62f3d000-f5a7-11e9-8a6f-9425823fcd6c.gif)
  This PR is the third and final piece of the basic Android support puzzle - it depends on https://github.com/bitcoin/bitcoin/pull/16110 and is related to https://github.com/bitcoin/bitcoin/pull/16883. It introduces an `android` directory under `qt` and a simple way to build an Android package of `bitcoin-qt`:

  1. Build depends for Android as described in the [README](https://github.com/bitcoin/bitcoin/blob/master/depends/README.md)
  2. Configure with one of the resulting prefixes
  3. Run `make && make apk` in `src/qt`

  The resulting APK files will be in `android/build/outputs/apk`. You can install them manually or with [adb](https://developer.android.com/studio/command-line/adb). One can also open the `android` directory in Android Studio for that integrated development and debugging experience. `BitcoinQtActivity` is your starting point.

  Under the hood makefile `apk` target:

  1. Renames the `bitcoin-qt` binary to `libbitcoin-qt.so` and copies it over to a folder under `android/libs` depending on which prefix and corresponding [ABI](https://developer.android.com/ndk/guides/abis.html#sa) `bitcoin-qt` was built for
  2. Takes `libc++_shared.so` from the Android NDK and puts in the same place. It [must be included](https://developer.android.com/ndk/guides/cpp-support) in the APK
  3. Extracts Qt for Android Java support files from the `qtbase` archive in `depends/sources` to `android/src`

  There is also just a tiny bit of `ifdef`'d code to make the Qt Widgets menus usable. It's not pretty but it works and is a stepping stone towards https://github.com/bitcoin/bitcoin/pull/16883.

ACKs for top commit:
  MarcoFalke:
    cr ACK 246774e264
  laanwj:
    Code review ACK 246774e264

Tree-SHA512: ba30a746576a167545223c35a51ae60bb0838818779fc152c210f5af1413961b2a6ab6af520ff92cbc8dcd5dcb663e81ca960f021218430c1f76397ed4cead6c
2021-03-24 19:02:01 +01:00
fanquake
180dc3c886
build: miniupnpc 2.2.2
Creating the dll subdir is no-longer required.
We can also drop our wingen patch.
2021-03-23 08:39:16 +08:00
Igor Cota
246774e264 depends: fix Qt precompiled headers bug
Fixed in 5.14, see QTBUG-85214
2021-03-21 22:33:35 +01:00
fanquake
550ed1bed2
build: update qt qpaint non determinism patch for 5.12.10 2021-03-10 12:57:27 +08:00
fanquake
6093ae4d30
build: update qt no-xlib patch for 5.12.10 2021-03-10 12:57:27 +08:00
fanquake
84928c4e73
build: update qt android jni static patch for 5.12.10 2021-03-10 12:57:27 +08:00
fanquake
cc6f47d51a
build: update qt lrelease patch for 5.12.10 2021-03-10 12:57:27 +08:00
Hennadii Stepanov
286d07ff17
build, qt: Fix lib paths in *.pc files
See:
- QTBUG-72903, commit 9864d2c6f3b628ca9f07a56b197e77bd43931cca
- QTBUG-78873, commit e55a61a77f0c87c05661a0335dfdb12673c6a27f

Could be dropped for Qt 5.14+.
2021-03-10 12:57:27 +08:00
fanquake
fa5e97e8c2
build: disable qt SDK version checking
This tries to invoke xcrun, which is not available when cross-compiling.
Given we are in control of the SDK versions being used, removing this
check has minimal-no effect.
2021-03-10 12:57:26 +08:00
fanquake
06cd0da21f
build: qt 5.12.10
remove fix_configure_mac.patch
Fixed upstream: https://bugreports.qt.io/browse/QTBUG-67286

remove fix_riscv64_arch.patch
Was fixed upstream in 6a39e49a6cdeb28a04a3657bb6a22f848d5dfa9d

remove fix_rcc_determinism.patch
Fixed upstream in https://bugreports.qt.io/browse/QTBUG-62511

remove freetype_back_compat.patch
By the time we ship a release with Qt 5.12, we'll certainly no-longer be
supporting Ubuntu 14.04 and Ubuntu 16.04 ships with FreeType 2.6.1,
which is new enough that using the symbol is no-longer an issue.
The renaming of FT_Get_X11_Font_Format() happened in FreeType 2.6

remove xkb-default.patch
This was removed upstream in d5abf545971da717014d316127045fc19edbcd65

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2021-03-10 12:57:22 +08:00
MarcoFalke
34322b7f5c
Merge #20842: docs: consolidate typo & url fixing
1112035d32 doc: fix various typos (Ikko Ashimine)
e8640849c7 doc: Use https URLs where possible (Sawyer Billings)

Pull request description:

  Consolidates / fixes the changes from #20762, #20836, #20810. There is no output when  `test/lint/lint-all.sh` is run.

  Closes #20807.

ACKs for top commit:
  MarcoFalke:
    ACK 1112035d32

Tree-SHA512: 22ca824688758281a74e5ebc6a84a358142351434e34c88c6b36045d2d241ab95fd0958565fd2060f98317e62e683323b5320cc7ec13592bf340e6922294ed78
2021-01-05 11:53:20 +01:00
Pieter Wuille
a0eb4c551e Revert "Add patch to make codesign_allocate compatible with Apple's"
This reverts commit a4118c6e20.
2021-01-04 16:35:18 -08:00
Ikko Ashimine
1112035d32
doc: fix various typos
Co-authored-by: Peter Yordanov <ppyordanov@yahoo.com>
2021-01-04 12:31:31 +08:00
Wladimir J. van der Laan
816314ef0f
Merge #20644: Add patch to make codesign_allocate compatible with Apple's
a4118c6e20 Add patch to make codesign_allocate compatible with Apple's (Pieter Wuille)

Pull request description:

  This is an alternative to #20638.

  The problem is that Apple's codesign(_allocate) apparently rounds the "vmsize" attribute on the __LINKEDIT section to a multiple of 0x2000 on x86_64 rather than 0x1000 (as their published source code does). This divergence means that the binary signed by codesign is slightly different from the one recreated by our reattach-sig-to-gitian-output process, and the signature being invalid.

  This fixes it by patching our codesign_allocate source code to also use 0x2000. In tests, this appears to result in matching binaries.

ACKs for top commit:
  jonasschnelli:
    Tested ACK a4118c6e20 - removed the osx cache, built commit a4118c6e20 for osx in gitian (dependency where built, patch was applied), signed on my signing mac (detach-sig-create), ran gitian osx signer with the produces signature and the a4118c6e20 build (detach-sig-apply), signature then was successful verified on my Mac (codesign -v /Volumes/Bitcoin-Core/Bitcoin-Qt.app)
  MarcoFalke:
    Concept ACK a4118c6e20

Tree-SHA512: 07b8cdf8216249ddfe4bd38b39f2b48b2e190d4002b84d8981e62197bbbc9f25ac5c137bcc32057b23fbf38cbb2889ef95101ce008edfbf608cd170b88b3acbc
2020-12-17 21:34:35 +01:00
fanquake
7587d11ec9 build: remove cdrkit package from depends 2020-12-16 12:29:14 -05:00
Pieter Wuille
a4118c6e20 Add patch to make codesign_allocate compatible with Apple's 2020-12-13 12:20:39 -08:00
fanquake
31c9987976
Merge #20447: depends: Patch qt_intersect_spans to avoid non-deterministic behavior in LLVM 8
8f7d1b39ef Fix QPainter non-determinism on macOS (Andrew Chow)

Pull request description:

  Aplies a patch to Qt that fixes the non-determinism by modifying Qt. The source of the non-determinism is how LLVM 8 optimizes qt_intersect_spans when compiling. The particular optimization that seems to be causing the problems is that a temp variable is being added for spans->y. For some reason, when it does this, it chooses different instructions to use when making that variable. We bypass this problem by patching qt_intersect_spans to always make and use this local variable.

  Potential alternative to #20436 and #20440

ACKs for top commit:
  hebasto:
    re-ACK 8f7d1b39ef ~for merging into the 0.21 branch, but [not into the master](https://github.com/bitcoin/bitcoin/pull/20454) branch.~
  fanquake:
    ACK 8f7d1b39ef

Tree-SHA512: b0d00a77643554021736524fb64611462ef2ec849a220543c12d99edb0f52f2e8128d2cc61fa82176b7e13b294574774a92d6b649badf8b7630c6d6a7e70ce10
2020-11-24 21:12:02 +08:00
Carl Dong
a57b498560
depends: boost: Bump to 1.71.0 2020-11-23 15:50:53 -05:00
Andrew Chow
8f7d1b39ef Fix QPainter non-determinism on macOS
Aplies a patch to Qt that fixes the non-determinism by modifying Qt. The
source of the non-determinism is how LLVM 8 optimizes qt_intersect_spans
when compiling. The particular optimization that seems to be causing the
problems is that a temp variable is being added for spans->y. For some
reason, when it does this, it chooses different instructions to use when
making that variable. We bypass this problem by patching
qt_intersect_spans to always make and use this local variable.
2020-11-23 12:08:18 -05:00
fanquake
e1f2553e11
build: remove global_init_link_order from mac qt qmake.conf
This has been around since the original import of Qt
(38be0d13830efd2d98281c645c3a60afe05ffece), however there
are now only two instatnces of it left in the qt codebase,
and from what I can gather, it's unused.
2020-11-14 08:54:24 +08:00
fanquake
bfd7e33b4b
build: remove plugin_no_soname from mac qt qmake.conf
plugin_no_soname was removed from Qt some time ago, see upstream commit
1d034244c261520d5e739534dc264c2500e02b5f. It was replaced with
plugin_with_soname, however that is currently only used (as of 5.15.x)
in the Android Clang mkspec.
2020-11-14 08:54:24 +08:00
fanquake
fdde4c7ce6
build: pass XCODE_VERSION through to qt macOS cross compile conf
This should mostly be a no-op, however it would seem to make more sense
that we pass through the XCODE_VERSION we now have in depends, rather
than leaving the version set to 4.3.
2020-11-14 08:54:24 +08:00
fanquake
49473ef211
build: convert "echo" usage into a patch in qt package 2020-11-14 08:54:17 +08:00
fanquake
f07fb5a55e
build: patch qt libpng to fix powerpc build
This is an alternative to #19751 that fixes the build without requiring
splitting out libpng. This patch can be dropped once we are building qt
5.12.0 or later.
2020-09-15 21:48:59 +08:00
fanquake
3de365e4f1
build: replace wingenminiupnpcstrings sed with a patch in miniupnpc package
We should be able to drop this once we are using 2.1 or later. See
upstream commit: 9663c55c61408fdcc39a82987d2243f816b22932.
2020-08-26 11:27:31 +08:00
fanquake
bbc01a753d
build: replace qtranslations lrelease sed with a patch in qt package 2020-08-26 11:27:12 +08:00
fanquake
c723e4176e
build: replace FreeType back-compat sed with a patch in qt package 2020-08-25 14:37:45 +08:00
fanquake
3aaa39d436
build: replace pwd sed in qt package with a patch 2020-08-25 14:37:45 +08:00
fanquake
4af59a407a
build: use patch rather than sed in zeromq package 2020-08-25 14:37:44 +08:00
fanquake
cc107a3af1
build: use patch rather than sed in native_cctools package 2020-08-25 14:37:44 +08:00
fanquake
865cb23a48
build: use patch rather than sed in fontconfig package 2020-08-25 14:37:35 +08:00
fanquake
335bd7f8bc
build: use patch rather than sed in Boost package
The depends comment is actually incorrect, and this can be dropped once
we move to 1.71.0 or later.
2020-08-25 13:19:56 +08:00
fanquake
f36140d00c
build: use patch rather than sed in bdb package 2020-08-25 13:19:55 +08:00
fanquake
c6b730dbfc
Merge #18405: build: Drop all of the ZeroMQ patches
f642b49af7 build: Drop ZeroMQ patch for glibc < 2.12 (Hennadii Stepanov)
079df9609e build: Drop ZeroMQ patch for Mingw-w64 < 4.0 (Hennadii Stepanov)

Pull request description:

  This PR gets rid of the all patches for ZeroMQ:
  - the [Mingw-w64 5.0 (Ubuntu 18.04 bionic)](https://packages.ubuntu.com/bionic/mingw-w64) is used to build the [Windows](https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md) binaries
  - it is safe to use `pthread_setname_np` since #17538 when the minimal `glibc` version is set to 2.17; see: https://github.com/bitcoin/bitcoin/pull/11986#issuecomment-366105050

ACKs for top commit:
  fanquake:
    ACK f642b49af7.

Tree-SHA512: a2c97cdb682cd7d96a666ad099f20725a32bf8fda0842fc5534ca08a1634c90ba80afde92f9054595ed2501fbc5c02abbe3da765934ecff12d836ff25e277fc5
2020-08-25 10:26:16 +08:00
Luke Dashjr
03e056edcd
depends: Patch libevent build to fix IPv6 -rpcbind on Windows
libevent uses getaddrinfo when available, and falls back to gethostbyname
Windows has both, but gethostbyname only supports IPv4
libevent fails to detect Windows's getaddrinfo due to not including the right headers
This patches libevent's configure script to check it correctly
2020-06-25 10:23:54 +08:00
Hennadii Stepanov
f642b49af7
build: Drop ZeroMQ patch for glibc < 2.12
It is safe to use pthread_setname_np since #17538 when the minimal glibc
version is set to 2.17.
2020-03-22 21:27:56 +02:00
Hennadii Stepanov
079df9609e
build: Drop ZeroMQ patch for Mingw-w64 < 4.0
The Mingw-w64 5.0 (Ubuntu 18.04 Bionic) is used to build the Windows
binaries now.
2020-03-22 21:26:39 +02:00
Hennadii Stepanov
492971de35
build: Fix mingw pkgconfig file and dependency naming
This change adds the correct suffix to debug mode .pc filenames for
MinGW and also to the Qt libraries listed in the `Requires` field.
The filename adjustment fixes the accidental overwriting of release
mode .pc files with the debug mode variant which required the wrong
variant of the libraries when `debug_and_release` is active.
Note that macOS also supports the `debug_and_release' configuration
but may use the regular library names together with DYLD_IMAGE_SUFFIX.
Creation of *_debug.pc files is turned off as they're identical to their
non-debug counterparts.
More info:
- QTBUG-4155
- Qt commit a0d8fb4ac3cb7bafdb39f340055eacee4f957513
2020-03-09 02:02:31 +02:00
fanquake
ca5055a5aa
depends: native_cctools 921, ld64 409.12, libtapi 1000.10.8
This also removes the obsolete mlinker-version option

Co-Authored-By: Cory Fields <cory-nospam-@coryfields.com>
2020-02-03 19:49:46 +08:00
Wladimir J. van der Laan
6496bb87af
Merge #17008: build: bump libevent to 2.1.11 in depends
02ac445b2f bump libevent to 2.1.11 in depends (stefanwouldgo)

Pull request description:

  this doesn't need patches on Android anymore like 2.1.8 did.

ACKs for top commit:
  laanwj:
    ACK 02ac445b2f

Tree-SHA512: 1fbfe342ee15fa4c5cb417979bd6c443f7c7aa40a489accf8ccd7c919e5b08e859b3da6edeee3de484f6f156b35dd4e97c7e2c7971b59fc31029865585ccb296
2019-11-20 12:27:10 +01:00
fanquake
648b2e3c32
depends: remove OpenSSL package 2019-11-18 08:56:47 -05:00
stefanwouldgo
02ac445b2f bump libevent to 2.1.11 in depends
this doesn't need patches on Android anymore like 2.1.8 did.
2019-11-04 16:45:34 +01:00
Wladimir J. van der Laan
91fbcf41b3
Merge #16110: depends: Add Android NDK support
f9af3ced1c Android: add all arch support (Block Mechanic)
d419ca7e32 depends: export dynamic JNI symbols from static qtforandroid.a (Igor Cota)
ed30684d03 Qt: patch androidjnimain.cpp to make sure JNI is initialised when statically compiled (Igor Cota)
e4c319e8a1 builds: remove superfluous config_opts_aarch64_android (Igor Cota)
24ffef0c27 Patch libevent when building for Android (fix arc4random_addrandom) (Igor Cota)
f1e40b3e71 Update bitcoin_qt.m4 (BlockMechanic)
b4057d8261 Define TARGET_OS when host is android (Igor Cota)
80b475f159 Fix Android zlib cross compilation issue (https://stackoverflow.com/questions/21396988/zlib-build-not-configuring-properly-with-cross-compiler-ignores-ar) (Igor Cota)
45f8219015 Add full Android build example command and instructions on getting SDK/NDK (Igor Cota)
b68f2a68c2 Add config opts and patch for aarch64_android build of Qt (Igor Cota)
9c4cb0166e Add ranlib to android.mk hosts file (fix OSX Android NDK build) (Igor Cota)
c2a749c9c1 Add example Android host-platform-triplet and options (Igor Cota)
0b0cff3c61 Add support for building Android dependencies (Igor Cota)

Pull request description:

  This allows one to build the dependencies with the Android SDK and goes towards fixing #11844. It has been tested to work with:
  `make HOST=aarch64-linux-android ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=/home/user/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin NO_QT=1 NO_WALLET=1`

ACKs for top commit:
  Sjors:
    ACK f9af3ce. I'm OK with merging and then improving later.

Tree-SHA512: cb805115ebe5c9e33db2bf3eab8628808fe3f50052053d8877d8b8e4406d6fea1ed9e5c4dff85d777fb99c81be6ffb9d95a0e6d32344e728e5e0da6c653e2ce7
2019-11-04 13:32:19 +01:00
Igor Cota
ed30684d03 Qt: patch androidjnimain.cpp to make sure JNI is initialised when statically compiled 2019-10-12 12:49:25 +02:00
fanquake
9192ce5d63
depends: pull upstream libdmg-hfsplus changes 2019-10-09 10:41:51 -04:00
Wladimir J. van der Laan
df692600c6
Merge #16927: depends: Refresh ZeroMQ 4.3.1 patch
463a1d5244 Refresh ZeroMQ 4.3.1 patch (Nathan Marley)

Pull request description:

  Currently in Alpine Linux (latest, 3.10) in the depends system, one of the ZeroMQ patches won't apply cleanly because the context around the patch has changed and Alpine's `patch` implementation can't handle the diff.

  Some patch implementations can't handle fuzz / too much divergence from the original code.

  This PR just tweaks the context code around the patch so that less-sophisticated patch implementations (such as on Alpine Linux) can apply the patch without errors.

  This partially fixes #16925

ACKs for top commit:
  fanquake:
    ACK 463a1d5244 - Tested building zeromq in depends inside an [Alpine container](https://github.com/fanquake/core-review/blob/master/docker/alpine.dockerfile) as well as on macOS.

Tree-SHA512: d6e3cb60835cdd090b9b864ca9cb33961687606bc9184fbbeb7a54ec23db4057b9317b65c5c276fb8c5492cb3cfcc4a7f3369f049551f4eb0915db971f2290ce
2019-09-30 11:35:50 +02:00
Igor Cota
24ffef0c27 Patch libevent when building for Android (fix arc4random_addrandom) 2019-09-22 18:33:51 +02:00
Nathan Marley
568aa0cf83 Add OpenSSL termios fix for musl libc 2019-09-20 14:47:06 -03:00