Commit Graph

477 Commits

Author SHA1 Message Date
Sean Bowe 03ce24013a
Update Rust to 1.44.1. 2020-09-22 15:06:01 -06:00
Jack Grigg 2449349882 depends: Ensure that SOURCES_PATH exists before vendoring crates
During Gitian builds, SOURCES_PATH is set to a path within the Gitian
cache. Normally this path is created as part of creating a particular
dependency's source directory, but in some situations we may vendor Rust
crates before this folder exists.
2020-09-19 13:35:36 +01:00
Jack Grigg 549bf2dfa8 depends: Switch to `cargo vendor` for Rust dependencies
When we first integrated Rust into our build system, we had two
limitations:

- We were building the `librustzcash` FFI library as a dependency, and
  therefore needed access to its crate dependencies in the depends
  system.
- Gitian builds happen offline, so we needed to fetch any crate
  dependencies ahead of time, and then configure cargo to use these in
  an offline environment.

At the time, `cargo` already had support for "Source Replacement", but
there was no easy way to package the dependencies in the necessary way.
What we implemented was effectively the `cargo-vendor` tool, built using
Makefiles. A noticeable downside was that we were pinning dependencies
twice: once in the `Cargo.lock` for the FFI library, and again in our
depends system.

Since then, `cargo-vendor` has been upstreamed into `cargo` itself, and
we have moved `librustzcash` into this repository. We can therefore use
`cargo vendor` directly from our pinned Rust compiler to fetch the
dependencies, and rely on our local `Cargo.lock` to pin the specific
crates we are relying on.
2020-09-18 22:55:57 +01:00
Jack Grigg f0babb8356 depends: cargo update 2020-08-25 13:07:22 +01:00
Jack Grigg c10ba7da41 depends: Migrate to zcash_* 0.3.0 Rust crates 2020-08-25 13:07:22 +01:00
Homu 2502ebb183 Auto merge of #4656 - str4d:depends-fixes, r=str4d
depends: Fixes to build system
2020-08-10 23:58:27 +00:00
Jack Grigg 682bc15757 depends: Split check-packages and check-sources across categories
All the text from a make action is passed as arguments to a single
execve call, and it can't be longer than the maximum size allowed by the
operating system. We now have enough Rust crates vendored by the depends
system that we are hitting this limit here.
2020-08-10 22:52:23 +01:00
Jack Grigg ddc517b2c8 depends: Add platform-specific overrides for download files 2020-08-10 22:52:23 +01:00
Jack Grigg 2a3770cfbf depends: Rework Rust integration
The Rust toolchain is now a native dependency, and the vendored crates
no longer depend on the native toolchain.
2020-08-10 22:52:23 +01:00
Homu 9487115cbb Auto merge of #3952 - LongShao007:master, r=daira
Remove unnecessary patch in bdb.mk

there is no "__atomic_compare_exchange" function in "src/dbinc/atomic.h".
2020-08-10 13:31:55 +00:00
Jack Grigg 927a03465f Merge branch 'master' into modernise-macos-toolchain 2020-08-08 00:07:31 +01:00
Homu d36718542c Auto merge of #4597 - str4d:rust-tracing, r=str4d
Use the Rust tracing crate for C++ logging

This PR swaps in the `tracing` crate (via FFI) for logging to either standard
output or `debug.log`. It transparently maps all existing `LogPrintf` and
`LogPrint` invocations to info-level `tracing` events, and passes through
correct file and line information. `error` invocations are mapped to error-level
`tracing` events, currently without line information (due to the way that
`error` is used in the codebase; swapping individual callsites to the new
`LogError` macro will provide that information).

The end-goal for this change is that we don't need to make any disruptive
changes to the codebase, but we can start to leverage `tracing`-specific
functionality where we want to, such as providing extra fields on certain log
lines (that can be filtered for), adding spans to record the flow of execution
through `zcashd`, and logging within C++ and Rust simultaneously. Support
for extra fields on spans and events will be added in a subsequent PR.

The `-debug` config options are converted at launch into their corresponding
directives for tracing's `EnvFilter`. The new `setlogfilter` RPC method allows
this filter to be reloaded dynamically. The syntax is documented in the
`setlogfilter` help text, as well as here:

https://docs.rs/tracing-subscriber/0.2.7/tracing_subscriber/filter/struct.EnvFilter.html#directives

When `-printtoconsole` is specified, the output now includes timestamps and
ANSI encoding :)
2020-08-07 21:54:46 +00:00
Homu 205c7b5844 Auto merge of #4653 - str4d:reliable-dependency-fetching, r=str4d
depends: Revert to using upstreams as primary download paths

We use the depends system for vendoring `zcashd` dependencies, pinning them
with SHA-256 hashes. It supports fetching dependencies from both their
upstream archive source, and a mirror operated by ECC.

In #816, we switched to the ECC mirror as the primary source, due to an
unreliable upstream (SourceForge). However, this only addressed the symptom
(that dependency builds would reliably fail with an unreliable upstream that
was serving incorrect files). In particular, if the ECC mirror were to become
similarly unreliable, the issue would return.

This PR fixes the core problem, by downloading dependencies and checking
their hashes as an atomic operation. This gives us greater resiliency, as
both the primary and fallback would need to fail in order to halt the build.
Having addressed this problem, we also switch back to using upstreams as
primary download paths.
2020-08-07 18:14:56 +00:00
Jack Grigg 70c518bb84 depends: tracing-core 0.1.13 2020-08-07 15:26:28 +01:00
Jack Grigg 2b7d824714 Use a tracing EnvFilter directive for -debug flags 2020-08-07 15:08:10 +01:00
Jack Grigg e6a52fa9c8 Add tracing to librustzcash dependencies 2020-08-07 15:07:44 +01:00
Homu 022c3a4c6d Auto merge of #4567 - oxarbitrage:issue4537, r=daira
Build BDB utilities

To install the binaries we need to build with just `install` instead of `install_lib` and `install_include`, this will install everything.

Then the binaries will be moved to a folder in `zcutil` directory. We can just leave them in staging however the user might have a hard time to find them there.

Closes https://github.com/zcash/zcash/issues/4537
2020-08-07 11:11:47 +00:00
Jack Grigg 9cdc6f2a85 depends: Use FALLBACK_DOWNLOAD_PATH if the primary's hash doesn't match
The previous behaviour was to use FALLBACK_DOWNLOAD_PATH to download
dependencies if the primary did not resolve. This was not resilient
against primaries that either mis-report HTTP status codes (e.g.
SourceForge returning 200 OK alongside a 404 webpage), or did not
guarantee artifacts to be bit-stable (e.g. GitHub regenerating commit
archive caches in a non-reproducible manner); in either case, the
incorrect file would be fetched and then the build would fail due to
hash mismatch.

The new behaviour is to download dependencies and check their hashes as
an atomic operation, and use FALLBACK_DOWNLOAD_PATH if any part of the
operation fails.
2020-08-07 10:07:07 +01:00
Jack Grigg 25ef1940b0 Revert "Try downloading from our mirror first to avoid headaches."
This reverts commit 5cd512b928.
2020-08-07 09:14:20 +01:00
Jack Grigg a4bfd2ea09 Revert "Rename FALLBACK_DOWNLOAD_PATH to PRIORITY_DOWNLOAD_PATH"
This reverts commit be60c6d7f6.
2020-08-07 09:13:23 +01:00
Kris Nuttycombe 0391809da1 Remove amqp code and Proton library depenencies & flags. 2020-07-31 13:08:18 -06:00
Cory Fields 7e4a74ddf6 depends: bump native_cctools for fixed lto with external clang
https://github.com/tpoechtrager/cctools-port/pull/85 was merged upstream, which
fixes lto detection for external clang with some Linux Distro's including
Ubuntu.
2020-07-30 04:36:02 +01:00
Cory Fields 7a714958d4 depends: enable lto support for Apple's ld64
Note that this does not _enable_ lto by default in any way, only hooks up the
machinery for -flto to work correctly.

enable-lto-support is explicitly used for pinned-clang because we know it
works. It is neither enabled nor disabled in the external clang case so that
it can be auto-detected.
2020-07-30 04:35:25 +01:00
Carl Dong 25cc992ea3 depends: Add justifications for macOS clang flags 2020-07-30 04:33:36 +01:00
Cory Fields b22d18063b depends: specify libc++ header location for darwin
For depends builds this was fixed by fbcfcf69, which deleted the conflicting
headers. When we no longer control the clang installation, we need to ensure
that the SDK's libc++ headers are used rather than the ones shipped with clang.
We can do that by turning off the default include path and hard-coding our own.
This hard-coded path is ok because we control (via SDK packaging) where these
headers end-up.

Side-note: Now that this path is hard-coded in depends, we can potentially
package the SDK differently, as the c++ folder can live wherever is most
convenient for us.
2020-07-30 04:33:36 +01:00
Carl Dong 6ae57751cc depends: Specify path to native binaries as clang argument
Zcash: Extracted from upstream commit:
    depends: Allow building with system clang
2020-07-30 04:33:36 +01:00
Carl Dong d6c3af5e84 depends: Decouple toolchain + binutils
For now they remain the same, but in the next commit, we will assign
them differently according to wether or not we're using system clang.
2020-07-30 04:33:36 +01:00
fanquake a21fa08e0b doc: explain why passing -mlinker-version is required 2020-07-30 04:33:36 +01:00
Cory Fields 6b785ae72d darwin: pass mlinker-version so that clang enables new features
Without this clang fails to add any newly-added linker features.

Removing this in ca5055a5aa07aba81a87cf12f6f0526a63c423b5 was likely a
regression.

See https://github.com/bitcoin/bitcoin/pull/19240#issuecomment-647764049
for more discussion.
2020-07-30 04:33:36 +01:00
Cory Fields cc934c2b1d macos: Bump to xcode 11.3.1 and 10.15 SDK
This gets us a newer SDK with c++17 support and retains 10.12
back-compat.

Co-authored-by: Carl Dong <contact@carldong.me>
2020-07-30 04:33:36 +01:00
Cory Fields a53d5ea8e9 depends: bump MacOS toolchain
clang   6.0.1  -> 8.0.0
cctools 921    -> 949.0.1
ld64    409.12 -> 530
2020-07-30 04:33:36 +01:00
Carl Dong 8e1a78ab63 native_cctools: Don't use libc++ from pinned clang
Now that we include the macOS SDK libc++ headers in our macOS SDK
tarball, we no longer need this hack to use the libc++ from our pinned
clang.
2020-07-30 04:33:36 +01:00
Carl Dong d02d06b565 Adapt rest of tooling to new SDK naming scheme 2020-07-30 04:33:36 +01:00
fanquake d75478432f build: use macOS 10.14 SDK
Co-Authored-By: Carl Dong <accounts@carldong.me>
2020-07-30 04:33:36 +01:00
fanquake a346fc0086 depends: native_cctools 921, ld64 409.12, libtapi 1000.10.8
This also removes the obsolete mlinker-version option

Co-Authored-By: Cory Fields <cory-nospam-@coryfields.com>

Zcash: Excludes QT changes.
2020-07-30 04:33:36 +01:00
fanquake 49c023c871 depends: clang 6.0.1
This also removes some now-unnecessary cctools hacks.

Co-Authored-By: Cory Fields <cory-nospam-@coryfields.com>
2020-07-30 04:33:36 +01:00
fanquake e04c184205 build: set minimum supported macOS to 10.12 2020-07-30 04:33:36 +01:00
fanquake 0d3e5fc43c depends: set OSX_MIN_VERSION to 10.10 2020-07-30 04:33:36 +01:00
Kris Nuttycombe 84e8cce77d Use ed25519-zebra from crates.io. 2020-07-08 13:11:27 -06:00
Alfredo Garcia 19f641560f install bdb binaries
Co-authored-by: Jack Grigg <jack@z.cash>
2020-06-30 10:25:00 -03:00
Sean Bowe 14bdf7e811
Remove bincode crate. 2020-06-23 15:38:59 -06:00
Sean Bowe 9f71fa1c09
Change to version of ed25519-zebra crate which is compliant with ZIP 215. 2020-06-23 13:17:27 -06:00
Sean Bowe 3688f508d8
Make ed25519-zebra available via librustzcash. 2020-06-22 15:58:26 -06:00
Sean Bowe 55ac118e65
Pass DO_NOT_UPDATE_CONFIG_SCRIPTS=1 to autogen.sh in libsodium dependency, to avoid updating config scripts over the network. 2020-05-18 11:37:04 -06:00
ca333 61c4b6c432
fix dead openssl download path
updates openssl 1.1.1a download path analogue to 318ec36218

fyi: we are testing 1.1.1f in https://github.com/KomodoPlatform/komodo/pull/314
2020-04-05 02:41:59 +02:00
Homu c7f1ec471e Auto merge of #4401 - str4d:4397-rust-darwin-target, r=str4d
depends: Hard-code Rust target for all Darwin hosts

Closes #4397.
2020-03-13 17:28:53 +00:00
Jack Grigg 1ce96648ad depends: Hard-code Rust target for all Darwin hosts
GCC Darwin hosts include a version number, but Rust only has a single
Darwin target.
2020-03-13 22:27:14 +13:00
Jack Grigg 1bb543414a depends: Define Rust target in a single location 2020-03-13 22:27:14 +13:00
Jack Grigg c7b2fc101d Bring in updates to librustzcash crate
Source: https://github.com/zcash/librustzcash.git
Revision: 53bd5d4724c96374c4bf94068207fcc362b01ac7
2020-03-13 14:16:45 +13:00
Jack Grigg 11d257bd72 depends: Use Rust 1.42.0 toolchain 2020-03-13 13:47:56 +13:00
Homu 4eb3dc7ec6 Auto merge of #4321 - str4d:internalise-rust, r=str4d
Bring the librustzcash crate into this repository

Rust dependencies are now canonically pinned within this repository by
`Cargo.lock`. We continue to use the depends system for vendoring the
dependencies, to ensure our Gitian builds continue to function (which have
no network access at build time, and fetch dependencies separately).

The `--enable-online-rust` configure flag replicates the behaviour of the
`LIBRUSTZCASH_OVERRIDE` environment variable (enabling the build system to
use https://crates.io instead of vendored dependencies).

This pulls in the exact version of `librustzcash` that we currently depend on
(corresponding to the `0.1.0` tag in https://github.com/zcash/librustzcash).
The changes to the crate since then will be pulled in as a separate PR.

Part of zcash/librustzcash#155.
Part of #4230.
2020-03-11 14:20:17 +00:00
Homu dcd3614de4 Auto merge of #4359 - str4d:2872-upgrade-libsodium, r=str4d
Upgrade libsodium to 1.0.18

Includes patches that maintain consensus compatibility with libsodium 1.0.15 for Ed25519 pubkey and signature validation.

Replaces #4239. Closes #2872.
2020-03-10 03:10:01 +00:00
Jack Grigg a04acde970 depends: Remove unused vendored crates 2020-03-06 16:49:03 +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
Jack Grigg 0cca79a2d8 depends: Remove comments from libsodium signature validation patch
Some of the comments in the 1.0.15 code were incorrect.
2020-03-06 16:19:23 +13:00
Homu 6a6114f954 Auto merge of #4355 - rex4539:fix-lf, r=str4d
End diff with LF character

Fixes https://github.com/zcash/zcash/issues/4354.
2020-02-20 12:21:22 +00:00
Homu 27c04c8f9c Auto merge of #4146 - str4d:z_viewtransaction, r=str4d
z_viewtransaction

This RPC method returns all decryptable information for any transaction in the wallet.

Several values are conditionally included in the output for convenience:
- `recovered`: True if an output is not for a Sapling address in the wallet.
- `memoStr`: The text form of an output's memo, if it is valid UTF-8.
- Values are provided both in decimal currency units, and integer zatoshis.
2020-02-19 20:52:47 +00:00
Jack Grigg 0f12f47f58 Patch libsodium 1.0.15 signature validation onto 1.0.18 2020-02-18 01:18:37 +00:00
Jack Grigg 4fe5969157 Patch libsodium 1.0.15 pubkey validation onto 1.0.18 2020-02-18 01:18:37 +00:00
ca333 d4644e7ed0 update libsodium to v1.0.18
according to changelogs backwards compatible and containing various optimizations:

https://github.com/jedisct1/libsodium/releases
https://fossies.org/diffs/libsodium/1.0.15_vs_1.0.16/ChangeLog-diff.html
https://fossies.org/diffs/libsodium/1.0.16_vs_1.0.17/ChangeLog-diff.html
https://fossies.org/diffs/libsodium/1.0.17_vs_1.0.18/ChangeLog-diff.html

(EDIT by str4d): The update is not in fact backwards-compatible; the
passing test cases added in the previous commit fail as of this commit.
2020-02-18 01:18:37 +00:00
Dimitris Apostolou daff771ca4
End diff with LF character 2020-02-16 21:14:42 +02:00
Dimitris Apostolou 2d2b7a1be7
Fix Boost compilation on macOS 2020-02-07 21:41:02 +02:00
Jack Grigg 42a58f1e23 configure: Change default Proton to match build.sh 2020-01-31 12:12:07 +00:00
Jack Grigg 97ab74a887 depends: Add utfcpp to dependencies 2020-01-29 15:59:52 +00:00
Miles Manley 6f28ddc3a5
Update libsodium download-path
Fixes error 404 when building for macOS

Maybe update to 1.0.16?
2020-01-13 13:23:16 +09:00
Taylor Hornby 84497b862a Fix broken proton build 2020-01-08 16:23:29 -07:00
Taylor Hornby a5affb11d1 Update proton from 0.26.0 to 0.30.0 2020-01-07 21:36:14 +00:00
Dimitris Apostolou a41021777e
depends macOS: hide linker visibility warnings 2019-12-12 00:11:12 +02:00
Jack Grigg adb47482c8
Revert "depends: Explicitly set Boost toolchain during configuration"
This reverts commit 734e594c2c.

It appears that this was fixing a single issue with the FreeBSD build,
while b6d0996cec addressed the underlying
cause. However, the change in this commit overrides the underlying fix
when cross-compiling for Darwin.
2019-12-10 20:40:30 +00:00
Jack Grigg 97098c45cb
depends: Manually apply build_env to second half of googletest build
The build environment is applied to the entire configured build_cmds
section, but it doesn't carry over past the && between the gmock and
gtest builds. This causes problems when cross-compiling for darwin, as
the correctly-configured clang++ is provided in the build environment.
2019-12-10 20:40:29 +00:00
Jack Grigg 073f5b8f48
depends: Add Rust targets for cross-compiling darwin 2019-12-10 20:40:26 +00:00
Jack Grigg 576de307fe
depends: Compile bdb with --disable-atomics when cross-compiling darwin
This sidesteps the problem where the atomics check tries to run a test
binary, which cannot be performed during cross compilation. We should
replace this with a better solution in future.

Part of #3710.
2019-12-10 20:38:33 +00:00
Ulrich Kempken 2e5bb0a4a2
depends: switch to secure download of all dependencies
Some dependency sources were downloaded via http, even though https (SSL/TLS) options are available.
Even if we potentially check the integrity of the downloaded files via hash comparison, we should make
use of this additional security layer.

Zcash:
native_cctools.mk
2019-12-10 20:38:32 +00:00
Carl Dong 6dcba32cc4
depends: tar: Always extract as yourself
For normal users, --no-same-owner is default, but not so for root, where
it is assumed that root can change ownership willy-nilly. This is not
the case for privilege-limited container environments where we gaslight
the process into thinking it's root.

Zcash: Excludes QT changes
2019-12-10 20:38:31 +00:00
Cory Fields 8ae1b9ded1
depends: make osx output deterministic
ld64 is threaded, and uses a worker for each CPU to parse input files. But
there's a bug in the parser causing dependencies to be calculated differently
based on which files have already been parsed.

As a result, builders with more CPUs are more likely to see non-determinism.

This looks to have been fixed in a newer version of ld64, so just disable
threading for now. There's no noticible slowdown.
2019-12-10 20:38:30 +00:00
Cory Fields f7f7b1c557
depends: bump OSX toolchain
clang: 3.7.1
cctools: 877.8
ld64: 253.9

Zcash: Second part of f25209a3e1e6488d4d44de15b0f113d2302e9aee from
upstream (we merged the first part in #2697).
2019-12-10 20:38:29 +00:00
Cory Fields 4d59b8bdd1
depends: qt/cctools: fix checksum checksum tests
Checksums were being verified after download, but not again before extraction

Zcash: Only cctools changes
2019-12-10 20:38:28 +00:00
Jack Grigg be43fb5e98
Revert "Remove insecurely-downloaded dependencies that we don't currently use."
This partially reverts commit 86551dcb18
to bring back native_cctools for cross-compiling macOS.
2019-12-10 20:38:27 +00:00
Homu 0d7b08d1f0 Auto merge of #4160 - str4d:upgrade-librustzcash, r=str4d
Upgrade librustzcash to 0.2.0

This is backed by the 0.1.0 versions of our Zcash Rust crates.
2019-11-06 13:39:04 -08:00
Jack Grigg be2fdeaaf3
Upgrade librustzcash to 0.2.0
librustzcash now requires a minimum of Rust 1.36.0.

The proc-macro2, quote, syn, and unicode-xid dependencies are pulled in
because we moved to using ff_derive inside pairing to derive the
BLS12-381 fields. We will be going back to explicit implementations with
the jubjub and bls12_381 crates, so these dependencies will disappear
once that is done.

The autocfg crate is pulled in by the upgraded num-integer crate, which
is transitively used by fpe. Rewriting fpe to not use num-bigint would
drop:

- autocfg
- num-bigint
- num-integer
- num-traits

We primarily depend on rand_core in our crates. The rand crate, and its
other dependencies, are pulled in for two reasons:

- The group crate exposes testing helper functions in its public API
  that use distribution sampling APIs in the rand crate.

- zcash_primitives::transaction::Builder uses rand::seq::SliceRandom to
  shuffle the order of Sapling spends and outputs.

Refactoring these in order to drop rand would additionally drop:

- c2-chacha
- rand_chacha
- rand_hc
- rand_xorshift
2019-10-20 19:10:34 +13:00
Dimitris Apostolou a80942f558
depends macOS: point --sysroot to SDK 2019-10-16 15:13:57 +03:00
Homu f25d36b9e8 Auto merge of #4129 - str4d:librustzcash-dev-tooling, r=Eirik0
Developer tooling for librustzcash

Closes #4106.
2019-10-08 10:24:35 -07: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
Homu a722aa69a2 Auto merge of #4030 - str4d:freebsd-build, r=str4d
Add FreeBSD build support

Usage on FreeBSD:

> $ pkg install autoconf automake bash cmake gcc gmake libtool pkgconf
> $ MAKE=gmake ./zcutil/build.sh

Closes #4023.
2019-09-12 10:00:28 -07:00
Jack Grigg 1822eb333f
depends: Add flag for building with a local librustzcash repo
Usage:
$ ./zcutil/build.sh LIBRUSTZCASH_OVERRIDE=/path/to/librustzcash
2019-09-07 04:05:56 -04:00
Jack Grigg 8c1f5fa729
depends: Helper for vendoring new crates 2019-09-07 04:04:45 -04:00
Jack Grigg f3ec4534ee
depends: Fix crate vendoring path 2019-09-07 04:04:13 -04:00
Jack Grigg 2a47986a00
Remove libgmp 2019-08-22 15:42:53 +01:00
Eirik Ogilvie-Wigley b49e782eba Update download path 2019-08-16 13:21:32 -06:00
Jack Grigg ae6cee2731 depends: Set PIC flags for FreeBSD 2019-05-22 16:56:45 +00:00
Jack Grigg b6d0996cec depends: Use project-config.jam to configure Boost instead of user-config.jam
Per the Boost.Build documentation, user-config.jam is supposed to only
be located in the user's home directory, and this appears to be enforced
on FreeBSD.
2019-05-22 16:56:22 +00:00
Jack Grigg dea27818e6 depends: Explicitly call Rust install script using bash
On FreeBSD 12, the bash package is not necessarily installed to /bin/bash,
which the install script assumes is the location. Since we depend on bash
for building anyway, we can just explicitly call it.
2019-05-22 12:09:43 +00:00
Jack Grigg 40d848dc04 depends: Add FreeBSD Rust binaries 2019-05-22 12:08:59 +00:00
Jack Grigg bfc997c32e depends: Patch libevent to detect arch4random_addrandom
See details in https://github.com/libevent/libevent/issues/615.
The patches can be dropped after we move to the next stable release.
2019-05-22 11:37:56 +00:00
Jack Grigg dc0c977906 depends: Add FreeBSD support to OpenSSL 2019-05-22 11:03:42 +00:00
Jack Grigg 734e594c2c depends: Explicitly set Boost toolchain during configuration 2019-05-22 10:53:53 +00:00
Jack Grigg 5222c39cd0 depends: Add FreeBSD to hosts and builders 2019-05-22 10:46:21 +00:00
Homu 8a95ba235d Auto merge of #3951 - LarryRuane:3947-integer-log2-warn, r=ebfull
Update boost to v1.70.0 to eliminate build warning

Closes #3947.
2019-04-24 05:00:33 -07:00
Larry Ruane c17d828ffd Update boost from v1.69.0 to v1.70.0. #3947 2019-04-23 11:29:55 -06:00
Homu ab856294d9 Auto merge of #3505 - str4d:rust-targets, r=str4d
depends: Support additional cross-compilation targets in Rust

This will make it easier for third parties to cross-compile `zcashd` for other platforms. The third commit in this PR shows how to add a new target to the Rust dependency builder.

The default Rust target during cross-compilation is the canonical host, which is derived from `HOST` using `depends/config.sub`. If the canonical host differs from the required Rust target, add the necessary mapping in addition to the target itself.

Also includes fixes for cross-compiling aarch64 targets.
2019-04-23 08:33:40 -07:00
LongShao007 9c96affb0d
fix bug of bdb.mk 2019-04-14 18:16:55 +08:00
Homu 756e9246c3 Auto merge of #3919 - defuse:openssl-regression, r=bitcartel
Fix OpenSSL reproducible build regression
2019-03-26 00:02:32 -07:00
Taylor Hornby 675cf3d606 Patch out proton::url deprecation as workaround for build warnings 2019-03-25 17:38:07 -06:00
Taylor Hornby b85cd8891e Fix OpenSSL reproducible build regression 2019-03-25 14:27:14 -06:00
Taylor Hornby 8088476911 Fix proton patch regression. #3916 2019-03-25 11:46:37 -06:00
Jack Grigg b1ef5eaef9
depends: Update .gitignore 2019-03-13 07:37:55 +00:00
Jack Grigg 56df83d710
depends: Compile bdb with --disable-atomics on aarch64
This sidesteps the problem where the atomics check tries to run a test
binary, which cannot be performed during cross compilation. We should
replace this with a better solution in future.

Part of #3710.
2019-03-13 06:39:12 +00:00
Jack Grigg d2cd57c0f2
depends: Add rust-std hash for aarch64-unknown-linux-gnu
Usage on Debian / Ubuntu:

> $ sudo apt install g++-aarch64-linux-gnu
> $ HOST=aarch64-linux-gnu ./zcutil/build.sh

Currently fails to cross-compile due to later configuration issues in
the depends system that need to be worked around.
2019-03-13 04:55:52 +00:00
Jack Grigg d7ab954511
depends: Generalise the rust package cross-compilation functions 2019-03-13 04:40:57 +00:00
Jack Grigg 74de4ddc46
depends: Use full path to cargo binary
The native binaries generated in the depends system are available on the path,
but system binaries are still visible. This change ensures we use cargo from
the depends system rather than whatever might be installed locally.
2019-03-13 03:24:41 +00:00
Taylor Hornby 78c916eb2e Patch Proton for a minimal build. #3786 2019-02-06 13:18:53 -07:00
Taylor Hornby f3d99770b5 Update Proton from 0.17.0 to 0.26.0. #3816, #3786 2019-01-30 14:16:50 -07:00
Taylor Hornby 0a4cafa6df Update Rust from v1.28.0 to v1.32.0. #3786 2019-01-30 14:16:42 -07:00
Taylor Hornby 221ca965eb Update boost from v1.66.0 to v1.69.0. #3786 2019-01-30 14:16:34 -07:00
Taylor Hornby b41b316758 Update OpenSSL from 1.1.0h to 1.1.1a. #3786 2019-01-30 14:16:25 -07:00
Homu beb465dd2e Auto merge of #3789 - rex4539:update-zmq, r=str4d
Update zmq to 4.3.1

Closes https://github.com/zcash/zcash/issues/3785
2019-01-23 00:17:25 -08:00
Dimitris Apostolou 4d0aca70a0
Update zmq to 4.3.1 2019-01-17 17:15:44 +02:00
ca333 8eaa721dfd
update libsodium dl-path
the 1.0.15 was moved to https://download.libsodium.org/libsodium/releases/old/ which results in DL from zcashs fallback repo
2019-01-07 13:38:21 +01:00
Jack Grigg 262cf38712
Build librustzcash package without changing directory
This ensures that the depends system's custom PATH is applied correctly,
and the pre-build Rust binaries are accessible.
2018-10-28 06:41:53 +13:00
Jack Grigg ee3fa7020e
Pass parameter paths as native strings to librustzcash 2018-10-27 19:19:02 +13:00
Jack Grigg eff2938e46
Migrate to current librustzcash
The only upstream change relative to the previous commit is that the
various Zcash-specific dependencies have been pulled into a cargo
workspace. The dependecies in the workspace use the same commits as the
crates we had previously vendored.

The patches are necessary to handle the fact that cargo requires that
dev dependencies are available even if not used, and we would otherwise
need to vendor all the underlying crates.
2018-10-27 17:03:47 +13:00
Jack Grigg f8d65e8f03
Update librustzcash with ZIP 32 APIs 2018-09-03 10:27:52 +01:00
Jack Grigg 7d65dcf4d9
depends: Pass correct compiler, linker, and flags into googletest 2018-08-17 16:47:03 +01:00
Jack Grigg 283ad96e85
Use -O1 for darwin and mingw32 release builds
In 46ad3c2758 we standardised our linux builds to
use -O1, but we didn't adjust the other targets.
2018-08-17 16:44:00 +01:00
Jack Grigg 3d308c2232
depends: Fix BDB naming issue when cross-compiling
Co-authored-by: David Mercer <radix42@gmail.com>
2018-08-17 16:42:35 +01:00
Jack Grigg f77650a6ac
depends: Configure librustzcash for cross-compiling 2018-08-17 16:41:51 +01:00
Jack Grigg b57e4484ef
depends: Correctly configure Rust when cross-compiling 2018-08-17 16:41:40 +01:00
Jack Grigg e188723823
Upgrade Rust to 1.28.0 stable 2018-08-05 10:41:06 +01:00
Sean Bowe d9ef8f622e Check the hash of the (Sapling+) zk-SNARK parameters during initialization. 2018-08-02 12:18:13 -06:00
Sean Bowe b7b088c46b Update librustzcash and sapling-crypto. 2018-07-30 21:59:12 -06:00
Jack Grigg e691e21f40
TransactionBuilder with support for creating Sapling-only transactions 2018-07-25 11:35:10 +02:00
Sean Bowe 9e8e121c9f Update librustzcash 2018-06-13 15:18:23 -06:00
Simon 36e2e7cc32 Add SaplingNote class and test_sapling_note unit test. 2018-06-12 14:37:05 -07:00
Jay Graber 52d81ff794 Update librustzcash dependency, address comments 2018-06-01 01:48:28 -07:00
Jay Graber 84e3a2212f Change librustzcash dependency hash to work for new Sapling classes 2018-06-01 00:04:13 -07:00
Sean Bowe b9a5a116cd Update librustzcash 2018-05-18 13:26:37 -06:00
Homu 1063dfdeaa Auto merge of #3271 - ebfull:stable-rust, r=bitcartel
Switch Rust to 1.26 Stable
2018-05-15 21:27:53 -07:00
Sean Bowe 0dfb1d5e2c Switch Rust to 1.26 Stable. 2018-05-15 16:21:37 -06:00
Sean Bowe 31989317c9 Update librustzcash again 2018-05-14 16:29:00 -06:00
Sean Bowe b7a6c32178 Integrate Groth16 verification and proving. 2018-05-14 16:26:23 -06:00
Sean Bowe 531fcc88da Update to latest librustzcash 2018-05-08 14:30:26 -06:00
Sean Bowe fcbe7eef8d Update sapling-crypto and librustzcash 2018-05-07 18:56:55 -06:00
Sean Bowe 62ba80e766 Update librustzcash hash 2018-04-19 13:00:28 -06:00
Sean Bowe acfcdb94b9 Load Sapling testnet parameters into memory. 2018-04-17 15:04:46 -06:00
Homu ec6021950d Auto merge of #3176 - daira:use-https-for-bdb, r=daira
Use https: for BDB backup download URL.
2018-04-17 02:13:10 -07:00
ca333 2b0e6432fe
update proton.mk
use SSL/TLS secured URL
2018-04-16 15:24:42 +02:00
Daira Hopwood 7709c8a47e Use https: for BDB backup download URL. 2018-04-16 08:11:40 +01:00
ca333 d2f9e747d5
[fix] proton download path
resolves #3174
2018-04-16 00:19:33 +02:00
Sean Bowe 65dc30c5a1 Update librustzcash hash 2018-04-14 19:33:10 -06:00
Sean Bowe e6bbd8481e Switch to latest librustzcash 2018-04-12 18:52:00 -06:00
Jack Grigg a560c24d6b
depends: Update to latest librustzcash with sapling-crypto dependencies 2018-04-11 08:06:40 -06:00
Jack Grigg c63c9f20e4
depends: Add support for unpackaged Rust crates 2018-04-11 08:00:23 -06:00
Jack Grigg b123b9bb79
depends: Upgrade Rust to 1.26.0-beta.3 2018-04-11 07:59:46 -06:00
Homu 65dedeeae3 Auto merge of #3131 - str4d:3096-cargo-checksum-fixes, r=daira
depends: Fix regex bugs in cargo-checksum.sh
2018-04-01 05:54:41 -07:00
Homu 1a9caa6ac1 Auto merge of #3127 - str4d:2688-mandatory-rust, r=ebfull
Make Rust compilation mandatory

The temporary integration check in CheckEquihashSolution() remains, until we
have "real" Rust code to integrate.

Closes #2688.
2018-03-30 12:58:34 -07:00
Jack Grigg 0e400c8854
depends: Fix regex bugs in cargo-checksum.sh 2018-03-30 19:06:51 +01:00
Simon 09bf7d2d3c Upgrade OpenSSL to 1.1.0h 2018-03-29 23:05:17 -07:00
Jack Grigg d9cd254e5e
Make Rust compilation mandatory
The temporary integration check in CheckEquihashSolution() remains, until we
have "real" Rust code to integrate.

Closes #2688.
2018-03-28 17:55:45 +02:00
Homu 058efdbe0f Auto merge of #3124 - bitcartel:update_boost_url, r=str4d
Update boost package URL to match official download url on boost.org

Part of #3123.
2018-03-28 08:26:39 -07:00
Homu a08ad2b815 Auto merge of #3096 - str4d:2231-depends-vendor-rust-crates, r=str4d
depends: Explicitly download and vendor Rust dependencies

Closes #2231.
2018-03-28 07:01:39 -07:00
Jack Grigg 0adfdc99b2
depends: Explicitly download and vendor Rust dependencies
Closes #2231.
2018-03-28 15:46:51 +02:00
Homu 2c91e3ebc0 Auto merge of #3117 - charlieok:add_windows_rust_package, r=daira
Add filename and SHA256 hash for Windows Rust package

When running `make download` in the `depends` directory, the `download-win` target (which `download` depends on) generates an error when it runs the commands defined in `check_or_remove_sources`:

```Makefile
sha256sum: /home/vagrant/zcash/depends/work/download/rust-1.16.0/..hash: no properly formatted SHA256 checksum lines found
funcs.mk:242: recipe for target '/home/vagrant/gitian-builder/cache/common/download-stamps/.stamp_fetched-rust-.hash' failed
make[1]: *** [/home/vagrant/gitian-builder/cache/common/download-stamps/.stamp_fetched-rust-.hash] Error 1
make[1]: Leaving directory '/home/vagrant/zcash/depends'
Makefile:153: recipe for target 'download-win' failed
make: *** [download-win] Error 2
```

The reason for the error is that `depends/packages/rust.mk` defines `rust_file_name_linux` and `rust_file_name_darwin` but leaves `rust_file_name_mingw32` undefined.

A directory of available rust downloads is here: https://static.rust-lang.org/dist/index.html

The closest windows analog in that list (using the same version number as currently defined in `rust.mk`) appears to be `rust-mingw-1.16.0-x86_64-pc-windows-gnu.tar.gz`. A corresponding sha256 value is also given in `rust-mingw-1.16.0-x86_64-pc-windows-gnu.tar.gz.sha256`.

After adding these values to `rust.mk`, the rust-mingw tar package was downloaded along with the rest of the dependencies and the above error message went away.
2018-03-28 05:31:43 -07:00
Simon 2b0783792b Update boost package URL to match official download url on boost.org 2018-03-27 09:39:06 -07:00
Charlie O'Keefe de2c5e9be9 Add filename and sha256 hash for windows rust package 2018-03-26 14:52:58 -06:00
Jack Grigg 1c4a74d40b
depends: Remove -mt suffix from Boost libraries
Requires disabling --build-type=complete, because in Boost 1.66 it appears to be
broken (only the tagged libraries are built).
2018-03-26 16:33:27 +02:00
Jack Grigg e6a34c283a
Revert "remove -mt suffix from boost libraries built by depends"
This reverts commit 33ae5edd2c.
2018-03-26 16:20:55 +02:00
Simon bbcdabc28d Update boost to 1.66.0 2018-03-23 15:07:17 -07:00
rofl0r 33ae5edd2c remove -mt suffix from boost libraries built by depends 2018-02-23 15:52:55 +00:00
Homu c720d15c45 Auto merge of #2700 - kozyilmaz:emptyspaces, r=str4d
PATH variable containing spaces cause build failure

Spaces in PATH variable is creating build issues (observed on macOS). For example "VMware Fusion" adds itself to PATH like `/Applications/VMware Fusion.app/Contents/Public`.
2017-12-15 11:35:05 -08:00
Wladimir J. van der Laan 57ab896ba4
test: Remove java comparison tool 2017-12-01 14:10:16 +00:00
daniel 0b2a64f484
add powerpc build support for openssl lib 2017-12-01 14:10:15 +00:00
Jack Grigg 9635679cba
Replace "install -D" with "mkdir -p && install" 2017-11-29 17:26:47 +00:00
fanquake e2e7ca3054
[depends] Set OSX_MIN_VERSION to 10.8 2017-11-29 17:24:59 +00:00
Cory Fields 68ce87eddc
depends: bump OSX toolchain
clang: 3.7.1
cctools: 877.8
ld64: 253.9
2017-11-29 17:24:59 +00:00
fanquake 377092a152
[depends] Add -stdlib=libc++ to darwin CXX flags 2017-11-29 17:24:59 +00:00
Cory Fields 038a858d2f
depends: use c++11 2017-11-29 17:24:59 +00:00
MarcoFalke b0a7ddb0b1
[depends] builders: No need to set -L and --location for curl 2017-11-29 17:24:59 +00:00
Luke Dashjr a8982ac97d
Bugfix: depends/Travis: Use --location (follow redirects) and --fail [on HTTP error response] with curl 2017-11-29 17:24:59 +00:00
Luke Dashjr bd03cfebec
depends: Use curl for fetching on Linux
Currently Travis's wget fails fetching qrencode:

Fetching qrencode...
ERROR: no certificate subject alternative name matches
	requested host name `fukuchi.org'.
To connect to fukuchi.org insecurely, use `--no-check-certificate'.
OpenSSL: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
Unable to establish SSL connection.
make: *** [/home/travis/build/luke-jr/bitcoin/depends/sources/download-stamps/.stamp_fetched-qrencode-qrencode-3.4.4.tar.bz2.hash] Error 4
2017-11-29 17:24:59 +00:00
Cory Fields 1f623c64b6
c++11: fix libbdb build against libc++ in c++11 mode
atomic_init clashes with
2017-11-29 17:24:59 +00:00
Homu 099bf3dd8f Auto merge of #2763 - syd0:upgrade-libsodium, r=daira
Update libsodium from 1.0.11 to 1.0.15

Closes #2693.
2017-11-28 13:20:13 -08:00
syd 0c177bc585 Update libsodium from 1.0.11 to 1.0.15 2017-11-22 23:16:51 -05:00
syd 24902602f2 Upgrade googletest to 1.8.0 2017-11-19 14:08:17 -05:00
kozyilmaz 35e12d992a empty spaces in PATH variable cause build failure 2017-10-31 15:14:21 +03:00
Sean Bowe 26a8f68ea8
Remove libsnark from depends system and integrate it into build system. 2017-08-02 15:49:30 +01:00
Daira Hopwood 506a21850a Remove UPnP support. fixes #2500
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-07-03 08:57:05 +01:00
Homu 00fd23930b Auto merge of #2443 - str4d:1621-priority-download-path, r=str4d
Rename FALLBACK_DOWNLOAD_PATH to PRIORITY_DOWNLOAD_PATH

Closes #1621.
2017-06-19 23:46:44 -07:00
Jack Grigg be60c6d7f6
Rename FALLBACK_DOWNLOAD_PATH to PRIORITY_DOWNLOAD_PATH
Closes #1621.
2017-06-15 16:32:36 +12:00
kozyilmaz e6dc07bc69 support per platform filename and hash setting for dependencies 2017-06-09 13:15:27 +03:00
Simon b9f6e40c9c Patch to build Proton with minimal dependencies.
Closes #2279.  Configures CMake to enable C++11, build static libaries
and only build cpp bindings with minimal dependencies. Documentation,
examples, tests and other language bindings are no longer built.
CMake will no longer try to find commands and packages which are not
required for building the target.
2017-04-28 12:03:37 -07:00
Simon 56f66372c5 Fix proton build issue with debian jessie, as used on CI servers.
Debian 8 stable ships with gcc 4.9.2 and cmake 3.0.2.  Previously
the depends package used CMAKE_CXX_STANDARD to tell cmake to use
C++11, but the option requires cmakes 3.1+.  To resolve the issue
we now update relevant CMakeLists.txt and set CMAKE_CXX_FLAGS.
2017-04-16 00:30:58 -07:00
Simon f493d3e044 Add --disable-proton flag to build.sh. Proton has build/linker issues with gcc 4.9.2 and requires gcc 5.x. 2017-03-25 09:41:54 -07:00
Simon 99eb947a98 Add AMQP 1.0 support via Apache Qpid Proton C++ API 0.17.0 2017-03-25 08:51:40 -07:00
Jack Grigg a163953929
[depends] libevent 2.1.8 2017-03-24 09:03:59 +13:00
fanquake ec626cc530
[depends] libevent 2.1.7rc 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan 32f4e7744c
depends: Add libevent compatibility patch for windows
Add a patch that seems to be necessary for compatibilty of libevent
2.0.22 with recent mingw-w64 gcc versions (at least GCC 5.3.1 from Ubuntu
16.04).

Without this patch the Content-Length in the HTTP header ends up as
`Content-Length: zu`, causing communication between the RPC
client and server to break down. See discussion in #8653.

Source: https://sourceforge.net/p/levent/bugs/363/

Thanks to @sstone for the suggestion.
2017-03-24 09:03:59 +13:00
Cory Fields 91295c4b4d
libevent: Windows reuseaddr workaround in depends
Make it possible to reuse sockets.
This is necessary to make the RPC tests work in WINE.
2017-03-24 09:03:59 +13:00
Cory Fields 505b30ff01
libevent: add depends 2017-03-24 09:03:59 +13:00
Sean Bowe 802ea76b3a Allow Rust-language related assets to be disabled with `--disable-rust`. 2017-03-18 07:47:40 -06:00
Sean Bowe 6a0c7ceae9 Introduce librustzcash and Rust to depends system. 2017-03-17 11:46:41 -06:00