dash/doc/build-generic.md

82 lines
3.1 KiB
Markdown
Raw Normal View History

GENERIC BUILD NOTES
====================
Some notes on how to build Dash Core based on the [depends](../depends/README.md) build system.
Note on old build instructions
------------------------------
In the past, the build documentation contained instructions on how to build Dash with system-wide installed dependencies
like BerkeleyDB 4.8, boost and Qt. Building this way is considered deprecated and only building with the `depends` prefix
is supported today.
Required build tools and environment
------------------------------------
Building the dependencies and Dash Core requires some essential build tools to be installed before. Please see
[build-unix](build-unix.md), [build-osx](build-osx.md) and [build-windows](build-windows.md) for details.
Building dependencies
---------------------
Dash inherited the `depends` folder from Bitcoin, which contains all dependencies required to build Dash. These
dependencies must be built before Dash can actually be built. To do so, perform the following:
```bash
$ cd depends
$ make -j4 # Choose a good -j value, depending on the number of CPU cores available
$ cd ..
```
This will download and build all dependencies required to build Dash Core. Caching of build results will ensure that only
the packages are rebuilt which have changed since the last depends build.
It is required to re-run the above commands from time to time when dependencies have been updated or added. If this is
not done, build failures might occur when building Dash.
Please read the [depends](../depends/README.md) documentation for more details on supported hosts and configuration
options. If no host is specified (as in the above example) when calling `make`, the depends system will default to your
local host system.
Building Dash Core
---------------------
```bash
$ ./autogen.sh
2019-02-01 10:07:39 +01:00
$ ./configure --prefix=`pwd`/depends/<host>
$ make
$ make install # optional
```
Please replace `<host>` with your local system's `host-platform-triplet`. The following triplets are usually valid:
- `i686-pc-linux-gnu` for Linux32
- `x86_64-pc-linux-gnu` for Linux64
- `i686-w64-mingw32` for Win32
- `x86_64-w64-mingw32` for Win64
Merge #13617: release: require macOS 10.10+ 3828a79711 scripted-diff: prefer MAC_OSX over __APPLE__ (fanquake) fa6e841e89 gui: remove macOS ProgressBar workaround (fanquake) 68c272527f gui: remove SubstituteFonts (fanquake) 6c6dbd8af5 doc: mention that macOS 10.10 is now required (fanquake) 84b0cfa8b6 release: bump minimum required macOS to 10.10 (fanquake) 26b15df99d depends: set OSX_MIN_VERSION to 10.10 (fanquake) Pull request description: Closes #13362 d99abfddb0c8f2111340a6127e77cc686e0043d8 This workaround should no longer be required, as it should have only been in use when compiled with the 10.7 SDK, which we haven't been building with for a while now. 5bc5ae30982a0f0f6a9804b05d99434af770c724 The bugreport linked with this code is for an unrelated? issue, however from what I can tell the correct QTBUG is this one https://bugreports.qt.io/browse/QTBUG-20880. Reading though the discussion there, it seems that the way progress bars are animated changed in macOS 10.10. Qt was patched [here (5.5+)](https://codereview.qt-project.org/#/c/112379/): > Disable progress bar animations on 10.10 Yosemite and higher - the native style does not animate them any more. Keep the indeterminate progress bar animation. Given all of that, I don't think this is worth keeping around, as it would seem to only be useful in the case that a macOS user is compiling with a Qt < 5.5. That should be pretty unlikely, as we don't support downloaded Qt binaries, and brew currently provides [5.11.1](https://github.com/Homebrew/homebrew-core/blob/571b46213c70ca1573da6d0425b0bd6df34961ee/Formula/qt.rb). Tree-SHA512: 4278cb30cc9bcb313e166129ecf032c808995f8b51a3123637c47860a0010ac88f86f82ec44792153b6b1e5cca595f25013b2eaeae80194647b9ce4f7eaf32c1
2018-07-25 12:52:39 +02:00
- `x86_64-apple-darwin14` for MacOSX
- `arm-linux-gnueabihf` for Linux ARM 32 bit
- `aarch64-linux-gnu` for Linux ARM 64 bit
If you want to cross-compile for another platform, choose the appropriate `<host>` and make sure to build the
dependencies with the same host before.
If you want to build for the same host but different distro, add `--enable-glibc-back-compat` when calling `./configure`.
ccache
------
2019-11-04 13:29:32 +01:00
`./configure` of Dash Core will autodetect the presence of ccache and enable use of it. To disable ccache, use
`./configure --prefix=<prefix> --disable-ccache`. When installed and enabled, [ccache](https://ccache.samba.org/) will
cache build results on source->object level.
The default maximum cache size is 5G, which might not be enough to cache multiple builds when switching Git branches
very often. It is advised to increase the maximum cache size:
```bash
2019-11-04 13:29:32 +01:00
$ ccache -M20G
```
Additional Configure Flags
--------------------------
A list of additional configure flags can be displayed with:
```bash
./configure --help
```