Merge #301: contrib: also patchelf the 'liana-cli' binary
81aa0c7d8e8da7d380675f54b980a9f1ce05c67d contrib: also patchelf the 'liana-cli' binary (Antoine Poinsot) Pull request description: Fixes #271. ACKs for top commit: darosior: self-ACK 81aa0c7d8e8da7d380675f54b980a9f1ce05c67d -- tested manually. Tree-SHA512: a5f807e9d482e633b0c4b6ace4bb3d9ea522f2f0ebc9152b497f5576cbe076eedff163d292e9162b42d359d553e5b473de28e152088393d4913c4a0e8e0e4ead
This commit is contained in:
commit
9510e4e069
@ -35,11 +35,19 @@ RUSTC_BOOTSTRAP=1 cargo -vvv \
|
||||
--release \
|
||||
--target-dir "/out"
|
||||
|
||||
# Assume 64bits. Even bitcoind doesn't ship 32bits binaries for x86.
|
||||
# FIXME: is there a cleaner way than using patchelf for this?
|
||||
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 "/out/release/$BINARY_NAME"
|
||||
if [ "$IS_GUI" = "1" ]; then
|
||||
BIN_NAMES="liana-gui"
|
||||
else
|
||||
BIN_NAMES="lianad liana-cli"
|
||||
fi
|
||||
|
||||
# FIXME: Find a way to use GUIX_LD_WRAPPER_DISABLE_RPATH=yes instead
|
||||
patchelf --remove-rpath "/out/release/$BINARY_NAME"
|
||||
for bin_name in $BIN_NAMES; do
|
||||
# Assume 64bits. Even bitcoind doesn't ship 32bits binaries for x86.
|
||||
# FIXME: is there a cleaner way than using patchelf for this?
|
||||
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 "/out/release/$bin_name"
|
||||
|
||||
# FIXME: Find a way to use GUIX_LD_WRAPPER_DISABLE_RPATH=yes instead
|
||||
patchelf --remove-rpath "/out/release/$bin_name"
|
||||
done
|
||||
|
||||
set +ex
|
||||
|
||||
@ -104,9 +104,9 @@ for project_folder in "" "gui"; do
|
||||
# FIXME: find a cleaner way to get the binary name, or get rid of patchelf entirely
|
||||
# Note: we also rely on it in manifest.scm
|
||||
if [ "$project_folder" = "" ]; then
|
||||
BINARY_NAME="lianad"
|
||||
IS_GUI=0
|
||||
elif [ "$project_folder" = "gui" ]; then
|
||||
BINARY_NAME="liana-gui"
|
||||
IS_GUI=1
|
||||
else
|
||||
echo "Can't determine binary name"
|
||||
exit 1
|
||||
@ -114,10 +114,10 @@ for project_folder in "" "gui"; do
|
||||
|
||||
# Bootstrap a reproducible environment as specified by the manifest in an isolated
|
||||
# container, and build the project.
|
||||
# NOTE: it looks like "--rebuild-cache" is necessary for the BINARY_NAME variable to
|
||||
# NOTE: it looks like "--rebuild-cache" is necessary for the IS_GUI variable to
|
||||
# be taken into account when building the container (otherwise the GUI container could
|
||||
# miss some dependencies).
|
||||
BINARY_NAME="$BINARY_NAME" time_machine shell --no-cwd \
|
||||
IS_GUI="$IS_GUI" time_machine shell --no-cwd \
|
||||
--expose="$PROJECT_ROOT/src=/liana/src" \
|
||||
--expose="$PWD/gui/static=/liana/static" \
|
||||
--expose="$PROJECT_ROOT/Cargo.toml=/liana/Cargo.toml" \
|
||||
@ -131,7 +131,7 @@ for project_folder in "" "gui"; do
|
||||
--fallback \
|
||||
--rebuild-cache \
|
||||
-m $PWD/contrib/reproducible/guix/manifest.scm \
|
||||
-- env CC=gcc VENDOR_DIR="$PROJECT_VENDOR_DIR" TARGET_DIR="$PROJECT_OUT_DIR" BINARY_NAME="$BINARY_NAME" JOBS="$JOBS" \
|
||||
-- env CC=gcc VENDOR_DIR="$PROJECT_VENDOR_DIR" TARGET_DIR="$PROJECT_OUT_DIR" IS_GUI="$IS_GUI" JOBS="$JOBS" \
|
||||
/bin/sh -c "cd /liana && ./build.sh"
|
||||
done
|
||||
|
||||
|
||||
@ -6,9 +6,9 @@
|
||||
"patchelf"
|
||||
"gcc-toolchain@10.3.0")
|
||||
;; Additional dependencies for building the GUI
|
||||
(let ((binary_name (getenv "BINARY_NAME")))
|
||||
(let ((is_gui (getenv "IS_GUI")))
|
||||
(if
|
||||
(string=? binary_name "liana-gui")
|
||||
(string=? is_gui "1")
|
||||
(list "pkg-config"
|
||||
"eudev"
|
||||
"fontconfig")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user