Commit Graph

320 Commits

Author SHA1 Message Date
fanquake
d1abe54fce
Merge #21323: guix, doc: Update default HOSTS value
a0a7a4337d guix, doc: Update default HOSTS value (Hennadii Stepanov)

Pull request description:

  This is a #21089 follow up.

ACKs for top commit:
  fanquake:
    ACK a0a7a4337d

Tree-SHA512: c1813cc2b9212a79fd34d4e25cd0816b58264e1890daf777cd59411bd20fcc9affe312871d06fab1308b8f55c1a78ac1101e631882c18360a4709ecef4529f05
2021-03-02 09:03:06 +08:00
fyquah
fbbb2d4fc1 lint: Fix spelling errors in comments 2021-03-01 15:24:28 +00:00
Hennadii Stepanov
a0a7a4337d
guix, doc: Update default HOSTS value 2021-03-01 10:34:30 +02:00
Hennadii Stepanov
97f10621f4
guix: Add curl to required tool list 2021-03-01 09:53:01 +02:00
Wladimir J. van der Laan
5ba5becbb5
Merge #21272: guix: Passthrough SDK_PATH into container
13a9fd11a5 guix: Passthrough SDK_PATH into container (Carl Dong)

Pull request description:

  This is a usability improvement for Guix builders so that they don't have to extract the Xcode tarball into `depends/SDKs` every time.

  Inspiration: https://github.com/bitcoin/bitcoin/pull/21089#issuecomment-778639698

ACKs for top commit:
  laanwj:
    Tested ACK 13a9fd11a5

Tree-SHA512: 63392d537e48a0da9f0ee04a929613b139bef1ac5643187871c9ea5376afd2a3d95df0f5e0950ae0eccd2813b166667be98401e5a248ae9c187fe4e84e54d427
2021-02-26 20:26:21 +01:00
Carl Dong
c33b199456 guix: Bump glibc and linux-headers
Bump glibc and linux-headers to match those of our Gitian counterparts.

We also require a glibc >= 2.28 for the test-symbol-check scripts to
work properly.

The default BASE-GCC-FOR-LIBC also has to be bumped since glibc 2.31
requires a gcc >= 6.2
2021-02-24 21:14:58 -05:00
Carl Dong
65363a1bd8 guix: Rebase on 95aca2991b (1.2.0-12.dffc918)
A few changes which are useful for us:

1. 'gnu: cross-gcc-arguments: Enable 128 bit long double for POWER9.' is
   now merged into master.
2. gnutls is bumped to 3.6.15 and the temporal test failure in
   status-request-revoked is fixed. Note that this does not fix the case
   where one has installed Guix v1.2.0 and is running a substitute-less
   bootstrap build, since the `guix time-machine` command itself has a
   dependency on gnutls v3.6.12 (the one with the broken test) and will
   thus try to build it before attempting to jump forwards in time. This
   does however, mean that those who build a version of Guix that also
   contains this fix will not go backwards in time to build the broken
   gnutls v3.6.12.
2021-02-24 21:14:58 -05:00
Carl Dong
d98f4593cf guix: Explicitly set umask in build container
A difference in system umask value can cause non-determinism when zip
archives are produced. Set it to a reasonable default.
2021-02-23 12:24:17 -05:00
Carl Dong
13a9fd11a5 guix: Passthrough SDK_PATH into container 2021-02-22 22:07:25 -05:00
fanquake
3371758af4
Merge #21078: guix: only download sources for hosts being built
a6a1b106dc guix: only download sources for hosts being built (fanquake)

Pull request description:

  For example, if a user is only interested in building for Linux, this saves downloading the macOS compiler and additional dependencies, which is meaningful on a slow/poor connection. This will result in a few additional `make` invocations, for the Linux hosts, however this is low overhead, and time-wise irrelevant in terms of the overall build.

ACKs for top commit:
  laanwj:
    Code review ACK a6a1b106dc

Tree-SHA512: 34c916ae6f69fed0d5845690b39111a8bee37208fd727176f375cf5eb4860f512abe12bde2680d697c859b4d50a3bc5688ddca7c2f28f9968fcf358753cf3f6d
2021-02-23 10:51:41 +08:00
fanquake
a6a1b106dc
guix: only download sources for hosts being built
If a user is only interested in building for Linux, this saves
downloading the macOS compiler and additional dependencies.

This will result in a few additional `make` invocations, for the Linux
hosts, however this is quite low overhead.

Co-authored-by: Carl Dong <contact@carldong.me>
2021-02-22 10:49:05 +08:00
Carl Dong
95990b9f32 guix: Update conservative space requirements 2021-02-19 11:29:56 -05:00
Carl Dong
5e6df11326 guix: Add support for powerpc64{,le}
The new time-machine commit contains a few small changes that make the
powerpc cross-toolchain work.
2021-02-19 11:29:56 -05:00
Carl Dong
d02076b885 guix: Jump forwards in time-machine and adapt
The new time-machine commit is Guix v1.2.0 with a yet-unupstreamed patch
for NSIS.

A few important changes:

1. Guix switched back from using CPATH to C{,PLUS}_INCLUDE_PATH as the
   way to indicate #include search paths.
2. GCC's library is now split into a separate output, whereas before it
   was included in the default output. This means that our gcc toolchain
   packages need to propagate that output.
3. A few package versions were bumped
2021-02-18 14:29:42 -05:00
Carl Dong
f8ca8c5c28 guix: Supply --keep-failed for debugging 2021-02-18 14:29:42 -05:00
Carl Dong
901f54321b guix: Passthrough BASE_CACHE into container
This allows depends-built packages to be cached.
2021-02-16 12:17:33 -05:00
MarcoFalke
fa051c2386
doc: Guix is shipped in Debian and Ubuntu 2021-02-12 14:59:06 +01:00
Hennadii Stepanov
cb151b797a
build: Disable --disable-fuzz-binary for guix builds 2021-02-08 16:41:05 +02:00
Carl Dong
f1694757dd guix: Fix typo 2021-01-21 10:58:12 -05:00
Carl Dong
771c4b98a8 guix: README: Add darwin HOSTS entry 2021-01-21 10:58:12 -05:00
Carl Dong
8dbf18cb1d guix: Check for macOS SDK before building anything 2021-01-21 10:58:12 -05:00
Carl Dong
34b23f597e guix: Set ZERO_AR_DATE for darwin build determinism
See comments inserted in this commit.
2021-01-21 10:58:12 -05:00
Carl Dong
c9eb4cf3a0 guix: Add support for darwin builds 2021-01-21 10:58:08 -05:00
Carl Dong
a91c46c57d guix: Make nsis reproducible by respecting SOURCE-DATE-EPOCH
When building nsis, if VERSION is not specified, it defaults to
cvs_version which is non-deterministic as it includes the current date.

This patches nsis to default to SOURCE_DATE_EPOCH if it exists so that
nsis is reproducible.

Upstream change: https://github.com/kichik/nsis/pull/13
2021-01-17 18:43:58 -05:00
Carl Dong
570e43fe72 guix: Print build params inside/outside of container 2021-01-08 11:40:02 -05:00
Carl Dong
2f9d1fdde6 guix: Move DISTSRC determination to guix-build.sh 2021-01-08 11:40:01 -05:00
Carl Dong
0b7cd07bb5 guix: Move OUTDIR determination+creation to guix-build.sh 2021-01-08 11:40:01 -05:00
Carl Dong
d27ff8b86a guix: Add more sanity checks to guix-build.sh 2021-01-08 11:40:01 -05:00
Carl Dong
57f9533146 guix: Add section headings to guix-build.sh 2021-01-08 11:40:01 -05:00
Carl Dong
34f0fda2d3 guix: Small updates to README wording 2021-01-08 11:40:01 -05:00
Carl Dong
402e3a5b1e guix: Update HOSTS README entry for new architectures 2021-01-08 11:40:01 -05:00
Carl Dong
cfa7ceb21b guix: Remove README development environment section 2021-01-08 11:40:01 -05:00
Carl Dong
93b6a8544a guix: Add ADDITIONAL_GUIX_{COMMON,TIMEMACHINE}_FLAGS options 2021-01-08 11:40:01 -05:00
Carl Dong
0f31e24703 guix: Add SUBSTITUTE_URLS option 2021-01-08 11:40:01 -05:00
Carl Dong
444fcfca90 guix: Make guix honor MAX_JOBS setting 2021-01-08 11:40:01 -05:00
MarcoFalke
faa2f06f5e
scripted-diff: [build] Ensure source tarball has leading directory name
-BEGIN VERIFY SCRIPT-
sed -i 's|git archive --|git archive --prefix="${DISTNAME}/" --|g'                          $(git grep -l 'git archive' ./contrib)
sed -i 's|tar -xf "\?${\?GIT_ARCHIVE}\?"\?|tar --strip-components=1 -xf "${GIT_ARCHIVE}"|g' $(git grep -l 'tar -xf'     ./contrib)
-END VERIFY SCRIPT-
2020-11-05 17:31:24 +01:00
Carl Dong
f852761aec
guix: Add clarifying documentation for V env var 2020-05-20 13:11:16 -04:00
Carl Dong
85f4a4b082
guix: Make V=1 more powerful for debugging
- Print commands in both unexpanded and expanded forms
- Set VERBOSE=1 for CMake
2020-05-12 09:37:31 -04:00
Carl Dong
1f2c39a30e
guix: Remove logical cores requirement
Thanks MarcoFalke for pushing this to its limits and testing :-)
2020-05-01 12:33:47 -04:00
Carl Dong
d256f91cb1
rel-builds: Directly deploy win installer to OUTDIR 2020-05-01 12:30:20 -04:00
Carl Dong
14701604d0
guix: Expose GIT_COMMON_DIR in container as readonly
When using worktrees or submodules, you'll see a `.git' plain text file
at the root of your working tree instead of the usual `.git' directory.

This plain text file will point to the real GIT_DIR, under the
GIT_COMMON_DIR. From experimentation, the full GIT_COMMON_DIR is
required to exist for operations such as git-archive(1), so we expose it
as readonly inside the container.
2020-04-28 10:36:37 -04:00
Carl Dong
f5a6ac4f48
guix: Make source tarball using git-archive 2020-04-28 10:36:36 -04:00
fanquake
f2b5b0a3b4
build: add linker optimization flags to guix
Any -O argument will enable optimizations in GNU ld. We can use -O2
here, as this matches our compile flags. Note that this would also
enable additional optimizations if using the lld or gold linkers,
when compared to -O0.
2020-04-12 18:38:00 +08:00
Carl Dong
a35e323589
guix: Appease travis. 2020-04-07 19:27:31 -04:00
Carl Dong
0b66d22da5
guix: Use gcc-9 for mingw-w64 instead of 8
The libtool unsorted 'find' determinism issue seemed to have been solved
in gcc-9's git: d41cd173e23ebea7c758644d6ad6e0fde1c2e3a6 or SVN: r262451

Furthermore, it seems that Ubuntu Focal 20.04 LTS is going to ship with
gcc 9 and mingw-w64 7, which will match what we have now.

-----

A note on this:

Careful observers will see that previously I stated that all released
versions of gcc were bootstrapped with a libtool 2.2.7a, meaning that
they all had the unsorted 'find' determinism issue first resolved in
libtool 2.2.7b.

However, I was mistaken, gcc's ltmain.sh CLAIMS it was generated by
libtool 2.2.7a, but it was in fact edited manually. It seems that gcc
maintains their own versions of ltmain.sh and libtool.m4, and only
sometimes backports patches from upstream.

Quite confusing.
2020-04-07 19:01:26 -04:00
Carl Dong
ba0b99bdd6
guix: Don't set MINGW_HAS_SECURE_API CFLAG in depends
This is no longer needed after 3bef7c22 in the mingw-w64 git repository,
which is first included in mingw-w64 v7.0.0.

As of the previous bump to our Guix time machine, we now use mingw-w64
v7.0.0.
2020-04-07 19:00:50 -04:00
Carl Dong
93439a71ed
guix: Bump to upstream commit with mingw-w64 changes
Most of the mingw-w64 toolchain changes have now been upstreamed, we can
point to a commit that exists upstream.

NOTE: I'm not changing the URL yet until we see that Guix upstream will
accept all my patches for macOS.

-----

The Guix tree that's referred to by this commit contains the following
changes relevant to our mingw-w64 build:

b066c25026

  Adds a PACKAGES-WITH-*PATCHES procedure which we can use in the future
  to apply patches to packages if those patches are not considered
  appropriate to upstream Guix

4719b71572

  Adds mingw-w64 (the libc itself) reproducibility patches, taken from
  debian.

79825bee07 + 401d28e433 + c1c50cb5b0

  Add mingw-w64 specific binutils patches, taken from debian.
  Specifically, the "Make DLL import libraries reproducible" patch made
  libbitcoinconsensus.dll.a build reproducibly. The followup commits
  were hotfixes for my mistakes.

0f864175dc

  Bumps mingw-w64 to v7.0.0. This is the first release that enables
  secure APIs by default (which we need), and gains _FORTIFY_SOURCE
  support. This will also be what Ubuntu Focal 20.04 LTS releases with.

cdf00cf75d

  Bumps NSIS to v3.05. This is the first release that includes a fix for
  a reproducibility bug found by some of the electrum developers. See
  details here: https://sourceforge.net/p/nsis/bugs/1230/
2020-04-07 19:00:49 -04:00
Carl Dong
35a96792dd
guix: Check mingw symbols, improve SSP fix docs 2020-04-02 17:20:05 -04:00
Carl Dong
449d8fe25b
guix: Expand on INT trap message 2020-04-02 17:20:04 -04:00
Carl Dong
3f1f03c67a
guix: Spelling fixes 2020-04-02 17:20:03 -04:00
Carl Dong
ff821dd2a1
guix: Reinstate make-ssp-fixed-gcc
Unfortunately, gcc is still not smart enough to detect whether or not
mingw-w64 provides ssp, so let's put it back just for mingw-w64.
2020-04-02 17:20:02 -04:00
Carl Dong
360a9e0ad5
guix: Bump time-machine for mingw-w64 patches
This bump will includes a couple of commits which improve the
reproducibility of the mingw-w64 toolchain. Most of which came from
debian. They will be upstreamed as upstream Guix release timeline
allows.
2020-04-02 17:20:01 -04:00
Carl Dong
93e41b7e3b
guix: Use gcc-8 for mingw-w64 instead of 7
We're using mingw-w64 6.0.0, which is paired with gcc-8 in most distros.
2020-04-02 17:20:00 -04:00
Carl Dong
ef4f7e4c45
guix: Set the well-known timezone env var 2020-04-02 17:19:59 -04:00
Carl Dong
acf4b3b3b5
guix: Make x86_64-w64-mingw32 builds reproducible
- Add "--no-insert-timestamp" LDFLAG for x86_64-w64-mingw32 builds

"The option --no-insert-timestamp can be used to insert a zero value for
the timestamp, this ensuring that binaries produced from identical
sources will compare identically." - ld(1)

- Set "SetDateSave off" in NSIS script

From https://nsis.sourceforge.io/Docs/Chapter4.html#flags

"This command sets the file date/time saving flag which is used by the
File command to determine whether or not to save the last write date and
time of the file, so that it can be restored on installation. Valid
flags are 'on' and 'off'. 'on' is the default."

- Add commented out NSIS options for reproducibility debugging in NSIS
  script

- Make ZIPs deterministic by reseting file modification times to
  SOURCE_DATE_EPOCH using touch(1) (Reference:
  https://reproducible-builds.org/docs/archives/)
2020-04-02 17:19:57 -04:00
Carl Dong
c4cce00eac
guix: Remove dead links from README. 2020-04-02 17:19:56 -04:00
Carl Dong
df953a4c9a
guix: Appease shellcheck. 2020-04-02 17:19:55 -04:00
Carl Dong
91897c95e1
guix: Improve guix-build.sh documentation 2020-04-02 17:19:54 -04:00
Carl Dong
570d769c6c
guix: Build support for Windows 2020-04-02 17:19:53 -04:00
Carl Dong
0ae42a16c7
guix: Remove now-unnecessary gcc make flag
Previously, Guix would produce a gcc which did not know to use the SSP
function from glibc, and required a gcc make flag for it to do so, in my
attempt to fix it upstream I realized that this is no longer the case.

This can be verified by performing a Guix build and doing

  readelf -s ... | grep __stack_chk

to check that symbols are coming from glibc, and doing

  readelf -d ... | grep NEEDED | grep ssp

to see that libssp.so is not being depended on
2020-03-11 16:16:31 -04:00
MarcoFalke
fae9084ac5
build: Skip i686 build by default in guix and gitian 2020-02-09 13:22:53 -08:00
Carl Dong
88c83636d5
guix: Update documentation for time-machine
Wait a minute, doc. Are you telling me you built a time machine... Out
of a functional package manager?
2020-01-27 16:41:20 -05:00
Carl Dong
e6050884fd
guix: Pin Guix using guix time-machine 2020-01-27 16:38:07 -05:00
randymcmillan
ac831339cb
doc: Fix some misspellings 2019-11-04 04:22:53 -05:00
Carl Dong
0065ead5eb
contrib: guix: Remove ssp spec file hack
This hack is no longer needed after fixing our cross-compilation search
paths.
2019-09-05 14:50:56 -04:00
Carl Dong
0093a5869a
contrib: guix: More robust search paths, add checks
- store_path() previously only worked for cross compilation packages, we
  remove this assumption here
- Add CROSS_GCC_LIB variable which points to where gcc libs/headers are
  located
- Add gcc libs/headers to our CROSS_*_PATH environment variables
- Check that all directories in CROSS_*_PATH are sane
2019-09-05 14:50:44 -04:00
Carl Dong
751549b52a
contrib: guix: Additional clarifications re: substitutes 2019-07-12 12:31:55 -04:00
Carl Dong
cd3e947f50
contrib: guix: Various improvements.
- Clearer and more accurate prose
- Pin `guix pull' to commit rather than branch
- Just use `use-module' instead of `define-module'
- Use `bash-minimal' instead of `bash'
- Remove unneeded `tcsh' from manifest
- Explicitly use `python-3.7'
- Add comments about how {native,cross}-toolchains are produced and
  why
2019-07-12 11:42:36 -04:00
Carl Dong
8dff3e48a9
contrib: guix: Clarify SOURCE_DATE_EPOCH. 2019-07-12 11:42:09 -04:00
Carl Dong
3e80ec3ea9
contrib: Add deterministic Guix builds. 2019-07-12 00:48:39 -04:00