Commit Graph

43 Commits

Author SHA1 Message Date
Carl Dong 5c03db0983 depends: Propagate only specific CLI variables to sub-makes
We want to supply well-known vars to ./configure scripts to do with as
they please. However, we do _not_ want to override these well-known vars
at make-time as certain build systems expect a self-mangled version of
these well-known vars.

For example, freetype and bdb will prepend `libtool --mode=compile' to
CC and CXX, which, if we override CC on the command line at make-time,
will break the build.
2021-01-15 17:08:56 +00:00
Carl Dong ee10eb77db build: Add variable printing target to Makefiles
I kept finding myself needing these to debug our build system, since
they are innocuous and are very helpful they probably belong in the
codebase.

Source: John Graham-Cumming
https://www.cmcrossroads.com/article/printing-value-makefile-variable
2021-01-15 05:24:25 +00:00
Daira Hopwood e86f83c627 Fix an error reporting bug in "Checksum missing or mismatched ..."
The sense of the test was accidentally inverted in my change to #4733.
The message should be shown if any of the files exist but have an incorrect checksum.
We also now correctly handle the case where there are no package source files.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-26 07:44:21 +00:00
Nate Wilcox 94fa873853 depends: fix a logging bug for multi-archive packages.
While initially fetching packages, I saw `sh: test:` error messages in the make output for only two packages.
However, it appears all packages are correctly fetched.

I tested this patch manually by running these three tests against the `v4.0.0` tag and then with this patch.
In all 6 cases I visually inspected the output.

1. Starting with a pre-downloaded source cash, run the `download` target.
2. Remove an archive from a multi-archive package, then rerun `download`.
3. Alter a hash to cause a hash mismatch condition, then rerun `download`.

I believe after each step both with and without this patch the resulting source cache should be identical
(except for filesystem timestamps).

Co-authored-by: Nathan Wilcox <nathan@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-22 14:43:22 +01:00
Jack Grigg 0d4a7b032f depends: Use correct HOST for download-linux target
By using the old HOST with -unknown, `make -C depends download` was
interpreting the download-linux step as a cross-compile, and attempting
to download a Rust stdlib for Linux that we weren't pinning (because we
don't support cross-compiling to x86_64 Linux - just build it native).

Follow-up to https://github.com/zcash/zcash/pull/4749.
2020-10-01 11:22:27 +01:00
Dimitris Apostolou 4e1d3856ee
Remove reference to cargo-checksum.sh 2020-09-25 07:15:04 +03: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 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 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
Jack Grigg 927a03465f Merge branch 'master' into modernise-macos-toolchain 2020-08-08 00:07:31 +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
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 0d3e5fc43c depends: set OSX_MIN_VERSION to 10.10 2020-07-30 04:33:36 +01: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 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 42a58f1e23 configure: Change default Proton to match build.sh 2020-01-31 12:12:07 +00: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 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
Eirik Ogilvie-Wigley b49e782eba Update download path 2019-08-16 13:21:32 -06:00
Jack Grigg 5222c39cd0 depends: Add FreeBSD to hosts and builders 2019-05-22 10:46:21 +00: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
Jack Grigg 0adfdc99b2
depends: Explicitly download and vendor Rust dependencies
Closes #2231.
2018-03-28 15:46:51 +02: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
Jack Grigg be60c6d7f6
Rename FALLBACK_DOWNLOAD_PATH to PRIORITY_DOWNLOAD_PATH
Closes #1621.
2017-06-15 16:32:36 +12: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
Sean Bowe 802ea76b3a Allow Rust-language related assets to be disabled with `--disable-rust`. 2017-03-18 07:47:40 -06:00
Daira Hopwood d596658022 Remove NO_QT make option.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-07 19:15:08 +00:00
David Mercer 1ead1bb0b3 allow both HOST and BUILD to be passed in from the zcutil/build.sh 2016-10-19 19:36:52 -07:00
Sean Bowe 2c2dd2305e Update fallback path. 2016-01-19 14:36:10 -07:00
Cory Fields 235b3a789d depends: sanity-check sources and cached builds
In some cases (Travis), sources and build caches may be moved around in-between
builds, and we can't necessarily trust that everything is still intact.

This introduces pre-build checks that verify against stashed checksums.

Note that this will cause all sources to be re-downloaded, since cached sources
weren't trustworthy before this.
2015-05-14 01:33:07 -04:00
Cory Fields d23b0a2711 depends: always use static qt5 for linux 2015-02-25 18:41:59 -05:00
Cory Fields d546191dc2 depends: Move source stamps to source dir and misc cleanups
Since the last commit will force rebuilds of all depends, take the opportunity
to clean up a few other things that would trigger rebuilds as well.

- Move source stamps to the sources dir so that SOURCES_PATH is respected for
  "make download".
- Only print "fetching..." when actually downloading a file.
- Avoid using non-deterministic paths for the recipe hash (patch location).
  This should ensure that all builders get the same resulting build-ids.
- Use a per-package source paths. This will allow for removing old source files
  in the future.
- Use a host-agnostic path for downloads which gets cleaned up properly.
2014-12-11 19:23:12 -05:00
Cory Fields 422f873ef3 depends: teach 'make download' to download sources for all hosts 2014-12-11 19:23:12 -05:00
Cory Fields 5f93ec2028 depends: Add a package for qt4.6. Linux uses it by default.
We're not ready to switch to a static qt5 for Linux yet due to missing plugin
support. This adds a recipe for building a shared qt4 that we build and link
against, but don't distribute.

make USE_LINUX_STATIC_QT5=1 can be used to build static qt5 as before.
2014-11-19 22:49:41 -05:00
Cory Fields 2027ad30e7 depends: add the debug/release concept to depends 2014-09-25 14:56:25 -04:00
Cory Fields df7565d99c depends: add sensible download timeout/retry values 2014-08-27 03:40:30 -04:00
Cory Fields c897b1e732 depends: add a fallback path in case package sources go missing
If a source url fails to download, try again at
$FALLBACK_DOWNLOAD_PATH/file.name, where FALLBACK_DOWNLOAD_PATH can be
overridden by the user.
2014-08-22 15:42:54 -04:00
Cory Fields e42363d800 build: add funcs.mk to the list of meta-depends
If anything in funcs.mk changes, everything must rebuild
2014-08-15 22:48:38 -04:00
Cory Fields 1dec09b341 depends: add shared dependency builder
See the README's in depends for documentation
2014-08-08 15:10:46 -04:00