Commit Graph

443 Commits

Author SHA1 Message Date
Jack Grigg 81ee683c38 make-release.py: Versioning changes for 4.4.1-rc1. 2021-06-08 22:38:24 +01:00
Jack Grigg 8943abd937 build: Link to libbcrypt on Windows
This fixes a linker issue now that the minimum Windows version is
Windows 7, and dependencies now try to use BCryptGenRandom.
2021-06-05 15:40:04 +01:00
Luke Dashjr 5bac61119a Move Win32 defines to configure.ac to ensure they are globally defined
common.vcxproj used for MSVC builds

(cherry picked from commit 1ccb9f30c040daf688f89f0d63e9f5e7b131d193)
2021-06-05 15:22:00 +01:00
fanquake 7de8682236 build: enforce minimum required Windows version (7)
Instruct the linker to set the major & minor subsystem versions in the PE
header to 6 & 1 (NT 6.1 which corresponds to Windows 7). Similar to
macOS, the binary will now refuse to run on unsupported versions of
Windows.

(cherry picked from commit e8a8cff07c409c7eecd478d3df36c7ba92c59730)
2021-06-05 15:20:22 +01:00
fanquake 865c64a8f8 build: don't pass -w when building for Windows
This has been around since the introduction of autotools. However at
this point I'm not sure we'd every want to suppress all warnings when
performing a build, and given that CXX FLAGS will have been overriden
when cross-compiling for Windows (using depends), this would rarely,
if-ever be used anyways.

From https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html:
-w

    Inhibit all warning messages.

(cherry picked from commit 89fea68ffdbd97394d891177e664f896b3e7d1e6)
2021-06-05 15:20:22 +01:00
fanquake 6ae6c9c90d build: remove --large-address-aware linker flag
This flag was used when building 32-bit Windows executables, which we no-longer
do, and is not accepted by the linker for any of the hosts we currently build
for. i.e:

```bash
checking whether the linker accepts -Wl,--large-address-aware... no
```

--large-address-aware
    If given, the appropriate bit in the "Characteristics" field of the COFF
    header is set to indicate that this executable supports virtual addresses
    greater than 2 gigabytes. This should be used in conjunction with the /3GB
    or /USERVA=value megabytes switch in the "[operating systems]" section of
    the BOOT .INI. Otherwise, this bit has no effect. [This option is specific
    to PE targeted ports of the linker]

You can check that the appropriate bit in the COFF header of our current
Windows binaries is still be set using dumpbin. i.e:

```powershell
dumpbin /headers .\bitcoind.exe

FILE HEADER VALUES
<snip>
26 characteristics
     Executable
     Line numbers stripped
     Application can handle large (>2GB) addresses
```

(cherry picked from commit acd644b83d789a6cdfbeda19732119534d10058e)
2021-06-05 15:19:13 +01:00
fanquake 9a4fb0ed4a build: remove configure checks for win libraries we don't link against
While cross compiling, HOST=x86_64-w64-mingw32, none of these
libs actually seem to be passed to the linker.

(cherry picked from commit 2525c096b002a89d4c561e1474800496ad8ebd7e)
2021-06-05 15:19:13 +01:00
fanquake c77d14d2d7 build: remove WINDOWS_BITS from build system
We no longer build/ship 32 bit windows executables.

(cherry picked from commit abc147de95fb294a2c0a3105695e708517010322)
2021-06-05 15:19:13 +01:00
Chun Kuan Lee 4ea1f9cd66 windows: Set _WIN32_WINNT to 0x0601 (Windows 7)
Also remove all defines in many places and define it in configure stage to keep consistency.

(cherry picked from commit 1bd9ffdd44000b208d29d35451f4dc9f1ac9318f)
2021-06-05 14:47:14 +01:00
Jack Grigg c54fdeed35 make-release.py: Versioning changes for 4.4.0. 2021-04-15 16:42:53 +12:00
Jack Grigg f4d88aec20 make-release.py: Versioning changes for 4.4.0-rc1. 2021-04-09 17:32:49 +12:00
Daira Hopwood f52260253c configure.ac: tidy up spacing.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-04-06 16:40:31 +01:00
Daira Hopwood 78ab48669d configure.ac: Add check for ntdll on Windows.
This fixes #5051, which is a regression caused by the dependency on the ntapi crate
(via mio, via tokio) added by #4947.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-04-06 16:39:45 +01:00
Jack Grigg 205b40da9a make-release.py: Versioning changes for 4.3.0. 2021-02-24 20:12:54 +00:00
Jack Grigg e8096841a3 make-release.py: Versioning changes for 4.3.0-rc1. 2021-02-19 21:51:00 +00:00
Pieter Wuille 1f41301c97 Add a FastRandomContext::randrange and use it
(cherry picked from commit 4fd2d2fc97e21efceab849576e544160fd5e3e3d)
2021-02-17 15:43:43 -07:00
Jack Grigg 90232f65ae Rename libzcashconsensus.la -> libzcash_script.la 2021-01-25 22:20:25 +00:00
Igor Cota 3e672a58ac Define TARGET_OS when host is android 2021-01-25 16:15:06 +00:00
Cory Fields 959e7be477 build: add missing leveldb defines
src/leveldb/build_detect_platform shows how upstream defines them.

These platform may not be able to fully build or run Bitcoin, but defining all
known to leveldb saves future hassle.

Now that all possible platforms are enumerated, specifying an unknown one is an
error.
2021-01-25 13:21:04 +00:00
fanquake 5d8fdbf738 [build] Add NETBSD leveldb target to configure.ac 2021-01-25 13:20:46 +00:00
Wladimir J. van der Laan 5304bcd6bd build: Updates for OpenBSD
- LevelDB platform was not guessed correctly (it ended up defining
  `-DOS_OPENBSD59` instead of `-DOS_OPENBSD`)

- On OpenBSD there is no convenience link from `python3.5` to `python3`:
  add detection for other python interpreter names.

- If it has to guess the LevelDB OS, print a autoconf warning so that
  the user can check.

Zcash: Excludes the Python change.
2021-01-25 13:18:53 +00:00
randy-waterhouse f5d8c93380 Re-instate TARGET_OS=linux in configure.ac. Removed by 351abf9e035. 2021-01-25 13:14:41 +00:00
Homu e528caf7fb Auto merge of #4937 - centromere:freebsd, r=daira
Add support for FreeBSD 12

The pre-built binaries for clang 8 on FreeBSD do not ship with `libc++api`, so `libcxxrt` from the base system is used instead.

Please ensure this checklist is followed for any pull requests for this repo. This checklist must be checked by both the PR creator and by anyone who reviews the PR.
* [ ] Relevant documentation for this PR has to be completed and reviewed by @mdr0id before the PR can be merged
* [ ] A test plan for the PR must be documented in the PR notes and included in the test plan for the next regular release

As a note, all buildbot tests need to be passing and all appropriate code reviews need to be done before this PR can be merged
2021-01-09 16:24:10 +00:00
Marius Kjærstad 61955934be
Update _COPYRIGHT_YEAR in configure.ac to 2021 2021-01-01 04:07:45 +01:00
Alex Wied eadc3d48f2 Add support for FreeBSD 12 2020-12-30 19:50:25 -05:00
Kris Nuttycombe c75e663c2a make-release.py: Versioning changes for 4.2.0. 2020-12-21 12:43:00 -07:00
Kris Nuttycombe f8bb085d85 make-release.py: Versioning changes for 4.2.0-rc1. 2020-12-19 09:45:41 -07:00
Homu 7dbd969b14 Auto merge of #4882 - rex4539:fix-readelf, r=daira
readelf is Linux only

Fixes https://github.com/zcash/zcash/issues/4875.
2020-12-05 14:31:11 +00:00
Dimitris Apostolou 307dd8837f
Fix readelf configuration
Co-authored-by: str4d <thestr4d@gmail.com>
2020-12-04 20:48:26 +02:00
Dimitris Apostolou 21bfa3a0e1
readelf is Linux only 2020-11-25 12:44:58 +02:00
John Newbery 41c2bc1e05 Use configparser in rpc-tests.py
Remove the use of wildcard imports in rpc-tests.py and replace with
configparser.
2020-11-21 03:03:15 +00:00
Alex Morcos 2eab4f7503 remove obsolete run-bitcoind-for-test.sh 2020-11-21 03:03:15 +00:00
Cory Fields ecf9d8eb2b build: a few ugly hacks to get the rpc tests working out-of-tree
- Link pull-tester/rpc-tests.py to the build dir
- Add the build-dir's config to the python path so that tests can find it
- The tests themselves are in srcdir
- Clean up __pycache__ in 'make clean'
2020-11-21 02:34:47 +00:00
ptschip 772d780730 Migrated rpc-tests.sh to all python rpc-tests.py
1) created rpc-tests.py
2) deleted rpc-tests.sh
3) travis.yml points to rpc-tests.py
4) Modified Makefile.am
5) Updated README.md
6) Added tests_config.py and deleted tests-config.sh
7) Modified configure.ac with script to set correct path in tests_config.py

Zcash: Migrated our test list over, and other necessary modifications.
The UI changes were not migrated.
2020-11-20 03:32:53 +00:00
Homu 877212414a Auto merge of #4745 - nathan-at-least:autoconf-require-prog, r=str4d
configure.ac: Introduce macros to simplify requiring tools.

## what

Introduce two `ZC_REQUIRE_(PROG|TOOL)` macros that are like `AC_PATH_(PROG|TOOL)` except they immediately error out if the target program is not detected.

Then require almost all programs, except for two known optional cases: three programs required only if `--with-lcov` is given, and then `ccache` which has exceptional logic (The equivalent of "--enable-ccache=auto" by default, with explicit 'yes' or 'no' possible, each with different detection needs.)

## why

Provide early explicit errors for build misconfigurations. Hopefully this should never hit our "standard official flow" which relies on the `./zcutil/build.sh` path, though it may come into play for anyone experimenting with the build system or altering dependencies.

### background motivation

While prototyping a nix build system I didn't provide the `cargo` program to the `zcashd` build process. `./configure` happily exited with a success value, but the build system was instantiated with the `CARGO` make / shell variable set to the empty string, which lead to a strange command execution where a long command of `… $CARGO build …` became `…  build …`, so bash looked for a program named `build`. I spent a bit too long looking for where "build" was defined in our dependencies. 😆
2020-11-20 01:03:29 +00:00
Nate Wilcox da081de356 configure.ac: Introduce macros to simplify requiring tools. 2020-11-20 00:59:43 +00:00
Kris Nuttycombe 142328b067 make-release.py: Versioning changes for 4.1.1. 2020-11-16 10:07:07 -07:00
Sean Bowe 75a8a6c25f
make-release.py: Versioning changes for 4.1.0. 2020-11-02 13:38:03 -07:00
therealyingtong f10cf663bc make-release.py: Versioning changes for 4.1.0-rc1. 2020-10-28 02:32:03 +08:00
Jack Grigg 0522f6f0d0 build: Update secp256k1 configure flags 2020-10-22 00:45:25 +01:00
Homu cafc622a22 Auto merge of #4757 - str4d:update-secp256k1, r=str4d
Update secp256k1

This migrates us to the same dependency version that upstream Bitcoin
Core migrated to in bitcoin/bitcoin#19944.

Also enables the endomorphism optimization now that the patents have
expired.
2020-10-21 16:55:47 +00:00
Jack Grigg 9d1a11a0e4 build: Require and build with C++ 17 2020-10-20 13:55:14 +01:00
Jack Grigg 40a5bdfc76 build: Update AX_CXX_COMPILE_STDCXX macro 2020-10-20 13:55:14 +01:00
Jack Grigg 990f77b4c0 build: Use the endomorphism optimization for secp256k1
The relevant patents have now expired:
- US7110538B2 expired 2020-09-25.
- US7995752B2 expired 2020-09-15.
2020-10-01 10:41:26 +01:00
Jack Grigg be7876adbb build: Remove a stray -lcrypto
zcash/zcash#4740 removed OpenSSL from our depends system, so we were
not satisfying this linker flag intentionally. Configurations where a
target OpenSSL could not be found by the linker, such as cross-compiles
and native macOS builds, were therefore failing. However, OpenSSL is
likely available in the system for all the "supported builders" (which
are all Linux-based), so the linker was likely being satisfied by that
library, enabling the previous PR to be merged.
2020-10-01 09:59:02 +01:00
fanquake 0ad49bca44 build: remove OpenSSL detection and libs 2020-09-30 00:40:12 +01:00
fanquake 8993f1f708 build: remove SSL lib detection 2020-09-30 00:40:12 +01:00
Cory Fields 55b4aa1942 build: verify that the assembler can handle crc32 functions
Also, enable crc32 even if -msse4.2 wasn't added by us, as long as it works.
This allows custom flags (such as -march=native) to work as expected.
2020-09-23 00:07:48 +01:00
Cory Fields f261701265 leveldb: enable runtime-detected crc32 instructions 2020-09-23 00:07:48 +01:00
Cory Fields a0336af870 build: No need to check for leveldb atomics
They're guaranteed with c++11
2020-09-22 23:03:22 +01:00
Cory Fields 58d1bbfe6f leveldb: integrate leveldb into our buildsystem
leveldb's buildsystem causes us a few problems:
- breaks out-of-tree builds
- forces flags used for some tools
- limits cross builds

Rather than continuing to add wrappers around it, simply integrate it into our
build.
2020-09-22 23:01:06 +01:00
Sean Bowe 01d1ea5f0f
make-release.py: Versioning changes for 4.0.0. 2020-09-01 13:28:51 -06:00
Sean Bowe a5d6dbde1e
make-release.py: Versioning changes for 4.0.0-rc1. 2020-08-26 10:09:33 -06:00
Kris Nuttycombe 0391809da1 Remove amqp code and Proton library depenencies & flags. 2020-07-31 13:08:18 -06:00
therealyingtong e4963385a4
make-release.py: Versioning changes for 3.1.0. 2020-07-28 06:54:02 +08:00
therealyingtong 170ea7bda0
make-release.py: Versioning changes for 3.1.0-rc2. 2020-07-15 21:50:12 +08:00
therealyingtong e2be85b3af
make-release.py: Versioning changes for 3.1.0-rc1. 2020-07-14 14:36:44 +08:00
Sean Bowe 306a336a0a
make-release.py: Versioning changes for 3.0.0. 2020-05-22 11:46:19 -06:00
Sean Bowe 7000f452fa
make-release.py: Versioning changes for 3.0.0-rc1. 2020-05-21 07:32:25 -06:00
Sean Bowe f9d4405c09
make-release.py: Versioning changes for 2.1.2-3. 2020-05-08 12:39:13 -06:00
Sean Bowe bdb2df182b
make-release.py: Versioning changes for 2.1.2-2. 2020-05-08 11:41:47 -06:00
Sean Bowe 5d24937e5f
make-release.py: Versioning changes for 2.1.2-1. 2020-05-06 10:50:43 -06:00
Sean Bowe 9eadd525a5
make-release.py: Versioning changes for 2.1.2. 2020-04-22 10:43:50 -06:00
Sean Bowe 2386046941
make-release.py: Versioning changes for 2.1.2-rc1. 2020-04-15 17:45:34 -06:00
Jack Grigg 684e62e903 Fix Rust static library linking for Windows builds
The library renaming step is necessary because the naming convention
used by rustc does not match the naming convention for libtool/MinGW.
2020-03-12 00:50:45 +13:00
Jack Grigg 90f7234136 Replace librustzcash from depends system with src/rust
The --enable-online-rust configure flag replicates the behaviour of the
LIBRUSTZCASH_OVERRIDE environment variable (enabling the build system to
use crates.io instead of vendored dependencies).
2020-03-06 16:49:03 +13:00
Homu e93586a0c4 Auto merge of #4331 - zcash:hotfix-v2.1.1-1, r=ebfull
Hotfix v2.1.1-1

The commits in this PR have been reviewed internally by our team.
2020-02-07 04:50:43 +00:00
Sean Bowe afc553c448
make-release.py: Versioning changes for 2.1.1-1. 2020-02-06 16:51:15 -07:00
Jack Grigg 2e9028f1f1 Move default -g flag into configure.ac behind --enable-debug=no
This ensures that if --enable-debug is set, we correctly use -g3 if it
is available, instead of overriding it.

Part of #4317.
2020-01-31 13:39:38 +00:00
Jack Grigg 999b3a3235 Make -fwrapv conditional on --enable-debug=no
-fwrapv and -ftrapv conflict, and whichever is last takes precedence
(for gcc). This meant that -ftrapv was being ignored when --enable-debug
was set. This commit correctly sets only one of them based on whether
--enable-debug is set.

Part of #4317.
2020-01-31 13:22:07 +00:00
Jack Grigg 42a58f1e23 configure: Change default Proton to match build.sh 2020-01-31 12:12:07 +00:00
Homu 8e8a9350c3 Auto merge of #4222 - str4d:configure-updates, r=str4d
./configure updates

Includes code cherry-picked from the following upstream Bitcoin Core PRs:

- bitcoin/bitcoin#6748
- bitcoin/bitcoin#12373
- bitcoin/bitcoin#12692
- bitcoin/bitcoin#12901
- bitcoin/bitcoin#13005
- bitcoin/bitcoin#13445
- bitcoin/bitcoin#12686
- bitcoin/bitcoin#16435

Part of #2074.
2020-01-30 16:01:48 +00:00
Gavin Andresen d7a20b6373 Simple benchmarking framework
Benchmarking framework, loosely based on google's micro-benchmarking
library (https://github.com/google/benchmark)

Wny not use the Google Benchmark framework? Because adding Even More Dependencies
isn't worth it. If we get a dozen or three benchmarks and need nanosecond-accurate
timings of threaded code then switching to the full-blown Google Benchmark library
should be considered.

The benchmark framework is hard-coded to run each benchmark for one wall-clock second,
and then spits out .csv-format timing information to stdout. It is left as an
exercise for later (or maybe never) to add command-line arguments to specify which
benchmark(s) to run, how long to run them for, how to format results, etc etc etc.
Again, see the Google Benchmark framework for where that might end up.

See src/bench/MilliSleep.cpp for a sanity-test benchmark that just benchmarks
'sleep 100 milliseconds.'

To compile and run benchmarks:
  cd src; make bench

Sample output:

Benchmark,count,min,max,average
Sleep100ms,10,0.101854,0.105059,0.103881
2020-01-22 21:40:35 +00:00
Sean Bowe 5133275342
make-release.py: Versioning changes for 2.1.1. 2020-01-17 10:26:14 -07:00
Sean Bowe 846868f0c7
make-release.py: Versioning changes for 2.1.1-rc2. 2020-01-13 17:55:01 -07:00
Sean Bowe 2c88a156ba
make-release.py: Versioning changes for 2.1.1-rc1. 2020-01-07 20:13:03 -07:00
sandakersmann 0859ea4951
Update _COPYRIGHT_YEAR in configure.ac to 2020 2019-12-27 18:04:14 +01:00
Jack Grigg a89c1058bc
configure: Don't require RELRO and BIND_NOW when cross-compiling darwin 2019-12-10 20:40:28 +00:00
Jack Grigg bbdba3be33
configure: Re-introduce additional sanitizer flags
Re-adds flags that were removed in 72aa644a2a.
2019-11-12 14:07:34 +00:00
Carl Dong 81ddf862f7
autoconf: Sane --enable-debug defaults.
Don't optimize at all when --enable-debug is supplied. This makes sure
that nothing is optimized out.
2019-11-12 13:16:10 +00:00
practicalswift a8780a982e
Add -ftrapv to DEBUG_CXXFLAGS when --enable-debug is used 2019-11-12 13:15:25 +00:00
Chun Kuan Lee 88c9e22eb2
Reset default -g -O2 flags when enable debug 2019-11-12 13:14:52 +00:00
Evan Klitzke 45e203181a
Make --enable-debug to pick better options
Various changes:

 * Don't check $GCC and $GXX
 * Prefer -Og instead of -O0
 * If -g3 isn't available, use -g

This also incidentally fixes compiler warnings with GCC and glibc when using
--enable-debug, as the old default values mixed poorly with the hardening flags.
2019-11-12 13:14:23 +00:00
practicalswift 76125f64bc
build: Show enabled sanitizers in configure output 2019-11-12 13:12:08 +00:00
Evan Klitzke ce0a143c1e
Add --with-sanitizers option to configure
This enables the use of different compiler sanitizers, coresponding to
the -fsanitize option in GCC and Clang.
2019-11-12 13:11:03 +00:00
murrayn c699c93734
Add build support for 'gprof' profiling. 2019-11-12 13:07:36 +00:00
Pavel Janík fda3f64b27
Rewrite help texts for features enabled by default. 2019-11-12 13:03:59 +00:00
Jack Grigg 72aa644a2a
Revert "Add configure flags for enabling ASan/UBSan and TSan"
This reverts commit c4379e3a22.
2019-11-12 13:01:16 +00:00
Homu 98b70f1264 Auto merge of #4215 - zcash:hotfix-2.1.0-1, r=str4d
Hotfix v2.1.0-1
2019-11-09 08:05:33 -08:00
Jack Grigg e07604a132
make-release.py: Versioning changes for 2.1.0-1. 2019-11-08 18:34:15 +00:00
Homu 5ec69e8c2c Auto merge of #4171 - defuse:fuzzer-packaging, r=str4d
Add AFL in zcutil (with all-in-one script)

Supersedes #4156 and #4167.

Fuzzing targets and input sets are defined by the contents of directories in `./src/fuzzing/`. Inside the directory, there's a `fuzz.cpp` and `fuzz.h` with a `main()` function that will replace `zcashd`'s actual `main()` as well as an `input` subdirectory containing the inputs, one per file. To just run a fuzzer, you can, for example...

```
make clean # if you've previously build zcashd without AFL instrumentation
./zcutil/afl/afl-getbuildrun.sh DecodeHexTx
```

Alternatively you can...

```
./zcutil/afl/afl-get.sh /tmp/afl   # (or wherever you want to build AFL)
./zcutil/afl/afl-build.sh /tmp/afl DecodeHexTx -j$(nproc)
./zcutil/afl/afl-run.sh /tmp/afl DecodeHexTx
```

Run `make clean` whenever you switch between a normal build and an AFL-instrumented build.
2019-11-06 03:33:05 -08:00
Eirik Ogilvie-Wigley 5be8d1ecd1 make-release.py: Versioning changes for 2.1.0. 2019-11-02 10:53:13 -06:00
Eirik Ogilvie-Wigley bdfed7e178 make-release.py: Versioning changes for 2.1.0-rc1. 2019-10-22 14:35:07 -06:00
Taylor Hornby 8a0fb36b21 Add configure option to replace main with a stub for fuzzing 2019-10-22 13:52:32 -06:00
Homu 961c0d58ec Auto merge of #4060 - str4d:remove-libsnark, r=daira
Remove libsnark

Closes #167. Closes #416. Closes #418. Closes #437.
Closes #521. Closes #743. Closes #750. Closes #894.
Closes #903. Closes #1125. Closes #1136. Closes #1240.
Closes #1264. Closes #1516. Closes #1517. Closes #1651.
Closes #2064. Closes #2158. Closes #3478. Closes #3652.
Closes #3744.
2019-09-26 11:21:40 -07:00
Daira Hopwood 1e11ffb6bb make-release.py: Versioning changes for 2.0.7-3. 2019-09-24 20:58:26 +01:00
Eirik Ogilvie-Wigley 72d2ab918d make-release.py: Versioning changes for 2.0.7-2. 2019-08-30 17:38:50 -06:00
Eirik Ogilvie-Wigley c05652b8d9 make-release.py: Versioning changes for 2.0.7-1. 2019-08-29 12:58:35 -06:00
Jack Grigg 2a47986a00
Remove libgmp 2019-08-22 15:42:53 +01:00
Jack Grigg 6a4b8b7751
Remove libsnark from build system 2019-08-22 15:42:51 +01:00