Commit Graph

391 Commits

Author SHA1 Message Date
Hennadii Stepanov
6a1f98f253
build, qt: Drop lrelease dependency patch
It is no longer required after switching to Qt top-level build.
2021-06-15 21:31:09 +03:00
Hennadii Stepanov
39e561e087
build, qt: Add linguist_tools list 2021-06-15 21:23:16 +03:00
Hennadii Stepanov
27d3def1c6
build: Use Qt top-level build facilities 2021-06-15 21:23:16 +03:00
Hennadii Stepanov
d1d1cc9831
build, qt: Fix compiling qt package in depends with GCC 11 2021-06-08 04:16:36 +03:00
fanquake
8837f1ebde
Merge bitcoin/bitcoin#21654: build, qt: Make Qt rcc output always deterministic
a58868d201 build: Makes rcc output always deterministic (Hennadii Stepanov)

Pull request description:

  The Qt Resource Compiler ([rcc](https://doc.qt.io/qt-5/rcc.html)) has a command-line option `--format-version` which has the [default value](https://code.qt.io/cgit/qt/qtbase.git/tree/src/tools/rcc/main.cpp?h=5.12.10#n172) 2.

  The only difference from `--format-version 1` is adding a [last modified timestamp](https://code.qt.io/cgit/qt/qtbase.git/tree/src/tools/rcc/rcc.cpp?h=5.12.10#n207) to the output file ([credits](https://github.com/bitcoin/bitcoin/pull/21654#issuecomment-819198228) to **fanquake**). That, in turn, forces us to use `QT_RCC_SOURCE_DATE_OVERRIDE=1` to get deterministic builds (#13732).

  This change makes rcc output always deterministic by using `--format-version 1` option that makes usage of the
  `QT_RCC_SOURCE_DATE_OVERRIDE` needless.

  ---

  Also it improves interaction with ccache:

  On master (f6c44e999b):
  ```
  $ make && make clean && ccache --zero-stats && make && ccache --show-stats
  ...
  cache directory                     /home/hebasto/.ccache
  primary config                      /home/hebasto/.ccache/ccache.conf
  secondary config      (readonly)    /etc/ccache.conf
  stats updated                       Sun Apr 11 15:45:43 2021
  stats zeroed                        Sun Apr 11 15:45:05 2021
  cache hit (direct)                   638
  cache hit (preprocessed)               0
  cache miss                             1
  cache hit rate                     99.84 %
  called for link                       10
  cleanups performed                     0
  files in cache                     20023
  cache size                          13.2 GB
  max cache size                      15.0 GB
  ```

  The missed file is always `qt/libbitcoinqt_a-qrc_bitcoin_locale.o`.

  With this PR:
  ```
  $ make && make clean && ccache --zero-stats && make && ccache --show-stats
  ...
  cache directory                     /home/hebasto/.ccache
  primary config                      /home/hebasto/.ccache/ccache.conf
  secondary config      (readonly)    /etc/ccache.conf
  stats updated                       Sun Apr 11 15:28:46 2021
  stats zeroed                        Sun Apr 11 15:28:21 2021
  cache hit (direct)                   639
  cache hit (preprocessed)               0
  cache miss                             0
  cache hit rate                    100.00 %
  called for link                       10
  cleanups performed                     0
  files in cache                     20012
  cache size                          13.2 GB
  max cache size                      15.0 GB
  ```

ACKs for top commit:
  fanquake:
    ACK a58868d201

Tree-SHA512: 52f4a3267f41883d13025c0de79b6da22e92d60c729e01b986935c6812bbfe7fadc40b742bd715bfdf09df94af6838d4fbbe8208c6123f366108e38c8e1121c5
2021-06-03 21:25:30 +08:00
João Barbosa
3b36395b96 depends: Fix qt.mk for mac arm64 2021-06-02 10:02:33 +01:00
fanquake
a83bbf02c7
Merge bitcoin/bitcoin#22054: depends: Bump Qt version to 5.12.11
fa416cea84 depends: Bump Qt version to 5.12.11 (Hennadii Stepanov)

Pull request description:

  Qt 5.12.11:
  - [fixes](c5d904639d) macOS related [QTBUG-87014](https://bugreports.qt.io/browse/QTBUG-87014), and the `fix_bigsur_drawing.patch` (which is our workaround for QTBUG-87014) could be dropped
  - [upgrades](00326c9dc1) supported macOS SDK to 11.0, and removes related warnings
  - fixes tab widget rendering on macOS Big Sur ([here](4d6832d03f) and [here](28b015342d)):
    - master (5.12.10)
  ![DeepinScreenshot_select-area_20210525122725](https://user-images.githubusercontent.com/32963518/119474470-dd24a180-bd54-11eb-82e6-ca4d39b0b177.png)
  ![DeepinScreenshot_select-area_20210525123634](https://user-images.githubusercontent.com/32963518/119475548-ebbf8880-bd55-11eb-9c13-477016f8c23b.png)
    - this PR (5.12.11)
  ![Screenshot from 2021-05-25 12-28-02](https://user-images.githubusercontent.com/32963518/119474537-ed3c8100-bd54-11eb-8efe-7fe5ccae8a98.png)

  Closes https://github.com/bitcoin-core/gui/issues/136.

ACKs for top commit:
  goums:
    ACK fa416cea84
  fanquake:
    ACK fa416cea84 - merging this now to move it out of the way of other Qt related changes.

Tree-SHA512: 4e621b214f05d12a060757fadf2fa103c09b594d7b1c2ad9200f550e55c1e1fdf66f2f830550e724b9277448e5480be256cb0003f4597902944400e16c4a68b8
2021-06-02 12:12:33 +08:00
Hennadii Stepanov
fa416cea84
depends: Bump Qt version to 5.12.11 2021-05-27 14:53:18 +03:00
fanquake
3caedb4c03
build: don't use cf-protection when targeting arm-apple-darwin
After two reports on IRC of issues building depends on an Apple M1
machine, it turns out that this option can't be used when targeting
arm-apple-darwin. For now, just use it for x86_64-apple-darwin.

```bash
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.4.0

error: option 'cf-protection=return' cannot be specified on this target
error: option 'cf-protection=branch' cannot be specified on this target
2 errors generated.
```
2021-05-26 13:08:16 +08:00
fanquake
f152c1ac66
build: libevent 2.1.12-stable 2021-05-18 10:19:10 +08:00
W. J. van der Laan
ecf5f2c1a0
Merge bitcoin/bitcoin#21889: macho: check for control flow instrumentation
42b589d18f scripts: test for MACHO control flow instrumentation (fanquake)
469a5bc4fa build: build Boost with -fcf-protection when targeting Darwin (fanquake)

Pull request description:

  Addresses the macOS portion of #21888.

  Build Boost with `-fcf-protection` when targeting Darwin. This should be ok, because our cross-compiler (Clang 10) supports the option, and I'd expect all versions of Apple Clang being used to compile Core would also support it. Building Boost with this option is required so that the `main` provided to `test_bitcoin` has instrumentation.

  Note that the presence of instrumentation does not mean it will be used, as that is determined at runtime by the CPU.
  From the Intel control flow enforcement documentation:

  > The ENDBR32 and ENDBR64 instructions will have the same effect as the NOP instruction on Intel 64 processors that do not support CET. On processors supporting CET, these instructions do not change register or flag state. This allows CET instrumented programs to execute on processors that do not support CET. Even when CET is supported and enabled, these NOP–like instructions do not affect the execution state of the program, do not cause any additional register pressure, and are minimally intrusive from power and performance perspectives.

  Follow up from #21135.

  Guix builds:
  ```bash
  663df8471400f06d4da739e39a886aa17f56a36d66e0ff7cc290686294ef39c9  guix-build-42b589d18fed/output/dist-archive/bitcoin-42b589d18fed.tar.gz
  45e841661e1659a634468b6f8c9fb0a7956c31ba296f1fd0c02cd880736d6127  guix-build-42b589d18fed/output/x86_64-apple-darwin18/bitcoin-42b589d18fed-osx-unsigned.dmg
  0ea85c99fef35429a5048fa14850bce6b900eaa887aeea419b019852f8d2be78  guix-build-42b589d18fed/output/x86_64-apple-darwin18/bitcoin-42b589d18fed-osx-unsigned.tar.gz
  85857a5a4a5d4d3a172d6c361c12c4a94f6505fc12b527ea63b75bfe54ee1001  guix-build-42b589d18fed/output/x86_64-apple-darwin18/bitcoin-42b589d18fed-osx64.tar.gz
  ```

  Gitian builds:
  ```bash
  # macOS:
  bdfd677a6b88273a741b433e1e7f554af50cc76b3342d44ab0c441e2b40efc96  bitcoin-42b589d18fed-osx-unsigned.dmg
  f3b2d09f3bea7a5cc489b02e8e53dd76a9922338500fae79cad0506655af56f9  bitcoin-42b589d18fed-osx-unsigned.tar.gz
  29d5ad5e46bc9fb0056922a8b47c026e5e9f71e6cf447203b74644587d6fb6f7  bitcoin-42b589d18fed-osx64.tar.gz
  663df8471400f06d4da739e39a886aa17f56a36d66e0ff7cc290686294ef39c9  src/bitcoin-42b589d18fed.tar.gz
  366f8d7a2fc1f3e22cb1018043099126a71ce65380cc27b1c3280cce42d06c98  bitcoin-core-osx-22-res.yml
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 42b589d18f

Tree-SHA512: 12cb8d462d64d845b9fe48c5c6978892adff8bf5b5572bb29f35df1f6176e47b32a68bcb6e4883c7d9454e76e8868851005a7325916852a2d0d32659ac7dae3f
2021-05-14 12:26:38 +02:00
fanquake
03e16cb027
Merge bitcoin/bitcoin#21593: build, qt, refactor: Get rid of some sed command instances
b95f7f8ac0 build, qt, refactor: Drop sed commands for win32-g++/qmake.conf (Hennadii Stepanov)

Pull request description:

  Such possibility is [available](https://codereview.qt-project.org/c/qt/qtbase/+/165348) since Qt 5.8.0.

ACKs for top commit:
  fanquake:
    ACK b95f7f8ac0

Tree-SHA512: e56a3d208a6bd5d42c722f8b344010fe7d1b6f7a28486613dfcb03f0403a47cee8476e2366eeaac401a19836cd09f782e8741a1e781ab4d78f72c500a30e4929
2021-05-12 14:24:47 +10:00
Hennadii Stepanov
a58868d201
build: Makes rcc output always deterministic
The Qt Resource Compiler (rcc) has a command-line option
`--format-version` which has the default value 2.

The only difference from `--format-version 1` is adding a last modified
timestamp to the output file. That, in turn, forces us to use
`QT_RCC_SOURCE_DATE_OVERRIDE=1` to get deterministic builds.

This change makes rcc output always deterministic by using
`--format-version 1` option that makes usage of the
`QT_RCC_SOURCE_DATE_OVERRIDE` needless. Also it improves interaction
with ccache.

Co-authored-by: fanquake <fanquake@gmail.com>
2021-05-10 18:31:49 +03:00
fanquake
469a5bc4fa
build: build Boost with -fcf-protection when targeting Darwin
The LLVM Clang we use for cross-compilation supports this option, and it's expected
that any builders on macOS will also be using an Apple Clang that supports it.
2021-05-09 13:38:48 +08:00
MarcoFalke
8e1c06846e
Merge bitcoin/bitcoin#21662: build: update Boost download URL
36c10b9f4b build,boost: update download url. (fdov)

Pull request description:

  - bintray is closing.
      - updated to jfrog.io.

  For reference:
  https://github.com/boostorg/boost/issues/502

ACKs for top commit:
  Sjors:
    ACK 36c10b9
  hebasto:
    ACK 36c10b9f4b

Tree-SHA512: 6746781296c3f395a2824750cf1a578ef9a2d6b8d5c4da196a8da5d084aea01f7f2583b41b2aade7bb94dd02be71efcfd6edf7491a1a25f2d36240b18322a68e
2021-05-03 19:57:43 +02:00
fanquake
b80a6af9e5
build: no longer patch threading out of ld64
Changes introduced in ld64-450.3 have likely removed the need for us to
patch out pthreads. See:
https://opensource.apple.com/source/ld64/ld64-450.3/src/ld/InputFiles.cpp.auto.html.
2021-05-01 13:39:45 +08:00
fanquake
9ed2f19d38
build: native cctools 973.0.1, ld64 609 2021-05-01 13:39:44 +08:00
Hennadii Stepanov
f48f187cce
build: Clang 10.0.1
LLVM 8 has inherent nondeterminism in the compiler, fixed in LLVM 9+.
2021-05-01 13:39:44 +08:00
fanquake
9b193cd2a3
build: libtapi 1100.0.11 2021-05-01 13:39:44 +08:00
fanquake
2cbb4ab7a9
Merge bitcoin/bitcoin#21658: build: fix make deploy for arm64-darwin
b353633bf4 build: mac_alias 2.2.0 (sgulls)

Pull request description:

  Fix make deploy for arm64-darwin

  Accidentally [closed](https://github.com/bitcoin/bitcoin/pull/21555) the PR

ACKs for top commit:
  promag:
    Tested ACK b353633bf4.

Tree-SHA512: 08043792d63894b6738ea93d076cecace1d8b30a623b944170a34492c3838269da87e09878164c760cf321663fb72641a7295070a847ad67d91fc9970ebe5c6a
2021-04-29 09:12:15 +08:00
Russell Yanofsky
5d62d7f6cd Update libmultiprocess library
Fix "Disable GCC suggest-override warnings for proxy clients" https://github.com/chaincodelabs/libmultiprocess/pull/40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

https://github.com/chaincodelabs/libmultiprocess/pull/35 Fix README.md markdown
https://github.com/chaincodelabs/libmultiprocess/pull/37 Add "make check" target to build and run tests
https://github.com/chaincodelabs/libmultiprocess/pull/38 Add "extends" inherited method support
https://github.com/chaincodelabs/libmultiprocess/pull/41 Avoid depending on argument default constructors
https://github.com/chaincodelabs/libmultiprocess/pull/42 Support attaching custom cleanup functions to proxy client and server classes
https://github.com/chaincodelabs/libmultiprocess/pull/43 Drop hardcoded #include lines in generated files
2021-04-23 03:02:50 -05:00
fanquake
e16f8720dc
Merge #21655: build, qt: No longer need to set QT_RCC_TEST=1 for determinism
c799a19b4b build, qt: No longer need to set QT_RCC_TEST=1 for determinism (Hennadii Stepanov)

Pull request description:

  The Qt Resource Compiler (rcc) output order relies on [`QHash`](https://doc.qt.io/qt-5/qhash.html):
  > This randomization of `QHash` is enabled by default. Even though programs should never depend on a particular `QHash` ordering, there may be situations where you temporarily need deterministic behavior, for example for debugging or regression testing. To disable the randomization, define the environment variable `QT_HASH_SEED` to have the value 0.

  Since #3620 we use `QT_RCC_TEST=1` to achieve a deterministic output.

  Since Qt 5.3.1 hash seeding is disabled for all of the bootstrapped tools, including rcc. Therefore, `QT_RCC_TEST=1` is no longer needed.
  See commit [5283a6c87beac5a43f612786fefd6e43f2c70bf6](5283a6c87b).

ACKs for top commit:
  fanquake:
    ACK c799a19b4b

Tree-SHA512: 9d116ac1e8c605ee3e8ed7f618586f0de85d8b06bbbb70fe8c298939ce203d2a7e97264a9afac037179993ab54c5f69a65ebb9ab27ca7f45acb963011bd45743
2021-04-21 15:16:47 +08:00
Hennadii Stepanov
f959b75e8c
build: Add Qt lconvert tool to depends 2021-04-20 15:49:45 +03:00
fdov
36c10b9f4b
build,boost: update download url.
- bintray is closing.
    - updated to jfrog.io.
2021-04-12 20:11:11 +02:00
sgulls
b353633bf4 build: mac_alias 2.2.0
Fix make deploy for arm64-darwin
2021-04-11 16:38:33 -04:00
Hennadii Stepanov
c799a19b4b
build, qt: No longer need to set QT_RCC_TEST=1 for determinism
Since Qt 5.3.1 hash seeding is disabled for rcc.
See commit 5283a6c87beac5a43f612786fefd6e43f2c70bf6.
2021-04-11 17:29:15 +03:00
Carl Dong
7476b46f18 guix: Build dmg as a static binary
This relatively easy change eliminates all runtime dependencies (except
for the kernel) for dmg, which is the only native build tool that gets
put in our output tarballs.

This allows much more flexibility when constructing the codesigning
environment, and is much more robust.
2021-04-05 11:00:39 -04:00
Carl Dong
06d6cf6784 depends: libdmg-hfsplus: Skip CMake RPATH patching
CMake's RPATH patching apparently causes non-reproducibility in the
executables which are produced, manifesting in a difference in padding
in the .dynstr section (we found this while investigating
non-reproducibility in the "dmg" tool). This RPATH patching can be
safely skipped for executables which don't depend on internal shared
libraries.

Documentation sources:
1. https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
2. https://reproducible-builds.org/docs/deterministic-build-systems/#cmake-notes

Prior debugging art:
1. https://stackoverflow.com/questions/63438206/cmake-g-reproducible-build-issue-with-changing-build-path
2. https://github.com/NXPmicro/mfgtools/pull/229/files
2021-04-05 11:00:39 -04:00
Carl Dong
c1ae726a13 guix: More thoroughly control native toolchain 2021-04-05 11:00:39 -04:00
Hennadii Stepanov
b95f7f8ac0
build, qt, refactor: Drop sed commands for win32-g++/qmake.conf 2021-04-04 14:40:06 +03:00
fanquake
765e0be534
build: split native_cctools 2021-03-30 14:54:08 +08: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
Wladimir J. van der Laan
fa2a5b8f3a
Merge #20421: build: miniupnpc 2.2.2
180dc3c886 build: miniupnpc 2.2.2 (fanquake)

Pull request description:

  Creating the dll subdir is no-longer required.
  We can drop our wingen patch.

  One issue that came up in [#19867](https://github.com/bitcoin/bitcoin/pull/19867#discussion_r483516359):
  > unrelated to this change but: why are we inserting the architecture in here, seems like something not necessary to reveal

  > My assumption is that it was being inserted to make depends more deterministic. However I think we can improve this, as there's no reason to reveal more of the version information either. Could leave the version as is /2.0 and either drop the architecture, or insert something else?

  I've dropped our `sed` and added a patch that just removes the OS string and miniupnpc version from the User-Agent. i.e:
  ```bash
  # master
  strings depends/x86_64-apple-darwin19.6.0/lib/libminiupnpc.a | rg -i User-Agent
  User-Agent: x86_64-apple-darwin19.6.0, UPnP/1.1, MiniUPnPc/2.0.20180203
  User-Agent: x86_64-apple-darwin19.6.0, UPnP/1.1, MiniUPnPc/2.0.20180203

  # this PR
  strings depends/x86_64-apple-darwin19.6.0/lib/libminiupnpc.a | rg -i User-Agent
  User-Agent: UPnP/1.1
  User-Agent: UPnP/1.1
  ```

  Note that built unmodified (22c1386351), the User-Agent would be:
  ```bash
  strings libminiupnpc.dylib | rg User-Agent
  User-Agent: Darwin/19.6.0, UPnP/1.1, MiniUPnPc/2.2.0
  User-Agent: Darwin/19.6.0, UPnP/1.1, MiniUPnPc/2.2.0
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 180dc3c886
  hebasto:
    ACK 180dc3c886.

Tree-SHA512: b0b6e623dbc5499e28faedf992d84278d6a11887a45a3806957b9e08886c5e56044cdfa2e7d7ec81cb1dd55f89be99834367905315d6bc611ba530e91d889ad1
2021-03-23 21:06:41 +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
Hennadii Stepanov
810b1310d6
build: Do not build unused CoreWLAN stuff in depends for macOS 2021-03-21 23:45:26 +02: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
Igor Cota
8e7ad4146d depends: disable Qt Vulkan support on Android 2021-03-21 22:33:35 +01:00
Hennadii Stepanov
cc25f892d2
build: Cleanup libxkbcommon_postprocess_cmds
There is no "share" directory in the staging one.
2021-03-12 14:51:10 +02: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
e674e94302
build: revert to using Qts internal zlib 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
Hennadii Stepanov
3272e34f9c
build: Add xkbcommon 0.8.4
Co-authored-by: fanquake <fanquake@gmail.com>
2021-03-10 08:23:47 +08:00
fanquake
d769b3372d
build: only pass -optimized-tools to qt in debug mode
Qt's configure tells us that "-optimized-tools is not useful in -release
mode.", so don't use it there.
2021-03-10 08:04:04 +08:00
Hennadii Stepanov
173ef8980d
build: Small libxcb.mk improvements 2021-03-07 23:17:28 +02:00
Hennadii Stepanov
5129b36573
build: Clean remnants of QTBUG-34748 fix
A fix for QTBUG-34748 was introduced in #5915 (v0.11.0, Qt 5.2.1).
QTBUG-34748 was fixed in version 5.3.0.
The separated patch file, provided by #5915, was dropped in #12971 while
bumping Qt to 5.9.4 (5.9.6). But libxcb.mk remained unchanged.

This change reverts #5915 for libxcb.mk.
2021-03-07 23:03:38 +02:00
fanquake
7af25024e9
build: compile libnatpmp with -DNATPMP_STATICLIB on Windows
This fixes linking issues and mirrors what we do with miniupnpc.
2021-03-04 12:34:46 +08:00
fanquake
ee35745754
build: use newer source for libnatpmp
The source we are currently using is from 2015. The upstream repo has
received a small number of bug fixes and improvements since then.
Including one that fixes an issue for Windows users:
https://github.com/miniupnp/libnatpmp/pull/13.

The source we are currently using is the most recent "official" release,
however I don't think it's worth waiting for a new one. The maintainer
was prompted to do so in Oct 2020, then again in Jan of this year, and
no release has eventuated. Given libnatpmp is a new inclusion into our
repository, I think we should be using this newer source.

This also cleans up a few warnings we currently see in depends builds:
```bash
Extracting libnatpmp...
/home/ubuntu/bitcoin/depends/sources/libnatpmp-20150609.tar.gz: OK
Preprocessing libnatpmp...
Configuring libnatpmp...
Building libnatpmp...
make[1]: Entering directory '/home/ubuntu/bitcoin/depends/work/build/x86_64-w64-mingw32/libnatpmp/20150609-13efa1beb87'
x86_64-w64-mingw32-gcc -Os -fPIC -Wall -DENABLE_STRNATPMPERR   -c -o natpmp.o natpmp.c
x86_64-w64-mingw32-gcc -Os -fPIC -Wall -DENABLE_STRNATPMPERR   -c -o getgateway.o getgateway.c
natpmp.c:42: warning: "EWOULDBLOCK" redefined
   42 | #define EWOULDBLOCK WSAEWOULDBLOCK
      |
In file included from natpmp.c:38:
/usr/share/mingw-w64/include/errno.h:166: note: this is the location of the previous definition
  166 | #define EWOULDBLOCK 140
      |
natpmp.c:43: warning: "ECONNREFUSED" redefined
   43 | #define ECONNREFUSED WSAECONNREFUSED
      |
In file included from natpmp.c:38:
/usr/share/mingw-w64/include/errno.h:110: note: this is the location of the previous definition
  110 | #define ECONNREFUSED 107
      |
natpmp.c:271:5: warning: ‘readnatpmpresponseorretry’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  271 | int readnatpmpresponseorretry(natpmp_t * p, natpmpresp_t * response)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
ar crs libnatpmp.a natpmp.o getgateway.o
make[1]: Leaving directory '/home/ubuntu/bitcoin/depends/work/build/x86_64-w64-mingw32/libnatpmp/20150609-13efa1beb87'
Staging libnatpmp...
Postprocessing libnatpmp...
Caching libnatpmp...
```
2021-03-04 10:34:18 +08:00
fanquake
bd49ac4168
build: fix libnatpmp macos cross compile
Currently, our cross-compile of libnatpmp for macOS doesn't work at all.
The wrong archiver is used, which produces an archive the linker doesn't like.
This becomes clear when configuring:
```bash
configure:25722: checking for initnatpmp in -lnatpmp
configure:25747: env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/ubuntu/bitcoin/depends/x86_64-apple-darwin18/native/bin/clang++ --target=x86_64-apple-darwin18 <trim>  -Wl,-headerpad_max_install_names -Wl,-dead_strip -Wl,-dead_strip_dylibs conftest.cpp -lnatpmp   >&5
ld: archive has no table of contents for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

Fix this by using the right `ar` (we do the same for upnp).

While we're at it, we fixe the build so that we are using our c/ppflags.
This  means building with `-O2` rather than `-Os`.

Note that this fixes an issue that is also fixed by #21209.
However, given there are reservations about updating to use a newer libnatpmp source, we should just fix this for now.
2021-03-01 14:00:36 +08:00