Skip to content

Commit 1ad5d50

Browse files
committed
Merge bitcoin/bitcoin#24866: build: No longer need to hack the PATH variable in config.site
efa3a80 build: No longer need to hack the `PATH` variable in `config.site` (Hennadii Stepanov) f3af4f7 build: Let the depends build system define a path to `dsymutil` tool (Hennadii Stepanov) b0a8dda build: Pass missed darwin-specific tools via `config.site` (Hennadii Stepanov) f87594d build: No need to provide defaults for darwin-specific tools (Hennadii Stepanov) 80cd993 scripted-diff: Rename INSTALLNAMETOOL -> INSTALL_NAME_TOOL (Hennadii Stepanov) a4fd440 build: Pass missed `strip` tool via `config.site` (Hennadii Stepanov) Pull request description: This PR adds lacking definitions of absolute paths to some tools in the depends build system. This improvement makes possible to keep the `PATH` variable untouched during configuration. Also see bitcoin/bitcoin#24566 (comment). #### Guix builds on `x86_64`: ``` $ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum 93fa58bf2a1f5c15c5a547c014036ac79761e5c9622bd5099408ce570b39f02f guix-build-efa3a807a677/output/aarch64-linux-gnu/SHA256SUMS.part ef5f53348404ba973dceaf088a4d47dfd0f1fa3d3bf75bdd723b043431de005d guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu-debug.tar.gz 6688b2295d564b32ea676c0540c43cdc5211322eddc87e0967b764284e847368 guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu.tar.gz 4abb3428be477aa7360611689fd28950f30dbbac6a95c454095367d8df11ad72 guix-build-efa3a807a677/output/arm-linux-gnueabihf/SHA256SUMS.part 8dd33389170e83812821d5dd68741db96af1376035ba40af0215a7ae95dcf7fc guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf-debug.tar.gz 544e97eb88b2a44c8ceb9660399eb5d49d75e07ff59fc03a701a595bacea0491 guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf.tar.gz 219faf1131bdcffffd5979eafd2beabc4a300081f8b1df184852b7183dfbc0e8 guix-build-efa3a807a677/output/arm64-apple-darwin/SHA256SUMS.part 602a417bfa7971fb26d0fe9921d2348fd0d01a5bcf0af93f8a9d50112076e0eb guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.dmg 0dcb197420844da8da3f528a1d986628f7b63adb1e83353d63e8a84da59abc42 guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.tar.gz 10efdd33418234a8288c27a614f50e9ff45efbd681fa1c0e173142b6d267cdb8 guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin.tar.gz e5ef02adeb9bcb4675972b0dc233a904006b0940d721049eeb94b14cda34872e guix-build-efa3a807a677/output/dist-archive/bitcoin-efa3a807a677.tar.gz a75d2a49b7a8ab1c849e1badff5049a417519f0154b65335a8717d01b8b6ed62 guix-build-efa3a807a677/output/powerpc64-linux-gnu/SHA256SUMS.part aef63d196487dd0bc597fd53633ac889149f1a126c651ea55f3bec11a092c460 guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu-debug.tar.gz ddc7913eed26270be271a8712bf351d562d57c746810ea3b7b4101aea8cb6d89 guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu.tar.gz 83bbf4b1af07a2cf7d6014de7c885f0998dd38afacdb5242f5f56505ee704f17 guix-build-efa3a807a677/output/powerpc64le-linux-gnu/SHA256SUMS.part c9d5d95de98ed987b63a78d4f6e082cb36d5ec3ba71d130601e03d3ebfbd208d guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu-debug.tar.gz 88ed6ec82dd4c1c656fe80b4c49f91a4c15c2ab798dbbe16a3d57393f17d6f3a guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu.tar.gz 7b8e7b3b1e68a2ea0e37c058b284da11e9721ef4d1bc2761ed003b2061358d5f guix-build-efa3a807a677/output/riscv64-linux-gnu/SHA256SUMS.part a5de4bedf2b4bc5ab25db21b942076897cabe8a40ce9b0637488af6b4d90693a guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu-debug.tar.gz 53023994202887778a001ce00daf7cdc135b9e6c3be034f31645ab4ba5f078c6 guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu.tar.gz c6664a61b81dfa080c466d2252a6db70165acbea6cfad51ada16970e9c08bb6f guix-build-efa3a807a677/output/x86_64-apple-darwin/SHA256SUMS.part a528569ae4bf5e19401311649086a2d8e3fa5251b44550e623722968dfb111ea guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.dmg 9b0384cce7605b546ed581074955f2b9c33cf0817453842036e6224b423b814b guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.tar.gz ebdbd2f3a6406233f27ee48be0ab014991fedba3c0831f79f4a4873f7abf3d7a guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin.tar.gz 05a8f71fe67f7193e71ea8bbe6f8df2e651b8ac7da3075ba25aacdd3515f7757 guix-build-efa3a807a677/output/x86_64-linux-gnu/SHA256SUMS.part 30a17a1e3d795ea390cd1e0f3ef74c989b5768ae7415740fcca46befe4cb7206 guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu-debug.tar.gz 66db846f3fd739089afa5c339659dbf5efb50572f2d29f8288bf24be9e8f1dd0 guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu.tar.gz bd3c44890823badcf6d296fa674de14275684be7593f4ab21c0316873ddd8652 guix-build-efa3a807a677/output/x86_64-w64-mingw32/SHA256SUMS.part 6ce3ee21212ff2a95e085073a48194476ade2d5ff94cc1c8ec58a8ae7db8f1fa guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-debug.zip 5e697c05537cfb2ce2ed95fef25e261e2cfa83a31fd548a98118580c4bbff2e4 guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-setup-unsigned.exe 4cc2bcff98845c792c0ed12a2ea407b25fb85b2d4250d88dca94ed68f42e714d guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-unsigned.tar.gz 9d5d72271dc6b820e63b30c5c3f9015309777793100b4e2b6ab0c8ea0f7b4aed guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64.zip ``` ACKs for top commit: laanwj: Tested ACK efa3a80. I get the same build output as in OP: vincenzopalazzo: Re ACK bitcoin/bitcoin@efa3a80 Tree-SHA512: 6d35c11fc307221d61ad250bbdcdc09dbc49adbe43f7a94acb56190ae9f005d23fc22941ea59e3eb62811f8974e39d3617e0c47071232d4b1b0bc2e2e2782e88
2 parents 0d080a1 + efa3a80 commit 1ad5d50

File tree

9 files changed

+33
-11
lines changed

9 files changed

+33
-11
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ $(OSX_DMG): deploydir
133133
$(XORRISOFS) -D -l -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -o $@ $(APP_DIST_DIR) -- $(if $(SOURCE_DATE_EPOCH),-volume_date all_file_dates =$(SOURCE_DATE_EPOCH))
134134

135135
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
136-
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
136+
INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
137137

138138
deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
139139
endif !BUILD_DARWIN

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ case $host in
781781
;;
782782
*)
783783
AC_PATH_TOOL([DSYMUTIL], [dsymutil], [dsymutil])
784-
AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], [install_name_tool])
784+
AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [install_name_tool])
785785
AC_PATH_TOOL([OTOOL], [otool], [otool])
786786
AC_PATH_PROGS([XORRISOFS], [xorrisofs], [xorrisofs])
787787

contrib/macdeploy/macdeployqtplus

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def getFrameworks(binaryPath: str, verbose: int) -> List[FrameworkInfo]:
211211
return libraries
212212

213213
def runInstallNameTool(action: str, *args):
214-
installnametoolbin=os.getenv("INSTALLNAMETOOL", "install_name_tool")
214+
installnametoolbin=os.getenv("INSTALL_NAME_TOOL", "install_name_tool")
215215
run([installnametoolbin, "-"+action] + list(args), check=True)
216216

217217
def changeInstallName(oldName: str, newName: str, binaryPath: str, verbose: int):

depends/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
222222
-e 's|@RANLIB@|$(host_RANLIB)|' \
223223
-e 's|@NM@|$(host_NM)|' \
224224
-e 's|@STRIP@|$(host_STRIP)|' \
225+
-e 's|@OTOOL@|$(host_OTOOL)|' \
226+
-e 's|@INSTALL_NAME_TOOL@|$(host_INSTALL_NAME_TOOL)|' \
227+
-e 's|@DSYMUTIL@|$(host_DSYMUTIL)|' \
225228
-e 's|@build_os@|$(build_os)|' \
226229
-e 's|@host_os@|$(host_os)|' \
227230
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \

depends/builders/darwin.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ build_darwin_STRIP:=$(shell xcrun -f strip)
66
build_darwin_OTOOL:=$(shell xcrun -f otool)
77
build_darwin_NM:=$(shell xcrun -f nm)
88
build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
9+
build_darwin_DSYMUTIL:=$(shell xcrun -f dsymutil)
910
build_darwin_SHA256SUM=shasum -a 256
1011
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
1112

@@ -19,6 +20,7 @@ darwin_LIBTOOL:=$(shell xcrun -f libtool)
1920
darwin_OTOOL:=$(shell xcrun -f otool)
2021
darwin_NM:=$(shell xcrun -f nm)
2122
darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
23+
darwin_DSYMUTIL:=$(shell xcrun -f dsymutil)
2224
darwin_native_binutils=
2325
darwin_native_toolchain=
2426

depends/builders/default.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ default_build_TAR = tar
55
default_build_RANLIB = ranlib
66
default_build_STRIP = strip
77
default_build_NM = nm
8-
default_build_OTOOL = otool
9-
default_build_INSTALL_NAME_TOOL = install_name_tool
108

119
define add_build_tool_func
1210
build_$(build_os)_$1 ?= $$(default_build_$1)
1311
build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1)
1412
build_$1=$$(build_$(build_arch)_$(build_os)_$1)
1513
endef
16-
$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL,$(eval $(call add_build_tool_func,$(var))))
14+
$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_build_tool_func,$(var))))
1715
define add_build_flags_func
1816
build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1)
1917
build_$1=$$(build_$(build_arch)_$(build_os)_$1)

depends/config.site.in

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ if test "@host_os@" = darwin; then
7878
BREW=no
7979
fi
8080

81-
PATH="${depends_prefix}/native/bin:${PATH}"
8281
PKG_CONFIG="$(which pkg-config) --static"
8382

8483
# These two need to remain exported because pkg-config does not see them
@@ -115,6 +114,28 @@ if test -n "@NM@"; then
115114
ac_cv_path_ac_pt_NM="${NM}"
116115
fi
117116

117+
if test -n "@STRIP@"; then
118+
STRIP="@STRIP@"
119+
ac_cv_path_ac_pt_STRIP="${STRIP}"
120+
fi
121+
122+
if test "@host_os@" = darwin; then
123+
if test -n "@OTOOL@"; then
124+
OTOOL="@OTOOL@"
125+
ac_cv_path_ac_pt_OTOOL="${OTOOL}"
126+
fi
127+
128+
if test -n "@INSTALL_NAME_TOOL@"; then
129+
INSTALL_NAME_TOOL="@INSTALL_NAME_TOOL@"
130+
ac_cv_path_ac_pt_INSTALL_NAME_TOOL="${INSTALL_NAME_TOOL}"
131+
fi
132+
133+
if test -n "@DSYMUTIL@"; then
134+
DSYMUTIL="@DSYMUTIL@"
135+
ac_cv_path_ac_pt_DSYMUTIL="${DSYMUTIL}"
136+
fi
137+
fi
138+
118139
if test -n "@debug@"; then
119140
enable_reduce_exports=no
120141
fi

depends/hosts/darwin.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++")
3838
clang_resource_dir=$(shell clang -print-resource-dir)
3939
endif
4040

41-
cctools_TOOLS=AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL
41+
cctools_TOOLS=AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL DSYMUTIL
4242

4343
# Make-only lowercase function
4444
lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))

depends/hosts/default.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ default_host_AR = $(host_toolchain)ar
88
default_host_RANLIB = $(host_toolchain)ranlib
99
default_host_STRIP = $(host_toolchain)strip
1010
default_host_LIBTOOL = $(host_toolchain)libtool
11-
default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool
12-
default_host_OTOOL = $(host_toolchain)otool
1311
default_host_NM = $(host_toolchain)nm
1412

1513
define add_host_tool_func
@@ -35,5 +33,5 @@ host_$1 = $$($(host_arch)_$(host_os)_$1)
3533
host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
3634
endef
3735

38-
$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool))))
36+
$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_host_tool_func,$(tool))))
3937
$(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))

0 commit comments

Comments
 (0)