Commit Graph

911 Commits

Author SHA1 Message Date
fanquake
5efebc0edb
depends: add the new LLVM debug macro
`LIBCPP_HARDENING_MODE` is the new macro, the previous one was removed in
LLVM 18.

See https://libcxx.llvm.org/Hardening.html.
2024-04-07 10:49:21 +01:00
fanquake
eb78ebc064
Merge bitcoin/bitcoin#29725: depends: build libqrencode with CMake
007ea322a6 depends: switch to building libqrencode with CMake (fanquake)
884330c0a5 guix: make cmake-minimal a global requirement (fanquake)

Pull request description:

  Switch to building libqrencode with CMake. Note that upstream (https://github.com/fukuchi/libqrencode) hasn't seen any activity for ~4 years, so the odds of getting anything upstream seems low, but I've made two minor changes to the source here, which I will PR in any case.

  From an initial look I couldn't find any significant difference between the Autotools and CMake produced libs. As part of this change we move cmake-minimal in Guix into the global package set.

ACKs for top commit:
  TheCharlatan:
    ACK 007ea322a6

Tree-SHA512: c784f790ddea958082c8ae96d3744bdf99331a8799765f9d44f00861b8e2cfcab1a88a3d64af5b10e51a8d5938d55eb6a3d271790b565e50492a39d00dc0e30f
2024-04-05 15:10:14 +01:00
fanquake
0d509bab45
Merge bitcoin/bitcoin#29527: depends: add -g to DEBUG=1 flags
84fbf9b284 depends: remove -g from sqlite debug flags (fanquake)
eef51afc6a depends: add -g to DEBUG=1 flags (fanquake)

Pull request description:

  Add `-g` to the base DEBUG=1 flags in depends.
  Avoids the need to specify it per-package.
  More alignment with `--enable-debug` behaviour in configure.

  We also want to align the optimization flags, currently -O1 vs -O0, however that can be it's own PR.

ACKs for top commit:
  theuni:
    ACK 84fbf9b284

Tree-SHA512: 1ee98ba0c13e4b80bb87632658b4f53ce49c73e0e7712990c30da60deca4a349a744232f2d78f243dee9a07f5b9b70f9c2c4ae34082c34ae51b37b054fac61fd
2024-04-03 10:43:21 +01:00
Hennadii Stepanov
2de2ea2ff6
build, depends: Fix libmultiprocess cross-compilation
This change prevents building all default targets that include `mpgen`,
which expectedly fails to link when cross-compiling.
2024-04-02 20:15:15 +01:00
fanquake
84fbf9b284
depends: remove -g from sqlite debug flags 2024-04-02 17:12:25 +01:00
fanquake
eef51afc6a
depends: add -g to DEBUG=1 flags 2024-04-02 17:12:24 +01:00
fanquake
3d37ed490a
Merge bitcoin/bitcoin#29732: depends: qt 5.15.13
430f319f73 depends: qt 5.15.13 (fanquake)

Pull request description:

  I need to try and patch around Qts buildsystem to keep #21778 moving along (the issue being that even when you tell Qt to build using Clang on Linux, it still calls out to GCC, breaking our ability to have a macOS release build env that doesn't have a GCC toolchain installed, and thus no `ld` binary).

  Before trying to patch Qt any further, update to the latest LTS release, and update the current patch set.

ACKs for top commit:
  TheCharlatan:
    Re-ACK 430f319f73
  hebasto:
    re-ACK 430f319f73.

Tree-SHA512: 11122c04d63f4ec79e5d7945e1686eaf308cb1f98c3ff8bc52e265d7353cd4f1a532f4d78d55b43183245aeebf93cc1092087d9fe83e42eefa8a69ad9017d2da
2024-04-01 16:10:42 +02:00
fanquake
8d19d688f4
Merge bitcoin/bitcoin#29738: doc: fix typos
601edd8ee8 ci: use codespell 2.2.6 (fanquake)
52fa0d285f doc: fix some typos (crazeteam)
b5ed13a240 doc: Fix typos (RoboSchmied)

Pull request description:

  Combines the recent PRs to fix typos so they can be merged.

ACKs for top commit:
  brunoerg:
    crACK 601edd8ee8
  tdb3:
    crACK 601edd8ee8
  kristapsk:
    cr utACK 601edd8ee8

Tree-SHA512: d054b1dad1336d6b9291cc5d5252d4debf6424a993d4edd6a97d7c15055a7fc48a333d30967f72e7dc9c6c1d9a9038ca8bb5e219c529f4c2365ea48404a508d0
2024-04-01 15:54:45 +02:00
fanquake
430f319f73
depends: qt 5.15.13
I need to try and patch around Qts buildsystem to keep #21778 moving
along (the issue being that even when you tell Qt to build using
Clang on Linux, it still calls out to GCC, breaking our ability to have
a macOS release build env that doesn't have a GCC toolchain installed,
and thus no ld binary).

Before trying to patch Qt any further, update to the latest LTS
release, and update the current patch set.
2024-03-27 16:45:21 +00:00
fanquake
b7e7e727ab
depends: fix mingw-w64 Qt DEBUG=1 build
The issue is that compilation is done with `x86_64-w64-mingw32-g++-posix`,
but then linking is done with `x86_64-w64-mingw32-g++`.

I'm guessing this has been broken since #24131
(01d1845a80), but have not checked.

Fixes #29734.
Unblocks #29527 (now DEBUG=1 builds can be tested).
2024-03-27 10:52:32 +00:00
RoboSchmied
b5ed13a240
doc: Fix typos
Fix three typos.
2024-03-26 16:51:37 +00:00
fanquake
007ea322a6
depends: switch to building libqrencode with CMake 2024-03-26 10:28:29 +00:00
fanquake
76045bb9d6
depends: always set CMAKE_POSITION_INDEPENDENT_CODE=ON
Rather than potentially having to set this per-package, set it globally,
as this should always be what we want. Without doing this, changes in
later commits will have to add this per-package.

Similar to https://github.com/bitcoin/bitcoin/pull/29488, which is the
Autotools equivalent.
2024-03-25 10:51:45 +00:00
fanquake
d04623678c
depends: always set CMAKE_INSTALL_LIBDIR=lib/
Rather than setting this per package, set it globally, as this is always
what we want. Without doing this, later commit will have to add the same
doc + change to more packages.
2024-03-25 10:51:08 +00:00
fanquake
556074143f
Merge bitcoin/bitcoin#29488: depends: always configure with --with-pic
e037c4fe09 depends: always configure with --with-pic (fanquake)

Pull request description:

  We currently do this sporadically. Not only amongst packages, but across OS's, i.e sometimes it's done for BSDs/Android, and sometimes not.

  Configure with `--with-pic` globally instead. I think this generally makes more sense, and should not have any downsides.

  See related discussion in https://github.com/bitcoin/bitcoin/pull/28846#discussion_r1399123100.

ACKs for top commit:
  hebasto:
    ACK e037c4fe09.

Tree-SHA512: efc743ff92f9f99f3ac16514e98363ad395c6f956cd4be7e785b5c573685baf7fcd68c51d6a705ee8761fc676eb045b7e61676595be0eb0f70f34e99174cddc0
2024-03-25 10:50:25 +00:00
fanquake
e037c4fe09
depends: always configure with --with-pic
We currently do this sporadically. Not only amongst packages, but across
OS's, i.e sometimes it's done for BSDs/Android, and sometimes not.

Configure with `--with-pic` globally instead. I think this generally
makes more sense, and should not have any downsides.

See related discussion in
https://github.com/bitcoin/bitcoin/pull/28846#discussion_r1399123100.
2024-03-14 15:41:17 +00:00
fanquake
76d6537698
depends: drop 1 qt determinism patch
No-longer required now that we are building with GCC 12.
2024-03-14 10:40:17 +00:00
fanquake
8aff3fd292
depends: don't use -h with touch on OpenBSD
Should fix #29447.
2024-03-08 13:05:47 +00:00
Sebastian Falbesoner
0fbf051fec depends: fix BDB compilation on OpenBSD
Compiling C++ code with `-D_XOPEN_SOURCE=600` causes problems on
OpenBSD. If that define is set, the C++ standard header detection
routine in BDB's configure script fails. This results in
`HAVE_CXX_STDHEADERS` not being defined, which then it turn leads to
the inclusion of `<iostream.h>` (rather than `<iostream>`), which
doesn't exist.

According to a mailing list post discussing a similar problem [1],
"OpenBSD provides the POSIX APIs by default", so we don't need this
define anyway and can remove it. This fixes the BDB build problem as
described in issue #28963.

Tested on OpenBSD 7.4 with clang 13.0.0.

[1] https://www.mail-archive.com/tech@openbsd.org/msg63386.html
2024-02-18 01:57:16 +01:00
fanquake
478ac185be
Merge bitcoin/bitcoin#29298: depends: patch libool out of libnatpmp/miniupnpc
5b9d5bf866 depends: remove (darwin) libtool now that it's no longer used (Cory Fields)
3ef6563495 depends: use ar rather than libtool for miniupnpc/libnatpmp (Cory Fields)

Pull request description:

  An alternative to https://github.com/bitcoin/bitcoin/pull/29232

  Rather than switching to the CMake builds which [proved problematic](https://github.com/bitcoin/bitcoin/pull/29232#issuecomment-1898513919), do the quick and dirty thing of just patching out libtool. Doesn't seem to introduce any new issues.

  This should buy us time to upstream the necessary CMake fixes.

ACKs for top commit:
  TheCharlatan:
    ACK 5b9d5bf866
  fanquake:
    ACK 5b9d5bf866

Tree-SHA512: c75c4bcc9332d8c1fc3395e2b5fc7265849186afc7005700f662ab291e6ea1f111025fad733d0b0b39d35029d1b757d3f1937d63aad3c0c3b88d0f8ac902ee18
2024-01-29 12:09:13 +00:00
Cory Fields
5b9d5bf866 depends: remove (darwin) libtool now that it's no longer used
Note that this is completely unrelated to gnu usage of libtool.
2024-01-26 19:52:52 +00:00
Cory Fields
3ef6563495 depends: use ar rather than libtool for miniupnpc/libnatpmp 2024-01-26 19:12:45 +00:00
Hennadii Stepanov
5fb8f0f80f
depends: Do not override CFLAGS when building SQLite with DEBUG=1
The `--enable-debug` configure option for the SQLite package does two
things. It adds three preprocessor definitions and overrides CFLAGS with
"-g -O0". The latter breaks the user's ability to provide sanitizer and
LTO flags.
2024-01-25 12:25:27 +00:00
Hennadii Stepanov
2b0dd88f1c
depends: Ensure definitions are passed when building SQLite with DEBUG=1
The SQLite build system overrides the `CFLAGS` when is configured with
the `--enable-debug` option.
2024-01-25 12:23:49 +00:00
fanquake
f1ab078ed7
Merge bitcoin/bitcoin#29276: depends: Update libmultiprocess library to fix C++20 macos build error
b8105b3ed7 depends: Update libmultiprocess library to fix C++20 macos build error (Ryan Ofsky)

Pull request description:

  Fixes #29248

  The std::result_of type was removed in c++20, but was being referenced in some old, unused code in the library. The issue was fixed in:

  - https://github.com/chaincodelabs/libmultiprocess/pull/91

  This update also includes other recent libmultiprocess changes to improve C++20 support and fix build issues:

  - https://github.com/chaincodelabs/libmultiprocess/pull/89
  - https://github.com/chaincodelabs/libmultiprocess/pull/90
  - https://github.com/chaincodelabs/libmultiprocess/pull/93

ACKs for top commit:
  fanquake:
    ACK b8105b3ed7.

Tree-SHA512: 2ca64b5fc27be752baba38df4b4faf62152e18c70ead6e0e063f1cb0c25dd5d924dec7ebfd7f8bbd651ae50eb35e8d8b591a9847c36f22558b5f5effccf56536
2024-01-23 17:06:57 +00:00
Ryan Ofsky
b8105b3ed7 depends: Update libmultiprocess library to fix C++20 macos build error
Fixes #29248

The std::result_of type was removed in c++20, but was being referenced in some
old, unused code in the library. The issue was fixed in:

https://github.com/chaincodelabs/libmultiprocess/pull/91 util: Drop Bind, BindTuple, ComposeFn, GetFn, and ThrowFn helpers

This update also includes other recent libmultiprocess changes to improve C++20
support and fix build issues:

https://github.com/chaincodelabs/libmultiprocess/pull/89 pkgconfig: Drop -std=c++17 compile flag
https://github.com/chaincodelabs/libmultiprocess/pull/90 pkgconfig: Use @CMAKE_INSTALL_LIBDIR@ variable
https://github.com/chaincodelabs/libmultiprocess/pull/93 Fix support for vector<bool> serialization with libc++
2024-01-22 11:47:13 -05:00
fanquake
03752444cd
Merge bitcoin/bitcoin#29249: depends: add NM output to gen_id
6ec2813cd8 depends: add NM output to gen_id (fanquake)

Pull request description:

  `NM` is part of the current toolset, and can be set by the user. Include it in `gen_id`.

ACKs for top commit:
  TheCharlatan:
    Re-ACK 6ec2813cd8

Tree-SHA512: 2ada61e03783f9eb441f285ef5da50557ad729cb52ce2d2c4b2c38103dab29920a26262d4545fd2ac7fbf1cedc4902cd2359833544fbc0debf829c12a63e9769
2024-01-19 13:17:16 +00:00
fanquake
cbc9bf11fe
build: move -mlinker-version to *FLAGS
This doesn't need to exist in C & CXX.
2024-01-16 09:53:27 +00:00
fanquake
42b2283765
depends: deduplicate use of mmacosx-version-min in macOS build 2024-01-16 09:52:39 +00:00
fanquake
6ec2813cd8
depends: add NM output to gen_id 2024-01-16 09:44:09 +00:00
fanquake
2ac2821a74
Merge bitcoin/bitcoin#29185: build: remove --enable-lto
2d1b1c7dae build: remove --enable-lto (fanquake)

Pull request description:

  This has outlived its usefulness, doesn't gel well with newer compilers & `-flto` related options, i.e thin vs full, or `=auto`, and having `-flto` as the only option means that sometimes this just needs to be worked around, i.e in oss-fuzz:
  https://github.com/google/oss-fuzz/blob/master/projects/bitcoin-core/build.sh.

  While it was convenient when `-flto` was newer, support for `-flto` is now in all compilers we use, and there's also no-longer any real need for us to treat `-flto` different to any other optimization option.

  Remove it, to remove build complexity, and so there's no need to port a similar option to CMake.

  Note that the LTO option remains in depends, because we still a way to build packages that have LTO specific patches/options.

ACKs for top commit:
  TheCharlatan:
    ACK 2d1b1c7dae
  hebasto:
    ACK 2d1b1c7dae.

Tree-SHA512: 91812de7da35346f51850714a188fcffbac478bc8b348bf756c2555fcbde86ba622ac2fb77d294dea0378c741d3656f06121ef3a795aeed63fd170fc31bfa5af
2024-01-16 09:42:12 +00:00
Mark Friedenbach
4756114e50 [depends] Allow PATH with spaces in directory names.
added test and update code based on feedback
2024-01-11 15:36:18 -03:00
fanquake
131dd11ffd
Merge bitcoin/bitcoin#28870: depends: Include config.guess and config.sub into meta_depends
ff3f51b402 depends: Include `config.guess` and `config.sub` into `meta_depends` (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  theuni:
    ACK ff3f51b402.

Tree-SHA512: e8575473d3fca2293181131c76bd6d43017fe753d2e670c53227a646b64b069dc542a0fc50a77b43e74bc6a0c0159ffa2fb1c3ff3aef9625684e0f78c16ad960
2024-01-11 16:32:52 +00:00
Hennadii Stepanov
080763a058
build: Drop ALLOW_HOST_PACKAGES support in depends
The `ALLOW_HOST_PACKAGES` variable was introduced in bitcoin#10508 "to
speed up build and avoid timeout".

It is no longer the case for our CI infrastructure, which uses self-
hosted persistent workers and depends caching.

In the current circumstances, it does not seem worth porting this
feature to the upcoming CMake-based build system.
2024-01-08 15:56:25 +00:00
fanquake
2d1b1c7dae
build: remove --enable-lto
This has outlived its usefulness, doesn't gel well with
newer compilers & `-flto` related options, i.e thin vs full, or `=auto`,
and having `-flto` as the only option means that sometimes this just
needs to be worked around, i.e in oss-fuzz:
https://github.com/google/oss-fuzz/blob/master/projects/bitcoin-core/build.sh.

While it was convenient when `-flto` was newer, support for `-flto` is now
in all compilers we use, and there's also no-longer any real need
for us to treat `-flto` different to any other optimization option.

Remove it, to remove build complexity, and so there's no need
to port a similar option to CMake.

Note that the LTO option remains in depends, because we still a way to
build packages that have LTO specific patches/options.

If we decide to merge this, I'll follow up downstream in oss-fuzz first,
to make sure we don't break the build.
2024-01-05 15:17:50 +00:00
fanquake
6047e25035
Revert "depends: systemtap: remove variadic params that trigger compiler warnings"
This reverts commit df7ae8b7ca.
2024-01-04 17:11:37 +00:00
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