Commit Graph

874 Commits

Author SHA1 Message Date
fanquake
b335710782
depends: patch around non-determinism in qt 2023-12-21 09:37:33 +00:00
fanquake
e8ecec4575
build: rename native_clang to native_llvm
This is more correct, as this is downloading LLVM, and already unpacking
and using more than just clang.
2023-12-21 09:37:33 +00:00
fanquake
b0c290340c
Revert "build: Patch Qt to handle minimum macOS version properly"
This reverts commit 05aca09381.
2023-12-21 09:37:33 +00:00
Hennadii Stepanov
5ddd7c65b4
build: Bump native_clang up to 17.0.6 2023-12-21 09:37:32 +00:00
fanquake
bde8d63b17
depends: build libmultiprocess with position independant code
This matches what we do with all other dependencies, see `--with-pic`,
and fixes build failures, like #26943.
2023-12-12 13:58:38 +00:00
fanquake
506634d79d
depends: always install libmultiprocess to /lib
On some systems, libmultiprocess would be installed into `lib64`, I
assume due to the use of GNUInstallDirs, however all other libs we build
in depends, go into lib/. Rather than adding lib64/ to the pkg-config
and link flags, I opted for always installing into lib/.

This was changed in
https://github.com/chaincodelabs/libmultiprocess/pull/79 upstream.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2023-12-12 13:58:38 +00:00
fanquake
beb3096263
depends: always install capnp to /lib
On some systems, capnp would be installed into `lib64`, I
assume due to the use of GNUInstallDirs, however all other libs we build
in depends, go into lib/. Rather than adding lib64/ to the pkg-config
and link flags, I opted for always installing into lib/.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2023-12-12 13:58:38 +00:00
MarcoFalke
fa67f096bd
build: Require C++20 compiler 2023-12-07 11:05:33 +01:00
fanquake
dce1dfbc47
Merge bitcoin/bitcoin#28622: build: use macOS 14 SDK (Xcode 15.0)
8ea45e626e build: use macOS 14 SDK (Xcode 15.0) (fanquake)
51c97ffb69 build: patch boost process for macOS 14 SDK (fanquake)
423949a13b depends: add -platform_version to macOS build flags (fanquake)

Pull request description:

  This fixes: https://github.com/bitcoin/bitcoin/pull/28349#issuecomment-1748515277 (cross-compiling with C++20 for macOS). See https://developer.apple.com/xcode/cpp/#c++20 for C++20 support in Apples libc++, some features landed with Xcode 14.3, although many more landed with Xcode 15.0.

ACKs for top commit:
  hebasto:
    ACK 8ea45e626e.
  TheCharlatan:
    ACK 8ea45e626e

Tree-SHA512: 274ce2c9b9f8e4d755c07b8d0d4897a7f92708ac64e6afb7a3f75bdb485e863fc7f40badf3a88b129ce36f6cca72f768dc2ed7fba2bdf0bb6da2bf0c8fedee10
2023-12-07 10:00:47 +00:00
fanquake
8ea45e626e
build: use macOS 14 SDK (Xcode 15.0) 2023-12-05 09:55:01 +00:00
fanquake
51c97ffb69
build: patch boost process for macOS 14 SDK 2023-12-05 09:55:01 +00:00
fanquake
423949a13b
depends: add -platform_version to macOS build flags
```bash
-platform_version platform min_version sdk_version
    This is set to indicate the platform, oldest supported version
    of that platform that output is to be used on, and the SDK that
    the output was built against.
```
2023-12-05 09:35:32 +00:00
Hennadii Stepanov
11d797e3a0
depends: Build native_capnp package with CMake 2023-12-04 14:39:59 +00:00
Hennadii Stepanov
90389c95e9
depends: Build capnp package with CMake
This change fixes the `capnp` package cross-compiling for the
`x86_64-w64-mingw32` and `arm64-apple-darwin` platforms.
2023-12-04 14:39:58 +00:00
fanquake
160d23677a
Merge bitcoin/bitcoin#28851: build: Patch Qt to handle minimum macOS version properly
05aca09381 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov)

Pull request description:

  This PR is:
  - required to [switch](https://github.com/bitcoin/bitcoin/pull/28622) to macOS 14 SDK (Xcode 15).
  - an alternative to https://github.com/bitcoin/bitcoin/pull/28732 and https://github.com/bitcoin/bitcoin/pull/28775.

  Qt relies on the `__MAC_OS_X_VERSION_MIN_REQUIRED` macro, which is set in the `AvailabilityInternal.h` SDK header to
  the value provided by the Clang driver from the `-mmacos-version-min` / `-mmacosx-version-min` option.

  Xcode 12 SDK expects the OS-specific `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
      #endif
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
  ```

  In the other hand, Xcode 15 SDK expects a general `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #if defined(__has_builtin) && __has_builtin(__is_target_os)
          #if __is_target_os(macos)
              #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
              #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
          #endif
      #elif  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
      #endif /*  __has_builtin(__is_target_os) && __is_target_os(macos) */
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
  ```

  The latter macro is not provided by LLVM Clang until c8e2dd8c6f, which is available in Clang 17.

  The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header.

ACKs for top commit:
  maflcko:
    lgtm ACK 05aca09381

Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
2023-12-01 20:28:23 +00:00
fanquake
97d53e90ba
ci: remove libz-dev from macOS build deps
Remove no-longer used libz-dev (from DMG compression).
Followup to #28432.
Missed this in #28932.
2023-11-30 15:17:19 +00:00
fanquake
0ffcc5b680
ci: remove python3-setuptools from mac build deps 2023-11-23 17:52:38 +00:00
Ryan Ofsky
21bfee0720 depends: bump libmultiprocess to fix capnproto deprecation warnings
This incorporates PR https://github.com/chaincodelabs/libmultiprocess/pull/88
"Fix current deprecation warnings as of capnproto-1.0.1" and reverts the
NO_WERROR CI workaround added in https://github.com/bitcoin/bitcoin/pull/28735
2023-11-17 15:27:19 -05:00
fanquake
22025d06e5
Merge bitcoin/bitcoin#28605: Fix typos
43de4d3630 doc: fix typos (Sjors Provoost)

Pull request description:

  This PR fixes typos found by lint-spelling.py using codespell 2.2.6.

  Our CI linter job uses codespell 2.2.5 and found fewer typos that I did locally. In any case it's happy now.

ACKs for top commit:
  pablomartin4btc:
    re ACK 43de4d3630

Tree-SHA512: c032fe86cb49c924a468385653b31f309a9db68c478d70335bba3e65a1ff3826abe80284fe00a090ab5a509e1edbf17e476f6922fb15d055e50f1103dad2ccb0
2023-11-16 10:35:49 +00:00
fanquake
04e871d62f
Merge bitcoin/bitcoin#28845: depends: remove PYTHONPATH from config.site
3b19100303 depends: remove PYTHONPATH from config.site (fanquake)

Pull request description:

  We no-longer need this, as we no-longer build python packages.

ACKs for top commit:
  hebasto:
    ACK 3b19100303, this PR effectively reverts no longer needed de619a37fd.

Tree-SHA512: 775354773f83fc98922f1d4ee84d8f1e866fb6fb2a59a3eaf06a7a5f0d846f7dc1b84862c58195dfb91ddfb02b2dc86bee78b51459f91c65a5b1464df9f3c53c
2023-11-16 10:18:06 +00:00
fanquake
821a8a1125
doc: remove x86_64 build assumption from depends doc
This dates from the introduction of depends, and has not been the case
for some time now.
2023-11-15 17:27:55 +00:00
fanquake
3b19100303
depends: remove PYTHONPATH from config.site
We no-longer need this, as we no-longer build python packages.

Effectively reverts de619a37fd.
2023-11-14 16:28:38 +00:00
fanquake
1fbeeed23a
Merge bitcoin/bitcoin#28781: depends: latest config.guess & config.sub
49a92579c7 build: latest config.sub in depends (fanquake)
ced0435a71 build: latest config.guess in depends (fanquake)

Pull request description:

  Before we make any local modifications (i.e #28733) pull the latest files from upstream.

ACKs for top commit:
  TheCharlatan:
    ACK 49a92579c7

Tree-SHA512: fbbe0d6ef72a196a652467af0550b38da23b932fe68da4965a9b0dc4795db9c869969db98f660cd360f6af3a7659b46c25e3fd398e0ef127dae71726b9a915a6
2023-11-14 09:29:09 +00:00
Hennadii Stepanov
05aca09381
build: Patch Qt to handle minimum macOS version properly
This change is required to switch to macOS 14 SDK (Xcode 15).
2023-11-10 23:25:13 +00:00
Sjors Provoost
43de4d3630
doc: fix typos
As found by lint-spelling.py using codespell 2.2.6.
2023-11-07 10:21:51 +09:00
fanquake
953d302a24
Merge bitcoin/bitcoin#28735: depends: Bump to capnproto-c++-1.0.1
3333f14efa depends: Bump to capnproto-c++-1.0.1 (MarcoFalke)

Pull request description:

  Reasons:
  * Debian is starting to ship this version in Trixie (https://packages.debian.org/trixie/capnproto), which will likely become the version shipped with Ubuntu 24.04 LTS. So testing with this version will help to find any issues before real users start to use those distro packages.
  * The feature is currently experimental, so bumping the version shouldn't cause any production issues.
  * With multiprocess begin a priority project for 27.0, it seems better to do build system changes/bumps early, rather than later, to allow for more time testing them.

ACKs for top commit:
  TheCharlatan:
    Re-ACK 3333f14efa
  fanquake:
    ACK 3333f14efa - the response from upstream is that [if we submit a PR, they can take a look](https://github.com/capnproto/capnproto/issues/1833#issuecomment-1792582206), so if anyone would like this to work for Windows, I'd suggest sending a patch.
  ryanofsky:
    Code review ACK 3333f14efa

Tree-SHA512: 7d53ad1536f042ab43dbc7847126b826e7fc76694f173c348b835fd1067b8f3dd682c5bcb4887f09ee85bab69130721cd7f8fb96b2e82053d4e28bd5c38bdc5f
2023-11-05 18:22:36 +00:00
MarcoFalke
3333f14efa
depends: Bump to capnproto-c++-1.0.1 2023-11-03 12:48:42 +01:00
fanquake
49a92579c7
build: latest config.sub in depends 2023-11-03 11:04:37 +00:00
fanquake
ced0435a71
build: latest config.guess in depends 2023-11-03 11:04:09 +00:00
fanquake
664c87354f
depends: drop -O1 workaround from arm64 apple Qt build 2023-11-02 15:59:46 +00:00
Hennadii Stepanov
8047bb6fea
build: Update qt package up to 5.15.11 2023-11-01 15:20:20 +00:00
fanquake
986d7fed05
depends: zeromq 4.3.5
https://github.com/zeromq/libzmq/releases/tag/v4.3.5
2023-10-24 12:11:11 +01:00
fanquake
cefbf0bc20
depends: update LD64_VERSION to 711
I forgot to do this in 7d5815293e.
2023-10-10 11:12:23 +01:00
fanquake
f0cebbdb2a
qt: enable -ltcg for windows HOST
Patch around multiple definition issues in Qt.

Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
2023-10-05 10:26:34 +01:00
Hennadii Stepanov
6988a2f097
build: Update qt package up to 5.15.10 2023-10-04 14:00:57 +01:00
fanquake
848eec0936
depends: fix unusable memory_resource in macos qt build
See https://codereview.qt-project.org/c/qt/qtbase/+/482392.
2023-10-03 13:31:19 +01:00
Hennadii Stepanov
79ef528511
build, macos: Fix qt package build with new Xcode 15 linker 2023-09-27 12:19:57 +01:00
fanquake
e9a4793b82
Merge bitcoin/bitcoin#28432: build: Produce a .zip for macOS distribution
b5790c35f7 build: remove dmg dependencies (fanquake)
33ae0bd1e4 macdeploy: remove DMG generation from deploy script (fanquake)
a128111c29 build: produce a .zip for macOS distribution (Hennadii Stepanov)
c38561d6b1 build: add -zip option to macdeployqtplus (fanquake)

Pull request description:

  It is https://github.com/bitcoin/bitcoin/pull/27099 revived with addressed [comments](https://github.com/bitcoin/bitcoin/pull/27099#issuecomment-1708705686).

  From https://github.com/bitcoin/bitcoin/pull/27099#issue-1584429885:
  > Reviving the discussion around using a `.zip` for the distributed macOS binaries, as opposed to a `.dmg`.
  >
  > Given we only had a single report of the "no finder window" issue (#26176), I wonder if that means macOS users were able to figure it out, they gave up/didn't report, or, we just have very few macOS users.
  >
  > Related to #18128.

  That's how it looks on macOS:

  ![image](https://github.com/bitcoin/bitcoin/assets/32963518/baa637bb-256b-4b24-8645-8c2754c2ae64)

ACKs for top commit:
  Sjors:
    tACK b5790c35f7
  jarolrod:
    ACK b5790c35f7
  TheCharlatan:
    utACK b5790c35f7

Tree-SHA512: 6e9cb3ab0f60f8a92bfec50577e8d096c5b23ec09ebbb334826415609140ddc96d470aea37379495c1c6bb1beec0d306b09460f62e1543bb0f4396c10a1dfbe2
2023-09-20 11:40:47 +00:00
fanquake
b5790c35f7
build: remove dmg dependencies 2023-09-15 13:47:50 +01:00
Hennadii Stepanov
a128111c29
build: produce a .zip for macOS distribution
Instead of a .dmg.

Co-authored-by: fanquake <fanquake@gmail.com>
2023-09-15 13:47:50 +01:00
fanquake
4a825039a5
build: use _LIBCPP_ENABLE_DEBUG_MODE over ENABLE_ASSERTIONS
`_LIBCPP_ENABLE_ASSERTIONS` is deprecated, and will be removed. [See (from libc++ __config in main)](b57df9fe9a/libcxx/include/__config (L205-L209)):

> TODO(hardening): remove this in LLVM 19.
> This is for backward compatibility -- make enabling `_LIBCPP_ENABLE_ASSERTIONS` (which predates hardening modes)
> equivalent to setting the safe mode.
> ifdef _LIBCPP_ENABLE_ASSERTIONS
> warning "_LIBCPP_ENABLE_ASSERTIONS is deprecated, please use _LIBCPP_ENABLE_SAFE_MODE instead."

From LLVM 17, `_LIBCPP_ENABLE_DEBUG_MODE` can be used instead.

See https://libcxx.llvm.org/Hardening.html.

Related to #28476.
2023-09-14 14:16:49 +01:00
fanquake
7d5815293e
depends: cctools 986 & ld64 711 2023-09-06 16:36:40 +01:00
fanquake
1ed1183f47
depends: libtapi 1300.0.6.5 2023-09-06 16:36:33 +01:00
fanquake
94955b4b1d
depends: use LLVM/Clang 15.0.6 for macOS cross-compile
There is no x86_64 binaries for 15.0.7.
2023-08-27 10:02:55 +01:00
fanquake
7cb88c8b46
depends: xcb-proto 1.15.2
Resolves build failures under Python 3.12, i.e building on rawhide:
```bash
make[3]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/bitcoin/depends/work/staging/aarch64-unknown-linux-gnu/xcb_proto/1.14.1-4a91ac9dc41/bitcoin/depends/aarch64-unknown-linux-gnu/lib/python3.12/site-packages/xcbgen'
 /usr/bin/install -c -m 644 __init__.py error.py expr.py align.py matcher.py state.py xtypes.py '/bitcoin/depends/work/staging/aarch64-unknown-linux-gnu/xcb_proto/1.14.1-4a91ac9dc41/bitcoin/depends/aarch64-unknown-linux-gnu/lib/python3.12/site-packages/xcbgen'
Traceback (most recent call last):
  File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'imp'
make[3]: *** [Makefile:271: install-pkgpythonPYTHON] Error 1
```

`imp` was removed in 3.12: https://docs.python.org/3/library/imp.html.
2023-07-18 11:27:24 +01:00
fanquake
3dca683cb7
build: support -no_fixup_chains in ld64
Patch in suport for using -no_fixup_chains, with ld64. This option just
seems to be missing from our version, as it exists in later releases.

This is needed so we can disable fixup_chains in our security checks.
2023-06-29 11:55:40 +01:00
Cory Fields
fb61bc0c02 depends: Bump MacOS minimum runtime requirement to 11.0
This is necessary as the new fixup_chains linker behavior is only valid
when the runtime target is >=11.0.
2023-06-22 15:28:47 +00:00
Cory Fields
c2cd47280c depends: bump darwin clang to 11.1
Unfortunately clang 10 does not understand "-mmacosx-version-min=11.0",
as it expects to see only 10.x.

Bump minimally to 11.1 to fix that problem. This will likely be our last
binary toolchain bump, as it will soon be replaced with usage of upstream
vanilla llvm.
2023-06-22 15:28:47 +00:00
Cory Fields
cbee1d7091 depends: modernize clang flags
Fixes builds with llvm >= 11 in guix by working around the problem. As a bonus,
this is much cleaner and more maintainable than what we had before.
2023-06-20 19:55:02 +00:00
Cory Fields
4fe5f3c467 depends: remove redundant stdlib option
Use of -stdlib++-isystem gets rid of any system c++ header include paths and
negates the need for this option. In newer versions of clangs the combo
produces a warning.
2023-05-22 16:02:44 +00:00