Skip to content

Commit

Permalink
Merge #6389: backport: merge bitcoin#23060, bitcoin#24164, bitcoin#23565
Browse files Browse the repository at this point in the history
, bitcoin#24337, bitcoin#27682, bitcoin#29208, bitcoin#29091, bitcoin#29165, bitcoin#29934, bitcoin#30261, partial bitcoin#27662, bitcoin#28210, bitcoin#28348, bitcoin#30263 (bump minimum compiler)

0861692 partial bitcoin#30263: Bump clang minimum supported version to 16 (Kittywhiskers Van Gogh)
5e7e563 merge bitcoin#30261: add release note for 29091 and 29165 (Kittywhiskers Van Gogh)
4d10993 merge bitcoin#29934: add LLVM instruction for macOS < 13 (Kittywhiskers Van Gogh)
7e4614a merge bitcoin#29165: Bump clang minimum supported version to 15 (Kittywhiskers Van Gogh)
f397076 merge bitcoin#29091: Bump g++ minimum supported version to 11 (Kittywhiskers Van Gogh)
35d3357 merge bitcoin#29208: Bump clang minimum supported version to 14 (Kittywhiskers Van Gogh)
c71e3df partial bitcoin#28348: Bump g++ minimum supported version to 10 (Kittywhiskers Van Gogh)
b7da1ed partial bitcoin#28210: Bump clang minimum supported version to 13 (Kittywhiskers Van Gogh)
6b22832 partial bitcoin#27662: Bump minimum supported GCC to g++-9 (Kittywhiskers Van Gogh)
f677769 merge bitcoin#27682: Bump minimum supported Clang to clang-10 (Kittywhiskers Van Gogh)
f8e0339 docs: add `libgmp` as an optional dependency (Kittywhiskers Van Gogh)
ebba607 docs: update version used to match `depends` (Kittywhiskers Van Gogh)
39b6f4b merge bitcoin#24337: Do not define `PROVIDE_FUZZ_MAIN_FUNCTION` macro unconditionally (Kittywhiskers Van Gogh)
2bd8422 merge bitcoin#23565: rewrite dependencies.md (Kittywhiskers Van Gogh)
56989ec merge bitcoin#24164: Bump minimum required clang/libc++ to 8.0 (Kittywhiskers Van Gogh)
bac407f merge bitcoin#23060: increase minimum compiler and lib(std)c++ requirements (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependent on #6516

  ## Breaking Changes

  GCC 11.1 or later, or Clang 16.0 or later, are now required to compile Dash Core.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK 0861692
  UdjinM6:
    utACK 0861692

Tree-SHA512: 6de3f8153482b4f379fd397dd3000688632356299c4f13a2f8af20d2f7337318bd3cd0b96182d6f378846b14981bc499ea32aa3d20cba6a0c7cf5f2a6e151937
  • Loading branch information
PastaPastaPasta committed Feb 7, 2025
2 parents 53529cc + 0861692 commit 09ffdea
Show file tree
Hide file tree
Showing 17 changed files with 111 additions and 298 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ task:
FILE_ENV: "./ci/test/00_setup_env_win64.sh"

task:
name: '32-bit + dash [gui] [CentOS 8]'
name: '32-bit + dash [gui] [CentOS 9]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: centos:8
image: centos:9
env:
PACKAGE_MANAGER_INSTALL: "yum install -y"
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
Expand Down
42 changes: 0 additions & 42 deletions build-aux/m4/bitcoin_runtime_lib.m4

This file was deleted.

47 changes: 0 additions & 47 deletions build-aux/m4/l_filesystem.m4

This file was deleted.

4 changes: 2 additions & 2 deletions ci/test/04_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ if [ -n "$DPKG_ADD_ARCH" ]; then
fi

if [[ $DOCKER_NAME_TAG == centos* ]]; then
${CI_RETRY_EXE} DOCKER_EXEC yum -y install epel-release
${CI_RETRY_EXE} DOCKER_EXEC yum -y install "$DOCKER_PACKAGES" "$PACKAGES"
DOCKER_EXEC yum -y install epel-release
DOCKER_EXEC yum -y install "$DOCKER_PACKAGES" "$PACKAGES"
elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
${CI_RETRY_EXE} DOCKER_EXEC apt-get update
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y "$PACKAGES" "$DOCKER_PACKAGES"
Expand Down
5 changes: 1 addition & 4 deletions ci/test/05_before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ if [[ $HOST = *-mingw32 ]]; then
fi
if [ -z "$NO_DEPENDS" ]; then
if [[ $DOCKER_NAME_TAG == centos* ]]; then
# CentOS has problems building the depends if the config shell is not explicitly set
# (i.e. for libevent a Makefile with an empty SHELL variable is generated, leading to
# an error as the first command is executed)
SHELL_OPTS="LC_ALL=en_US.UTF-8 CONFIG_SHELL=/bin/bash"
SHELL_OPTS="CONFIG_SHELL=/bin/bash"
else
SHELL_OPTS="CONFIG_SHELL="
fi
Expand Down
45 changes: 17 additions & 28 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ else
AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory])
fi

dnl check if additional link flags are required for std::filesystem
CHECK_FILESYSTEM

dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures
dnl that we get the same -std flags for both.
m4_ifdef([AC_PROG_OBJCXX],[
Expand Down Expand Up @@ -481,10 +478,7 @@ if test "x$enable_werror" = "xyes"; then

AX_CHECK_COMPILE_FLAG([-Werror=conditional-uninitialized],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=conditional-uninitialized"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Werror=sign-compare],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=sign-compare"],,[[$CXXFLAG_WERROR]])
dnl -Wsuggest-override is broken with GCC before 9.2
dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010
AX_CHECK_COMPILE_FLAG([-Werror=suggest-override],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=suggest-override"],,[[$CXXFLAG_WERROR]],
[AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])])
AX_CHECK_COMPILE_FLAG([-Wsuggest-override], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wsuggest-override"], [], [$CXXFLAG_WERROR])
AX_CHECK_COMPILE_FLAG([-Werror=unreachable-code-loop-increment],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Werror=mismatched-tags], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=mismatched-tags"], [], [$CXXFLAG_WERROR])
AX_CHECK_COMPILE_FLAG([-Werror=implicit-fallthrough], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=implicit-fallthrough"], [], [$CXXFLAG_WERROR])
Expand Down Expand Up @@ -1363,22 +1357,6 @@ if test "x$enable_fuzz" = "xyes"; then
enable_fuzz_binary=yes

AX_CHECK_PREPROC_FLAG([-DABORT_ON_FAILED_ASSUME],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DABORT_ON_FAILED_ASSUME"]],,[[$CXXFLAG_WERROR]])

AC_MSG_CHECKING([whether main function is needed for fuzz binary])
AX_CHECK_LINK_FLAG(
[[-fsanitize=$use_sanitizers]],
[AC_MSG_RESULT([no])],
[AC_MSG_RESULT([yes])
CORE_CPPFLAGS="$CORE_CPPFLAGS -DPROVIDE_FUZZ_MAIN_FUNCTION"],
[],
[AC_LANG_PROGRAM([[
#include <cstdint>
#include <cstddef>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { return 0; }
/* comment to remove the main function ...
]],[[
*/ int not_main() {
]])])
else
BITCOIN_QT_INIT

Expand All @@ -1392,8 +1370,23 @@ else
QT_DBUS_INCLUDES=SUPPRESS_WARNINGS($QT_DBUS_INCLUDES)
QT_TEST_INCLUDES=SUPPRESS_WARNINGS($QT_TEST_INCLUDES)
fi
fi

CORE_CPPFLAGS="$CORE_CPPFLAGS -DPROVIDE_FUZZ_MAIN_FUNCTION"
if test x$enable_fuzz_binary = xyes; then
AC_MSG_CHECKING([whether main function is needed for fuzz binary])
AX_CHECK_LINK_FLAG(
[],
[AC_MSG_RESULT([no])],
[AC_MSG_RESULT([yes]); CORE_CPPFLAGS="$CORE_CPPFLAGS -DPROVIDE_FUZZ_MAIN_FUNCTION"],
[$SANITIZER_LDFLAGS],
[AC_LANG_PROGRAM([[
#include <cstdint>
#include <cstddef>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; }
/* comment to remove the main function ...
]],[[
*/ int not_main() {
]])])
fi

if test x$enable_wallet != xno; then
Expand Down Expand Up @@ -1817,10 +1810,6 @@ if test x$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-bench or --enable-tests])
fi

if test x$enable_fuzz_binary = xyes; then
CHECK_RUNTIME_LIB
fi

AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
AM_CONDITIONAL([TARGET_LINUX], [test x$TARGET_OS = xlinux])
Expand Down
40 changes: 10 additions & 30 deletions doc/build-freebsd.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,6 @@

This guide describes how to build dashd, command-line utilities, and GUI on FreeBSD.

## Dependencies

The following dependencies are **required**:

Library | Purpose | Description
----------------------------------------------------------------------|------------|----------------------
[autoconf](https://svnweb.freebsd.org/ports/head/devel/autoconf/) | Build | Automatically configure software source code
[automake](https://svnweb.freebsd.org/ports/head/devel/automake/) | Build | Generate makefile (requires autoconf)
[libtool](https://svnweb.freebsd.org/ports/head/devel/libtool/) | Build | Shared library support
[pkgconf](https://svnweb.freebsd.org/ports/head/devel/pkgconf/) | Build | Configure compiler and linker flags
[git](https://svnweb.freebsd.org/ports/head/devel/git/) | Clone | Version control system
[gmake](https://svnweb.freebsd.org/ports/head/devel/gmake/) | Compile | Generate executables
[boost-libs](https://svnweb.freebsd.org/ports/head/devel/boost-libs/) | Utility | Library for threading, data structures, etc
[libevent](https://svnweb.freebsd.org/ports/head/devel/libevent/) | Networking | OS independent asynchronous networking


The following dependencies are **optional**:

Library | Purpose | Description
---------------------------------------------------------------------------|------------------|----------------------
[db5](https://svnweb.freebsd.org/ports/head/databases/db5/) | Berkeley DB | Wallet storage (only needed when wallet enabled)
[qt5](https://svnweb.freebsd.org/ports/head/devel/qt5/) | GUI | GUI toolkit (only needed when GUI enabled)
[gmp](https://svnweb.freebsd.org/ports/head/math/gmp/) | Optimized math routines | Arbitrary precision arithmetic library
[libqrencode](https://svnweb.freebsd.org/ports/head/graphics/libqrencode/) | QR codes in GUI | Generating QR codes (only needed when GUI enabled)
[libzmq4](https://svnweb.freebsd.org/ports/head/net/libzmq4/) | ZMQ notification | Allows generating ZMQ notifications (requires ZMQ version >= 4.0.0)
[sqlite3](https://svnweb.freebsd.org/ports/head/databases/sqlite3/) | SQLite DB | Wallet storage (only needed when wallet enabled)
[python3](https://svnweb.freebsd.org/ports/head/lang/python3/) | Testing | Python Interpreter (only needed when running the test suite)

See [dependencies.md](dependencies.md) for a complete overview.

## Preparation

### 1. Install Required Dependencies
Expand All @@ -44,6 +14,8 @@ pkg install autoconf automake boost-libs git gmake libevent libtool pkgconf

```

See [dependencies.md](dependencies.md) for a complete overview.

### 2. Clone Dash Repo
Now that `git` and all the required dependencies are installed, let's clone the Dash Core repository to a directory. All build scripts and commands will run from this directory.
``` bash
Expand Down Expand Up @@ -91,6 +63,14 @@ pkg install libqrencode
```
---

#### Notifications
###### ZeroMQ

Dash Core can provide notifications via ZeroMQ. If the package is installed, support will be compiled in.
```bash
pkg install libzmq4
```

#### Test Suite Dependencies
There is an included test suite that is useful for testing code changes when developing.
To run the test suite (recommended), you will need to have Python 3 installed:
Expand Down
51 changes: 16 additions & 35 deletions doc/build-osx.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,6 @@ This guide describes how to build dashd, command-line utilities, and GUI on macO

**Note:** The following is for Intel Macs only!

## Dependencies

The following dependencies are **required**:

Library | Purpose | Description
-----------------------------------------------------------|------------|----------------------
[automake](https://formulae.brew.sh/formula/automake) | Build | Generate makefile
[libtool](https://formulae.brew.sh/formula/libtool) | Build | Shared library support
[pkg-config](https://formulae.brew.sh/formula/pkg-config) | Build | Configure compiler and linker flags
[boost](https://formulae.brew.sh/formula/boost) | Utility | Library for threading, data structures, etc
[libevent](https://formulae.brew.sh/formula/libevent) | Networking | OS independent asynchronous networking

The following dependencies are **optional**:

Library | Purpose | Description
--------------------------------------------------------------- |------------------|----------------------
[berkeley-db@4](https://formulae.brew.sh/formula/berkeley-db@4) | Berkeley DB | Wallet storage (only needed when wallet enabled)
[qt@5](https://formulae.brew.sh/formula/qt@5) | GUI | GUI toolkit (only needed when GUI enabled)
[qrencode](https://formulae.brew.sh/formula/qrencode) | QR codes in GUI | Generating QR codes (only needed when GUI enabled)
[zeromq](https://formulae.brew.sh/formula/zeromq) | ZMQ notification | Allows generating ZMQ notifications (requires ZMQ version >= 4.0.0)
[sqlite](https://formulae.brew.sh/formula/sqlite) | SQLite DB | Wallet storage (only needed when wallet enabled)
[miniupnpc](https://formulae.brew.sh/formula/miniupnpc) | UPnP Support | Firewall-jumping support (needed for port mapping support)
[libnatpmp](https://formulae.brew.sh/formula/libnatpmp) | NAT-PMP Support | Firewall-jumping support (needed for port mapping support)
[python3](https://formulae.brew.sh/formula/python@3.9) | Testing | Python Interpreter (only needed when running the test suite)

The following dependencies are **optional** packages required for deploying:

Library | Purpose | Description
----------------------------------------------------|------------------|----------------------
[librsvg](https://formulae.brew.sh/formula/librsvg) | Deploy Dependency| Library to render SVG files
[ds_store](https://pypi.org/project/ds-store/) | Deploy Dependency| Examine and modify .DS_Store files
[mac_alias](https://pypi.org/project/mac-alias/) | Deploy Dependency| Generate/Read binary alias and bookmark records

See [dependencies.md](dependencies.md) for a complete overview.

## Preparation

The commands in this guide should be executed in a Terminal application.
Expand Down Expand Up @@ -81,10 +46,26 @@ The first step is to download the required dependencies.
These dependencies represent the packages required to get a barebones installation up and running.
To install, run the following from your terminal:

See [dependencies.md](dependencies.md) for a complete overview.

``` bash
brew install automake libtool boost gmp pkg-config libevent
```

For macOS 11 (Big Sur) and 12 (Monterey) you need to install a more recent version of llvm.

``` bash
brew install llvm
```

And append the following to the configure commands below:

``` bash
CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++
```

Try `llvm@17` if compilation fails with the default version of llvm.

### 4. Clone Dash repository

`git` should already be installed by default on your system.
Expand Down
26 changes: 1 addition & 25 deletions doc/build-unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,7 @@ make install # optional

This will build dash-qt as well, if the dependencies are met.

Dependencies
---------------------

These dependencies are required:

Library | Purpose | Description
------------|------------------|----------------------
libboost | Utility | Library for threading, data structures, etc
libevent | Networking | OS independent asynchronous networking

Optional dependencies:

Library | Purpose | Description
------------|------------------|----------------------
gmp | Optimized math routines | Arbitrary precision arithmetic library
miniupnpc | UPnP Support | Firewall-jumping support
libnatpmp | NAT-PMP Support | Firewall-jumping support
libdb4.8 | Berkeley DB | Wallet storage (only needed when legacy wallet enabled)
qt | GUI | GUI toolkit (only needed when GUI enabled)
libqrencode | QR codes in GUI | QR code generation (only needed when GUI enabled)
libzmq3 | ZMQ notification | ZMQ notifications (requires ZMQ version >= 4.0.0)
sqlite3 | SQLite DB | Wallet storage (only needed when descriptor wallet enabled)
systemtap | Tracing (USDT) | Statically defined tracepoints

For the versions used, see [dependencies.md](dependencies.md)
See [dependencies.md](dependencies.md) for a complete overview.

Memory Requirements
--------------------
Expand Down
Loading

0 comments on commit 09ffdea

Please sign in to comment.