From d8e3afc3352a2742e9da1f777e026d1f051042ac Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:58:49 +0100 Subject: [PATCH 1/2] depends: Fix build with `MULTIPROCESS=1` in Guix environment In the Guix environment, `${BASEPREFIX}/${HOST}/native/bin` is added to the `PATH` environment variable, causing CMake to search for package configurations in the `native` subdirectory first. Explicitly specifying the top-priority search prefixes for the `Libmultiprocess` and `LibmultiprocessNative` packages resolves the issue. --- depends/toolchain.cmake.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/depends/toolchain.cmake.in b/depends/toolchain.cmake.in index c733c81edf7..d805c1c4f9d 100644 --- a/depends/toolchain.cmake.in +++ b/depends/toolchain.cmake.in @@ -168,7 +168,8 @@ endif() if("@multiprocess@" STREQUAL "1") set(WITH_MULTIPROCESS ON CACHE BOOL "") - set(LibmultiprocessNative_DIR "${CMAKE_FIND_ROOT_PATH}/native/lib/cmake/Libmultiprocess" CACHE PATH "") + set(Libmultiprocess_ROOT "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "") + set(LibmultiprocessNative_ROOT "${CMAKE_CURRENT_LIST_DIR}/native" CACHE PATH "") else() set(WITH_MULTIPROCESS OFF CACHE BOOL "") endif() From 06b4c339e89e593d951a90cd2d1bce944acf3bf7 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:24:08 +0100 Subject: [PATCH 2/2] depends: Fix reproducibility when building with `MULTIPROCESS=1` --- depends/packages/capnp.mk | 1 + depends/packages/libmultiprocess.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/depends/packages/capnp.mk b/depends/packages/capnp.mk index 6d792db7113..0c211cbc455 100644 --- a/depends/packages/capnp.mk +++ b/depends/packages/capnp.mk @@ -9,6 +9,7 @@ define $(package)_set_vars := $(package)_config_opts := -DBUILD_TESTING=OFF $(package)_config_opts += -DWITH_OPENSSL=OFF $(package)_config_opts += -DWITH_ZLIB=OFF + $(package)_cxxflags += -ffile-prefix-map=$$($(package)_extract_dir)=/usr endef define $(package)_config_cmds diff --git a/depends/packages/libmultiprocess.mk b/depends/packages/libmultiprocess.mk index c292c49bfba..a181e05100b 100644 --- a/depends/packages/libmultiprocess.mk +++ b/depends/packages/libmultiprocess.mk @@ -13,6 +13,7 @@ ifneq ($(host),$(build)) $(package)_config_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp" $(package)_config_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++" endif +$(package)_cxxflags += -ffile-prefix-map=$$($(package)_extract_dir)=/usr endef define $(package)_config_cmds