Commit 9cb9f241 authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

build: When installing applications, attempt to remove internal rpath



When installed, they'll find their dependencies in the system paths
instead. This is best effort - not all executables we install are elf
files (some are Python scripts), and not all distros have patchelf.

Change-Id: Ic576c6ac4a8516d62bb08c0817489de44981a465
Signed-off-by: default avatarBen Walker <ben@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21522


Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 09eaba31
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -465,7 +465,8 @@ UNINSTALL_SHARED_LIB=\
INSTALL_APP=\
	$(Q)echo "  INSTALL $(DESTDIR)$(bindir)/$(notdir $<)"; \
	install -d -m 755 "$(DESTDIR)$(bindir)"; \
	install -m 755 "$<" "$(DESTDIR)$(bindir)/"
	install -m 755 "$<" "$(DESTDIR)$(bindir)/"; \
	patchelf --remove-rpath "$(DESTDIR)$(bindir)/$(notdir $<)" || true

# Uninstall an app binary
UNINSTALL_APP=\
@@ -476,7 +477,8 @@ UNINSTALL_APP=\
INSTALL_EXAMPLE=\
	$(Q)echo "  INSTALL $(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))"; \
	install -d -m 755 "$(DESTDIR)$(bindir)"; \
	install -m 755 "$<" "$(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))"
	install -m 755 "$<" "$(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))"; \
	patchelf --remove-rpath "$(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))/$(notdir $<)" || true

# Uninstall an example binary
UNINSTALL_EXAMPLE=\
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ fi

yum install -y gcc gcc-c++ make CUnit-devel libaio-devel openssl-devel \
	libuuid-devel libiscsi-devel ncurses-devel json-c-devel libcmocka-devel \
	clang clang-devel python3-pip unzip fuse3-devel
	clang clang-devel python3-pip unzip fuse3-devel patchelf

# Minimal install
# workaround for arm: ninja fails with dep on skbuild python module