aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-12-13 10:41:33 +0000
committerfanquake <fanquake@gmail.com>2023-12-13 10:44:22 +0000
commit54f6756e52d07c099328bc9a99a75308e804da21 (patch)
tree4fcdb10e0700da79acce00837eaf914a3ba6de96
parentf48a789385add6df3582b2a957db6156f9f36f2b (diff)
parentbde8d63b17637c507a543cebe90f2998b5847373 (diff)
Merge bitcoin/bitcoin#28846: depends: fix libmultiprocess build on aarch64
bde8d63b17637c507a543cebe90f2998b5847373 depends: build libmultiprocess with position independant code (fanquake) 506634d79d6427925cd458f67799fe59e0ab14dd depends: always install libmultiprocess to /lib (fanquake) beb309626381bf189cd2ae8bde83078b9de47c6a depends: always install capnp to /lib (fanquake) Pull request description: Change to always install libmultiprocess into `lib/`. On some systems (my Fedora aarch64 box), libmultiprocess was being installed into `lib64/`, and then configure would fail to pick it up, because we only add `lib/` to pkgconfig/ldflags out of depends. Rather than adding lib64 to those, I opted for installing libmultiprocess into lib, with every other dependency we build. This was broken in our build after https://github.com/chaincodelabs/libmultiprocess/pull/79 upstream. ACKs for top commit: ryanofsky: Code review ACK bde8d63b17637c507a543cebe90f2998b5847373. Only changes since last review were reverting the native_capnp change as suggested, and changing the order of the first two commits. Tree-SHA512: ddd547e4ac224f2f199c569efd91104db7f2c243b124f9535aa0d9377315775ac566d699101580ce45ddd6676ad3e0c8cbe256334eeed9548205c2fa04d02102
-rw-r--r--depends/packages/capnp.mk11
-rw-r--r--depends/packages/libmultiprocess.mk6
2 files changed, 14 insertions, 3 deletions
diff --git a/depends/packages/capnp.mk b/depends/packages/capnp.mk
index 1c1a77eb16..2465c8091b 100644
--- a/depends/packages/capnp.mk
+++ b/depends/packages/capnp.mk
@@ -5,10 +5,15 @@ $(package)_download_file=$(native_$(package)_download_file)
$(package)_file_name=$(native_$(package)_file_name)
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
+# Hardcode library install path to "lib" to match the PKG_CONFIG_PATH
+# setting in depends/config.site.in, which also hardcodes "lib".
+# Without this setting, cmake by default would use the OS library
+# directory, which might be "lib64" or something else, not "lib", on multiarch systems.
define $(package)_set_vars :=
-$(package)_config_opts := -DBUILD_TESTING=OFF
-$(package)_config_opts += -DWITH_OPENSSL=OFF
-$(package)_config_opts += -DWITH_ZLIB=OFF
+ $(package)_config_opts := -DBUILD_TESTING=OFF
+ $(package)_config_opts += -DWITH_OPENSSL=OFF
+ $(package)_config_opts += -DWITH_ZLIB=OFF
+ $(package)_config_opts += -DCMAKE_INSTALL_LIBDIR=lib/
endef
define $(package)_config_cmds
diff --git a/depends/packages/libmultiprocess.mk b/depends/packages/libmultiprocess.mk
index 765d649377..d237f52dbb 100644
--- a/depends/packages/libmultiprocess.mk
+++ b/depends/packages/libmultiprocess.mk
@@ -8,7 +8,13 @@ ifneq ($(host),$(build))
$(package)_dependencies += native_capnp
endif
+# Hardcode library install path to "lib" to match the PKG_CONFIG_PATH
+# setting in depends/config.site.in, which also hardcodes "lib".
+# Without this setting, cmake by default would use the OS library
+# directory, which might be "lib64" or something else, not "lib", on multiarch systems.
define $(package)_set_vars :=
+$(package)_config_opts += -DCMAKE_INSTALL_LIBDIR=lib/
+$(package)_config_opts += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
ifneq ($(host),$(build))
$(package)_config_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp"
$(package)_config_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++"