Commit Graph

96 Commits

Author SHA1 Message Date
Hennadii Stepanov
72fc043954
build, qt: Drop redundant -lxcb-static flag
The removed flag has been already linked with Qt5XcbQpa.
2021-03-12 14:51:10 +02:00
Hennadii Stepanov
cba4a7e416
build, qt: Always test plugins/subdir before adding to search paths
The existence of each subdir is not guaranteed for all platforms.
2021-03-12 14:50:53 +02:00
Hennadii Stepanov
1be8e0f238
build: Add QMacStyle support 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
ffdd7de690
build, qt: Fix regression introduced in #21363
Due to the ill-formed code _BITCOIN_QT_CHECK_STATIC_PLUGIN never fails.
2021-03-09 23:31:47 +02:00
Hennadii Stepanov
32b8dc648f
build, refactor: Fix indentation 2021-03-05 09:11:13 +02:00
Hennadii Stepanov
57b65225dc
build, qt: Make Qt static libs check regardless of plugindir
Qt static libs reside in libdir.
2021-03-05 09:11:12 +02:00
Hennadii Stepanov
6203457915
build, refactor: Rename internal _BITCOIN_QT_FIND_STATIC_PLUGINS macro
New _BITCOIN_QT_CHECK_STATIC_LIBS name describes the macro functionality
more precisely.
2021-03-05 09:11:12 +02:00
Hennadii Stepanov
bf2477402d
build, qt: Refactor internal _BITCOIN_QT_CHECK_STATIC_PLUGINS macro
This change puts Q_IMPORT_PLUGIN(...) boilerplate into the macro, which
now accepts only one plugin to check, and it is renamed (plural ->
singular).
2021-03-05 09:10:56 +02:00
fanquake
fca3e98f64
Merge #18298: build: Fix Qt processing of configure script for depends with DEBUG=1
76f52e3da3 build: Fix Qt processing of configure script for depends with DEBUG=1 (Hennadii Stepanov)

Pull request description:

  This PR:
  - makes the `configure` script correctly pickup Qt if depends is built with `DEBUG=1`:
      - for Windows -- fix #19266
      - for macOS -- fix #16391
  - is an alternative to #18117 (without downsides)

ACKs for top commit:
  fanquake:
    ACK 76f52e3da3. Tested native darwin, and darwin/win cross compile with `DEBUG=1`.

Tree-SHA512: 8fde99302b4b06faf109315bddba9e3063b156c50f8f9863c2bd51718538c719429a63fdced071730c18022f2e559d3b25c1dcec3efa81fe79f657253680956a
2021-03-03 15:48:11 +08:00
fanquake
7bf04e358a
build: remove mostly pointless BOOST_PROCESS macro
Performing a series of link checks for a Boost component that is
header-only doesn't make much sense, and currently means we just have
another confusing Boost macro in our tree. I'm not sure why this was
originally done this way; maybe Sjors or luke-jr can elaborate
(#15382 (929cda5470))?

The macro also has the side-effect of producing confusing error
messages. i.e in #20744, the CI is currently failing with:
```bash
checking for boostlib >= 1.58.0 (105800) lib path in "/tmp/cirrus-ci-build/depends/x86_64-pc-linux-gnu/lib"... yes
checking for boostlib >= 1.58.0 (105800)... yes
checking whether the Boost::Process library is available... yes
configure: error: Could not find a version of the Boost::Process library!
```

This isn't useful, given there is no such thing as a `Boost::Process`
library.

This PR just removes the macro entirely, but maintains a `--with-boost-process`
(defaulting to off), flag to configure. Hopefully this will also be
removed, in favour of `--enable-disable-external-signer` if/when #16546
is merged.
2021-02-17 08:04:11 +08:00
Wladimir J. van der Laan
9996b1806a
Merge #21064: refactor: use std::shared_mutex & remove Boost Thread
060a2a64d4 ci: remove boost thread installation (fanquake)
06e1d7d81d build: don't build or use Boost Thread (fanquake)
7097add83c refactor: replace Boost shared_mutex with std shared_mutex in sigcache (fanquake)
8e55981ef8 refactor: replace Boost shared_mutex with std shared_mutex in cuckoocache tests (fanquake)

Pull request description:

  This replaces `boost::shared_mutex` and `boost::unique_lock` with [`std::shared_mutex`](https://en.cppreference.com/w/cpp/thread/shared_mutex) & [`std::unique_lock`](https://en.cppreference.com/w/cpp/thread/unique_lock).

  Even though [some concerns were raised](https://github.com/bitcoin/bitcoin/issues/16684#issuecomment-726214696) in #16684 with regard to `std::shared_mutex` being unsafe to use across some glibc versions, I still think this change is an improvement. As I mentioned in #21022, I also think trying to restrict standard library feature usage based on bugs in glibc is not only hard to do, but it's not currently clear exactly how we do that in practice (does it also extend to patching out use in our dependencies, should we be implementing more runtime checks for features we are using, when do we consider an affected glibc "old enough" not to worry about? etc). If you take a look through the [glibc bug tracker](https://sourceware.org/bugzilla/describecomponents.cgi?product=glibc) you'll no doubt find plenty of (active) bug reports for standard library code we already using. Obviously not to say we shouldn't try and avoid buggy code where possible.

  Two other points:

  [Cory mentioned in #21022](https://github.com/bitcoin/bitcoin/pull/21022#issuecomment-769274179):
  > It also seems reasonable to me to worry that boost hits the same underlying glibc bug, and we've just not happened to trigger the right conditions yet.

  Moving away from Boost to the standard library also removes the potential for differences related to Boosts configuration. Boost has multiple versions of `shared_mutex`, and what you end up using, and what it's backed by depends on:
  * The version of Boost.
  * The platform you're building for.
  * Which version of `BOOST_THREAD_VERSION` is defined: (2,3,4 or 5) default=2. (see [here](https://www.boost.org/doc/libs/1_70_0/doc/html/thread/build.html#thread.build.configuration) for some of the differences).
  * Is `BOOST_THREAD_V2_SHARED_MUTEX` defined? (not by default). If so, you might get the ["less performant, but more robust"](https://github.com/boostorg/thread/issues/230#issuecomment-475937761) version of `shared_mutex`.

  A lot of these factors are eliminated by our use of depends, but users will have varying configurations. It's also not inconceivable to think that a distro, or some package manager might start defining something like `BOOST_THREAD_VERSION=3`. Boost tried to change the default from 2 to 3 at one point.

  With this change, we no longer use Boost Thread, so this PR also removes it from depends, the build system, CI etc.

  Previous similar PRs were #19183 & #20922. The authors are included in the commits here.
  Also related to #21022 - pthread sanity checking.

ACKs for top commit:
  laanwj:
    Code review ACK 060a2a64d4
  vasild:
    ACK 060a2a64d4

Tree-SHA512: 572d14d8c9de20bc434511f20d3f431836393ff915b2fe9de5a47a02dca76805ad5c3fc4cceecb4cd43f3ba939a0508178c4e60e62abdbaaa6b3e8db20b75b03
2021-02-12 11:39:36 +01:00
fanquake
8f360e349e
build: remove ax_gcc_func_attribute macro
This is no-longer used.
2021-02-12 09:04:16 +08:00
fanquake
06e1d7d81d
build: don't build or use Boost Thread 2021-02-02 12:38:22 +08:00
fanquake
54ce4fac80
build: improve macro for testing -latomic requirement
riscv builds are currently failing because -latomic isn't being linked
against, when it is needed:
```bash
/home/ubuntu/build/bitcoin/distsrc-riscv64-linux-gnu/src/bitcoin-util.cpp:98: undefined reference to `__atomic_exchange_1'
```

This exteneds our macro to ensure that -latomic is linked against when
required.
2021-01-15 10:54:07 +08:00
Hennadii Stepanov
76f52e3da3
build: Fix Qt processing of configure script for depends with DEBUG=1
Now, if depends is built with DEBUG=1, the configure script correctly
finds Qt for macOS and Windows.
2021-01-08 10:48:22 +02:00
Hennadii Stepanov
ec4a46dd9c
build: Drop unneeded IOKit framework dependency 2020-11-25 18:25:52 +02:00
Hennadii Stepanov
65afe4cb69
build: Drop unneeded ApplicationServices framework dependency 2020-11-25 18:18:36 +02:00
Andrew Chow
99309ab3e9 Allow disabling BDB in configure with --without-bdb 2020-11-18 11:56:12 -05:00
fanquake
fc9278d162
build: AX_PTHREAD serial 27 2020-09-14 16:35:09 +08:00
fanquake
7ce7f2b251
Merge #17396: build: modest Android improvements
366913e307 build: AX_BOOST_THREAD serial 33 (Igor Cota)
cf0681133a build: disable D-Bus on Android by default (Igor Cota)

Pull request description:

  I've been trying to build for Android on different OSes/Gitian with varying success. Build system is quite the beast and sometimes it doesn't get it right. To make sure it does these three little tweaks make the Android build more robust:

  - disable D-Bus (Android doesn't support it and has its own way to trigger notifications)
  - don't flag `-lpthread` when linking Boost, [Bionic has built-in support](https://stackoverflow.com/questions/30801752/android-ndk-and-pthread)
  - ~~add `-static-libstdc++` to linker flags. This avoids having to bundle `libc++_shared` with CLI apps, still necessary with `bitcoin-qt` though (thanks Sjors)~~

  I think these are small and fairly straightforward so I put them all into this one PR.

ACKs for top commit:
  fanquake:
    ACK 366913e307

Tree-SHA512: 31465fd228a5877c20aa2a05f98242d4eeb328b9b35bd1a7a3dcfb1ef51379d84053a81ade5a65436ffc1bc8ccd21f11ed0539eb10e827d182c0c04394629af0
2020-08-24 21:27:29 +08:00
Igor Cota
366913e307 build: AX_BOOST_THREAD serial 33 2020-08-16 18:47:48 +02:00
Igor Cota
cf0681133a build: disable D-Bus on Android by default
Android uses a different notification system and doesn't support D-Bus
2020-08-16 15:16:36 +02:00
Hennadii Stepanov
4af4672525
build, qt: Add Qt version checking 2020-08-10 02:10:28 +03:00
Hennadii Stepanov
30e336f785
build: Drop unused bitcoin_cv_qt58 2020-08-10 02:10:12 +03:00
Sjors Provoost
929cda5470
configure: add ax_boost_process
Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
2020-07-31 13:38:09 +02:00
fanquake
265492723a
Merge #18297: build: Use pkg-config in BITCOIN_QT_CONFIGURE for all hosts including Windows
8a26848c46 build: Fix m4 escaping (Hennadii Stepanov)
9123ec15db build: Remove extra tokens warning (Hennadii Stepanov)
fded4f48c3 build: Remove duplicated QT_STATICPLUGIN define (Hennadii Stepanov)
05a93d5d96 build: Fix indentation in bitcoin_qt.m4 (Hennadii Stepanov)
ddbb419310 build: Use pkg-config in BITCOIN_QT_CONFIGURE for all hosts (Hennadii Stepanov)
492971de35 build: Fix mingw pkgconfig file and dependency naming (Hennadii Stepanov)

Pull request description:

  This PR makes `bitcoin_qt.m4` to use `pkg-config` for all hosts and removes non-pkg-config paths from it. This is a step towards the idea which was clear [stated](https://github.com/bitcoin/bitcoin/pull/8314#issue-76644643) by Cory Fields:
  > I believe the consensus is to treat Windows like the others and require pkg-config across the board. We can drop all of the non-pkg-config paths, and simply AC_REQUIRE(PKG_PROG_PKG_CONFIG)

  There are two unsolved problems with this PR. If depends is built with `DEBUG=1` the `configure` script fails to pickup Qt:
  - for macOS host (similar to, but not the same as #16391)
  - for Windows host (regression)

  The fix is ~on its way~ submitted in #18298 (as a followup).

  Also this PR picks some small improvements from #17820.

ACKs for top commit:
  theuni:
    Code review ACK 8a26848c46
  dongcarl:
    Code Review ACK 8a26848c46
  laanwj:
    Code review ACK 8a26848c46

Tree-SHA512: 3b25990934b939121983df7707997b31d61063b1207d909f539d69494c7cb85212f353092956d09ecffebb9fef28b869914dd1216a596d102fcb9744bb5487f7
2020-06-13 15:41:39 +08:00
Pieter Wuille
7cbfebbf3d Update ax_cxx_compile_stdcxx.m4 2020-04-11 02:15:20 -07:00
Hennadii Stepanov
da0842dcd4 build: Update ax_boost_mase.m4 to the latest serial
This change fixes boost detection for arch armv7l.
2020-04-08 16:14:31 +03:00
Hennadii Stepanov
8a26848c46
build: Fix m4 escaping 2020-03-16 11:09:23 +02:00
Hennadii Stepanov
9123ec15db
build: Remove extra tokens warning 2020-03-16 11:09:22 +02:00
Hennadii Stepanov
fded4f48c3
build: Remove duplicated QT_STATICPLUGIN define
QT_STATICPLUGIN is defined in BITCOIN_QT_CONFIGURE macro.
2020-03-16 11:09:22 +02:00
Hennadii Stepanov
05a93d5d96
build: Fix indentation in bitcoin_qt.m4 2020-03-16 11:09:22 +02:00
Hennadii Stepanov
ddbb419310
build: Use pkg-config in BITCOIN_QT_CONFIGURE for all hosts
This change adds to the BITCOIN_QT_CONFIGURE script ability to use
pkg-config for MinGW. All of the non-pkg-config paths are removed as
needless.
If depends is built with DEBUG=1 the configure script fails to pickup
Qt:
- for macOS host (similar, but not the same as issue 16391)
- for Windows host (regression)
2020-03-16 11:08:07 +02:00
fanquake
bd37f2bc26
build: remove Boost Chrono detection from build system 2020-03-07 08:34:31 +08: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
d419ca7e32 depends: export dynamic JNI symbols from static qtforandroid.a 2019-10-12 13:25:06 +02:00
Jon Layton
57b0cd4db9 build: Installed Qt version only appears if being built 2019-09-30 19:03:16 -04:00
BlockMechanic
f1e40b3e71 Update bitcoin_qt.m4
Fix to allow configure to detect at
2019-09-22 14:40:18 +02:00
fanquake
cf57e33cc6
Merge #16870: build: update boost macros to latest upstream for improved error reporting
bb99c4e684 build: update boost macros to latest upstream (fanquake)

Pull request description:

  Fixes: #16803

  I opened an [upstream PR](https://github.com/autoconf-archive/autoconf-archive/pull/197) to improve the Boost error reporting, so pull the latest macros.

ACKs for top commit:
  laanwj:
    Code review ACK bb99c4e684
  jonatack:
    Sanity check ACK bb99c4e684, light code read, built and ran tests on Debian 4.19.37-5+deb10u2 (2019-08-08) x86_64 GNU/Linux. Only tested the happy path.

Tree-SHA512: 34704ed623ac0085215fd874a23fde8f6e39a69fa20d78472b0c4d2306dc101c0571fa26c4c8821600746b94daaaf05faf6d15546899d588081c26357d29ec46
2019-09-21 10:00:28 +08:00
Jon Layton
6aab7649d3 doc: Fix whitespace errs in .md files, bitcoin.conf, Info.plist.in, and find_bdb48.m4 2019-09-17 03:21:22 -04:00
fanquake
bb99c4e684
build: update boost macros to latest upstream
Fixes: #16803

I opened an [upstream PR](https://github.com/autoconf-archive/autoconf-archive/pull/197) to improve the Boost error reporting, so pull the latest macros.
2019-09-14 07:32:25 +08:00
fanquake
1bb1661a40
doc: fix typo in bitcoin_qt.m4 comment 2019-07-24 09:17:47 +08:00
fanquake
0aeb98ac1f
build: remove jpeg lib check from bitcoin_qt.m4 2019-07-24 09:17:47 +08:00
Carl Dong
689d3b4a03
build-aux: Remove check for x11-xcb
We're no longer building QT with libX11/XLib, so it doesn't make sense
to check for the x11-xcb package.
2019-07-17 17:04:41 -04:00
Sjors Provoost
2620e24b83
[depends] boost: update to 1.70 2019-05-03 13:22:17 +01:00
Sjors Provoost
fd46c4c001
Bump minimum Qt version to 5.5.1 2019-02-14 11:12:30 +01:00
Hennadii Stepanov
2bc3f114d0
Bump the minimum Qt version to 5.2 2018-11-14 01:32:51 +02:00
MarcoFalke
415f2bff69
Merge #13095: build: update ax_boost_chrono/unit_test_framework
aa85dcf472 build: sync ax_boost_chrono/unit_test (fanquake)

Pull request description:

  [ax_boost_chrono](https://github.com/bitcoin/bitcoin/blob/master/build-aux/m4/ax_boost_chrono.m4) and [ax_boost_unit_test_framework](https://github.com/bitcoin/bitcoin/blob/master/build-aux/m4/ax_boost_unit_test_framework.m4) were updated from upstream in #12678. However some minor upstream changes were missed. Pull those changes in here so these files actually reflect their upstream serial.

Tree-SHA512: 71d9ee7a1616d9d36e6f63dedb6687918c3662bde724cdda1fdf3eb039c8973acd166273876a9b2671a7e087149fcf956552f9f2b946e5ee1835d12944c0065d
2018-07-26 08:54:59 -04:00
Wladimir J. van der Laan
2dc5ab6378
Merge #13482: Remove boost::program_options dependency
f447a0a707 Remove program options from build system (Chun Kuan Lee)
11588c639e Replace boost program_options (Chun Kuan Lee)

Pull request description:

  Concept from #12744, but without parsing negated options.

Tree-SHA512: 7f418744bb8934e313d77a5f162633746ef5d043de802b9c9cd9f7c1842e7e566eb5f171cd9e2cc13317281b2449c6fbd553fa4f09b837e6af2f5d2b2aabdca2
2018-07-20 16:45:44 +02:00