Skip to content

Commit 182d885

Browse files
committed
Fix binfmt.d interpreter path
1 parent 8f97680 commit 182d885

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ci/build.sh

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ cmake_args=(
4545
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
4646
"-DBUILD_TESTING=OFF"
4747
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
48+
# TODO: we don't necessarily want to hardcode this here
49+
"-DBINFMT_INTERPRETER_PATH_PREPEND_LD_P_NATIVE_PACKAGES_PREFIX=/opt/appimagelauncher.AppDir/"
4850
)
4951

5052
if [[ "${BUILD_LITE:-}" == "" ]]; then

cmake/install.cmake

+7
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,18 @@ if(ENABLE_UPDATE_HELPER)
4343
)
4444
endif()
4545

46+
option(BINFMT_INTERPRETER_PATH_PREPEND_LD_P_NATIVE_PACKAGES_PREFIX "")
47+
4648
if(NOT BUILD_LITE)
4749
# unfortunately, due to a cyclic dependency, we need to hardcode parts of this variable, which is included in the
4850
# install scripts and the binfmt.d config
4951
set(BINFMT_INTERPRETER_PATH ${CMAKE_INSTALL_PREFIX}/${_private_libdir}/binfmt-interpreter)
5052

53+
if(BINFMT_INTERPRETER_PATH_PREPEND_LD_P_NATIVE_PACKAGES_PREFIX)
54+
message(STATUS "Prepending prefix ${BINFMT_INTERPRETER_PATH_PREPEND_LD_P_NATIVE_PACKAGES_PREFIX} to binfmt interpreter path")
55+
set(BINFMT_INTERPRETER_PATH "${BINFMT_INTERPRETER_PATH_PREPEND_LD_P_NATIVE_PACKAGES_PREFIX}${BINFMT_INTERPRETER_PATH}")
56+
endif()
57+
5158
# according to https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html, we must make sure the
5259
# interpreter string does not exceed 127 characters
5360
set(BINFMT_INTERPRETER_PATH_LENGTH_MAX 127)

0 commit comments

Comments
 (0)