Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ jobs:
shell: bash
run: >
./libbitcoin-server/builds/cmake/install-cmake.sh
-DCMAKE_SKIP_INSTALL_RPATH=${{ matrix.link == 'static' && 'ON' || 'OFF' }}
--noninteractive
--build-use-local-src
--build-src-dir="${{ github.workspace }}"
Expand Down Expand Up @@ -591,6 +592,28 @@ jobs:
cp -L -n ${CANDIDATE} candidate/${CANONICAL}
echo "candidate_identifier=${CANONICAL}" >> "$GITHUB_OUTPUT"

- name: Remove embedded RUNPATH/RPATH
if: ${{
matrix.link == 'static' &&
matrix.toolchain != 'msbuild' &&
startsWith(matrix.image, 'ubuntu') &&
matrix.container == ''
}}
shell: bash
run: |
sudo apt-get install -y patchelf
find candidate -type f -executable -print0 | while IFS= read -r -d '' f; do
if file "$f" | grep -q ELF; then
echo "=== $f ==="
echo "Before:"
readelf -d "$f" | grep -E 'RPATH|RUNPATH' || echo "(none)"
# or: patchelf --print-rpath "$f"
patchelf --remove-rpath "$f" || true
echo "After:"
readelf -d "$f" | grep -E 'RPATH|RUNPATH' || echo "(none)"
fi
done

- name: Strip symbols from binaries
if: ${{ matrix.configuration != 'debug' && matrix.toolchain != 'msbuild' }}
shell: bash
Expand Down
20 changes: 11 additions & 9 deletions builds/cmake/install-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,18 @@ main()
msg_verbose "No --prefix specified, defaulting to '${PREFIX}'."
else
# Incorporate the custom libdir into each object, for link time resolution
if [[ -z "${LD_RUN_PATH}" ]]; then
export LD_RUN_PATH="${PREFIX}/lib"
else
export LD_RUN_PATH="${LD_RUN_PATH}:${PREFIX}/lib"
fi
if [[ "${BUILD_LINK}" == "dynamic" ]]; then
if [[ -z "${LD_RUN_PATH}" ]]; then
export LD_RUN_PATH="${PREFIX}/lib"
else
export LD_RUN_PATH="${LD_RUN_PATH}:${PREFIX}/lib"
fi

if [[ -z "${LD_LIBRARY_PATH}" ]]; then
export LD_LIBRARY_PATH="${PREFIX}/lib"
else
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PREFIX}/lib"
if [[ -z "${LD_LIBRARY_PATH}" ]]; then
export LD_LIBRARY_PATH="${PREFIX}/lib"
else
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PREFIX}/lib"
fi
fi
fi

Expand Down
20 changes: 11 additions & 9 deletions builds/cmake/install-presets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,18 @@ main()
msg_verbose "No --prefix specified, defaulting to '${PREFIX}'."
else
# Incorporate the custom libdir into each object, for link time resolution
if [[ -z "${LD_RUN_PATH}" ]]; then
export LD_RUN_PATH="${PREFIX}/lib"
else
export LD_RUN_PATH="${LD_RUN_PATH}:${PREFIX}/lib"
fi
if [[ "${BUILD_LINK}" == "dynamic" ]]; then
if [[ -z "${LD_RUN_PATH}" ]]; then
export LD_RUN_PATH="${PREFIX}/lib"
else
export LD_RUN_PATH="${LD_RUN_PATH}:${PREFIX}/lib"
fi

if [[ -z "${LD_LIBRARY_PATH}" ]]; then
export LD_LIBRARY_PATH="${PREFIX}/lib"
else
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PREFIX}/lib"
if [[ -z "${LD_LIBRARY_PATH}" ]]; then
export LD_LIBRARY_PATH="${PREFIX}/lib"
else
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PREFIX}/lib"
fi
fi
fi

Expand Down
20 changes: 11 additions & 9 deletions builds/gnu/install-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,18 @@ main()
msg_verbose "No --prefix specified, defaulting to '${PREFIX}'."
else
# Incorporate the custom libdir into each object, for link time resolution
if [[ -z "${LD_RUN_PATH}" ]]; then
export LD_RUN_PATH="${PREFIX}/lib"
else
export LD_RUN_PATH="${LD_RUN_PATH}:${PREFIX}/lib"
fi
if [[ "${BUILD_LINK}" == "dynamic" ]]; then
if [[ -z "${LD_RUN_PATH}" ]]; then
export LD_RUN_PATH="${PREFIX}/lib"
else
export LD_RUN_PATH="${LD_RUN_PATH}:${PREFIX}/lib"
fi

if [[ -z "${LD_LIBRARY_PATH}" ]]; then
export LD_LIBRARY_PATH="${PREFIX}/lib"
else
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PREFIX}/lib"
if [[ -z "${LD_LIBRARY_PATH}" ]]; then
export LD_LIBRARY_PATH="${PREFIX}/lib"
else
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PREFIX}/lib"
fi
fi
fi

Expand Down
Loading