Skip to content

Commit c46fe4d

Browse files
committed
Merge #21088: guix: Jump forwards in time-machine and adapt
d02076b guix: Jump forwards in time-machine and adapt (Carl Dong) f8ca8c5 guix: Supply --keep-failed for debugging (Carl Dong) Pull request description: ``` 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 ``` See this compare to review my custom patches to Guix: dongcarl/guix@version-1.2.0...7d6bd44 ACKs for top commit: laanwj: ACK d02076b Tree-SHA512: 896d5bf1b6e5fda2f0106013c568c119bbbb86cb31a8c0a22432bada9b7da51678b96374bf8fd7c15353698ba47ac9dd39874d40c39001281471db7c78bf1705
2 parents f1c339d + d02076b commit c46fe4d

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

contrib/guix/guix-build.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git log --format=%at -1)}"
148148
time-machine() {
149149
# shellcheck disable=SC2086
150150
guix time-machine --url=https://github.com/dongcarl/guix.git \
151-
--commit=b066c25026f21fb57677aa34692a5034338e7ee3 \
151+
--commit=7d6bd44da57926e0d4af25eba723a61c82beef98 \
152152
--max-jobs="$MAX_JOBS" \
153+
--keep-failed \
153154
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
154155
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_TIMEMACHINE_FLAGS} \
155156
-- "$@"
@@ -259,6 +260,12 @@ EOF
259260
# make the downloaded depends sources available to it. The sources
260261
# should have been downloaded prior to this invocation.
261262
#
263+
# --keep-failed keep build tree of failed builds
264+
#
265+
# When builds of the Guix environment itself (not Bitcoin Core)
266+
# fail, it is useful for the build tree to be kept for debugging
267+
# purposes.
268+
#
262269
# ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"}
263270
#
264271
# fetch substitute from SUBSTITUTE_URLS if they are
@@ -281,6 +288,7 @@ EOF
281288
${SOURCES_PATH:+--share="$SOURCES_PATH"} \
282289
${BASE_CACHE:+--share="$BASE_CACHE"} \
283290
--max-jobs="$MAX_JOBS" \
291+
--keep-failed \
284292
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
285293
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
286294
-- env HOST="$host" \

contrib/guix/libexec/build.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ store_path() {
4444
NATIVE_GCC="$(store_path gcc-toolchain)"
4545
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64"
4646
export CPATH="${NATIVE_GCC}/include"
47+
unset C_INCLUDE_PATH
48+
unset CPLUS_INCLUDE_PATH
4749
case "$HOST" in
4850
*darwin*)
4951
# When targeting darwin, some native tools built by depends require
@@ -66,7 +68,8 @@ case "$HOST" in
6668
# Determine output paths to use in CROSS_* environment variables
6769
CROSS_GLIBC="$(store_path "mingw-w64-x86_64-winpthreads")"
6870
CROSS_GCC="$(store_path "gcc-cross-${HOST}")"
69-
CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
71+
CROSS_GCC_LIB_STORE="$(store_path "gcc-cross-${HOST}" lib)"
72+
CROSS_GCC_LIBS=( "${CROSS_GCC_LIB_STORE}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
7073
CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
7174

7275
# The search path ordering is generally:
@@ -75,7 +78,7 @@ case "$HOST" in
7578
# 2. kernel-header-related search paths (not applicable to mingw-w64 hosts)
7679
export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include"
7780
export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
78-
export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib"
81+
export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib"
7982
;;
8083
*darwin*)
8184
# The CROSS toolchain for darwin uses the SDK and ignores environment variables.
@@ -86,12 +89,13 @@ case "$HOST" in
8689
CROSS_GLIBC_STATIC="$(store_path "glibc-cross-${HOST}" static)"
8790
CROSS_KERNEL="$(store_path "linux-libre-headers-cross-${HOST}")"
8891
CROSS_GCC="$(store_path "gcc-cross-${HOST}")"
89-
CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
92+
CROSS_GCC_LIB_STORE="$(store_path "gcc-cross-${HOST}" lib)"
93+
CROSS_GCC_LIBS=( "${CROSS_GCC_LIB_STORE}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
9094
CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
9195

9296
export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include"
9397
export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
94-
export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib"
98+
export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib"
9599
;;
96100
*)
97101
exit 1 ;;

contrib/guix/manifest.scm

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
115115
`(("binutils" ,xbinutils)
116116
("libc" ,xlibc)
117117
("libc:static" ,xlibc "static")
118-
("gcc" ,xgcc)))
118+
("gcc" ,xgcc)
119+
("gcc-lib" ,xgcc "lib")))
119120
(synopsis (string-append "Complete GCC tool chain for " target))
120121
(description (string-append "This package provides a complete GCC tool
121122
chain for " target " development."))
@@ -159,7 +160,8 @@ desirable for building Bitcoin Core release binaries."
159160
(propagated-inputs
160161
`(("binutils" ,xbinutils)
161162
("libc" ,pthreads-xlibc)
162-
("gcc" ,pthreads-xgcc)))
163+
("gcc" ,pthreads-xgcc)
164+
("gcc-lib" ,pthreads-xgcc "lib")))
163165
(synopsis (string-append "Complete GCC tool chain for " target))
164166
(description (string-append "This package provides a complete GCC tool
165167
chain for " target " development."))
@@ -219,7 +221,7 @@ chain for " target " development."))
219221
pkg-config
220222
;; Scripting
221223
perl
222-
python-3.7
224+
python-3
223225
;; Git
224226
git
225227
;; Native gcc 7 toolchain
@@ -236,5 +238,5 @@ chain for " target " development."))
236238
((string-contains target "-linux-")
237239
(list (make-bitcoin-cross-toolchain target)))
238240
((string-contains target "darwin")
239-
(list clang-8 libcap binutils imagemagick libtiff librsvg font-tuffy cmake-3.15.5 xorriso))
241+
(list clang-8 libcap binutils imagemagick libtiff librsvg font-tuffy cmake xorriso))
240242
(else '())))))

0 commit comments

Comments
 (0)