From 042c0cf1e63c6957399e4908cbe7a35a0aae39b0 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 28 Oct 2021 18:55:26 -0700 Subject: [PATCH 1/3] remove a bunch of rpath hacks These are already default. Signed-off-by: Rosen Penev --- libs/czmq/Makefile | 1 - libs/lzo/Makefile | 4 +--- libs/zmq/Makefile | 1 - multimedia/mjpg-streamer/Makefile | 2 -- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/libs/czmq/Makefile b/libs/czmq/Makefile index 857f0cee..e6f606d5 100644 --- a/libs/czmq/Makefile +++ b/libs/czmq/Makefile @@ -41,7 +41,6 @@ endef CMAKE_OPTIONS += \ -DBUILD_TESTING=OFF \ -DCMAKECONFIG_INSTALL_DIR=lib/cmake/czmq \ - -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DENABLE_DRAFTS=OFF define Package/czmq/install diff --git a/libs/lzo/Makefile b/libs/lzo/Makefile index 0e4e678c..e78a0520 100644 --- a/libs/lzo/Makefile +++ b/libs/lzo/Makefile @@ -39,9 +39,7 @@ endef CMAKE_OPTIONS += \ -DENABLE_SHARED=ON \ -DENABLE_STATIC=ON \ - \ - -DBUILD_TESTING=OFF \ - -DCMAKE_SKIP_INSTALL_RPATH=ON + -DBUILD_TESTING=OFF define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig diff --git a/libs/zmq/Makefile b/libs/zmq/Makefile index d483ea70..25266b98 100644 --- a/libs/zmq/Makefile +++ b/libs/zmq/Makefile @@ -77,7 +77,6 @@ CMAKE_OPTIONS += \ -DA2X_EXECUTABLE=OFF \ -DASCIIDOC_EXECUTABLE=OFF \ -DBUILD_STATIC=OFF \ - -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DZMQ_HAVE_SOCK_CLOEXEC=ON \ -DZMQ_HAVE_SO_KEEPALIVE=ON \ -DZMQ_HAVE_TCP_KEEPCNT=ON \ diff --git a/multimedia/mjpg-streamer/Makefile b/multimedia/mjpg-streamer/Makefile index 5fc943c8..c43bbe30 100644 --- a/multimedia/mjpg-streamer/Makefile +++ b/multimedia/mjpg-streamer/Makefile @@ -175,8 +175,6 @@ $(call Package/mjpg-streamer/Default/description) This package provides simple version of the web content. endef -CMAKE_OPTIONS += -DCMAKE_SKIP_RPATH=FALSE - CAMBOZOLA:=cambozola-0.936.tar.gz # Distribution URL doesn't always have the correct version From b18f39c11578dc0c4ae2b9d9665b009bf620fbfe Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 10 Mar 2022 15:17:45 -0800 Subject: [PATCH 2/3] treewide: remove rpath-link Most usages seem to be outdated and fixed a long time ago. Signed-off-by: Rosen Penev --- libs/libcups/Makefile | 4 +--- multimedia/fswebcam/Makefile | 4 ++-- net/strongswan/Makefile | 2 -- net/vnstat/Makefile | 4 ++-- sound/owntone/Makefile | 1 - sound/sox/Makefile | 4 ---- utils/bandwidthd/Makefile | 2 +- utils/mbtools/Makefile | 11 ++--------- utils/owfs/Makefile | 3 +-- 9 files changed, 9 insertions(+), 26 deletions(-) diff --git a/libs/libcups/Makefile b/libs/libcups/Makefile index 8d81ea37..39b5c8e9 100644 --- a/libs/libcups/Makefile +++ b/libs/libcups/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cups PKG_VERSION:=2.2.12 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.gz PKG_SOURCE_URL:=https://github.com/apple/cups/releases/download/v$(PKG_VERSION)/ @@ -40,8 +40,6 @@ define Package/libcups/description Common UNIX Printing System - Core library endef -TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib - CONFIGURE_ARGS+=--with-cups-user="nobody" \ --with-cups-group="nogroup" \ --with-components="core" \ diff --git a/multimedia/fswebcam/Makefile b/multimedia/fswebcam/Makefile index b4eda099..1de46164 100644 --- a/multimedia/fswebcam/Makefile +++ b/multimedia/fswebcam/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fswebcam PKG_VERSION:=20140113 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.firestorm.cx/fswebcam/files \ @@ -40,7 +40,7 @@ define Package/fswebcam/description endef EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib +EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) define Package/fswebcam/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/net/strongswan/Makefile b/net/strongswan/Makefile index 5ffcff00..2ab23f44 100644 --- a/net/strongswan/Makefile +++ b/net/strongswan/Makefile @@ -478,8 +478,6 @@ CONFIGURE_ARGS+= \ ) \ ac_cv_search___atomic_load=no -EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib - define Package/strongswan/conffiles /etc/strongswan.conf /etc/strongswan.d/ diff --git a/net/vnstat/Makefile b/net/vnstat/Makefile index e69b5b03..35c5782f 100644 --- a/net/vnstat/Makefile +++ b/net/vnstat/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vnstat PKG_VERSION:=1.18 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://humdi.net/vnstat @@ -71,7 +71,7 @@ define Build/Compile/vnstati +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ all endef diff --git a/sound/owntone/Makefile b/sound/owntone/Makefile index d0c1e27a..0fe6190d 100644 --- a/sound/owntone/Makefile +++ b/sound/owntone/Makefile @@ -58,7 +58,6 @@ CONFIGURE_ARGS += \ --without-libevent_pthreads TARGET_CFLAGS += $(FPIC) -TARGET_LDFLAGS += -Wl,-rpath-link,$(STAGING_DIR)/usr/lib define Package/owntone/install $(INSTALL_DIR) $(1)/usr/sbin diff --git a/sound/sox/Makefile b/sound/sox/Makefile index 55ada517..32561780 100644 --- a/sound/sox/Makefile +++ b/sound/sox/Makefile @@ -17,14 +17,10 @@ PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=LGPL-2.1 GPL-2.0 PKG_LICENSE_FILES:=COPYING LICENSE.LGPL LICENSE.GPL - PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk -TARGET_LDFLAGS+= \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib - define Package/sox SECTION:=sound CATEGORY:=Sound diff --git a/utils/bandwidthd/Makefile b/utils/bandwidthd/Makefile index a421f7a0..d0bb1300 100644 --- a/utils/bandwidthd/Makefile +++ b/utils/bandwidthd/Makefile @@ -139,7 +139,7 @@ CONFIGURE_ARGS += \ endif EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -fgnu89-inline -EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib +EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) define Package/bandwidthd/install $(INSTALL_DIR) $(1)/usr/sbin diff --git a/utils/mbtools/Makefile b/utils/mbtools/Makefile index f88b7940..5f69afb9 100644 --- a/utils/mbtools/Makefile +++ b/utils/mbtools/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mbtools PKG_SOURCE_DATE:=2014-10-29 PKG_SOURCE_VERSION:=149e9c69cec180f18cf8781cf5285b97352bf719 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/webstack/mbtools @@ -31,7 +31,7 @@ define Package/mbtools SECTION:=utils CATEGORY:=Utilities TITLE:=Modbus tools - DEPENDS:=+glib2 +libmodbus $(INTL_DEPENDS) + DEPENDS:=+glib2 +libmodbus endef define Package/mbtools/description @@ -40,13 +40,6 @@ define Package/mbtools/description as client or server (in TCP or RTU) endef -ifneq ($(INTL_FULL),) -TARGET_LDFLAGS += \ - -L$(INTL_PREFIX)/lib \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib - -endif - define Package/mbtools/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbrecorder $(1)/usr/bin/ diff --git a/utils/owfs/Makefile b/utils/owfs/Makefile index 0cb620e8..5535a853 100644 --- a/utils/owfs/Makefile +++ b/utils/owfs/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=owfs PKG_VERSION:=3.2p4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/owfs/owfs/releases/download/v$(PKG_VERSION) @@ -201,7 +201,6 @@ CONFIGURE_ARGS += \ $(if $(CONFIG_LIBOW_OWTRAFFIC),--enable-owtraffic,--disable-owtraffic) CONFIGURE_VARS += \ - LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -Wl,-rpath-link=$(TOOLCHAIN_DIR)/usr/lib" \ lt_cv_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \ lt_cv_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \ shrext_cmds=".so" \ From 225aaa122a49275f07e1a3de97d7d4a1b15138cc Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 6 Nov 2021 17:35:51 +0100 Subject: [PATCH 3/3] mjpg-streamer: fix missing runpath This partially reverts ac5912e9cb7761b5153bc12343f1af8b224c1d29. CMAKE_SKIP_RPATH=TRUE is set in include/cmake.mk, so the commit removed this from some packages as it is the default anyway. But in mjpg-streamer Makefile this was not set to "TRUE", but to "FALSE". So this line shouldn't have been removed. With this revert the runpath is back and modules can be loaded again from "/usr/lib/mjpg-streamer": readelf -d build_dir/target-mips_24kc_musl/mjpg-streamer-1.0.0/ipkg-mips_24kc/mjpg-streamer/usr/bin/mjpg_streamer Dynamic section at offset 0x1c0 contains 35 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libjpeg.so.62] 0x00000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x00000001 (NEEDED) Shared library: [libc.so] 0x0000001d (RUNPATH) Library runpath: [/usr/lib/mjpg-streamer] Resolve #17081 Signed-off-by: Sebastian Kemper --- multimedia/mjpg-streamer/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multimedia/mjpg-streamer/Makefile b/multimedia/mjpg-streamer/Makefile index c43bbe30..5fc943c8 100644 --- a/multimedia/mjpg-streamer/Makefile +++ b/multimedia/mjpg-streamer/Makefile @@ -175,6 +175,8 @@ $(call Package/mjpg-streamer/Default/description) This package provides simple version of the web content. endef +CMAKE_OPTIONS += -DCMAKE_SKIP_RPATH=FALSE + CAMBOZOLA:=cambozola-0.936.tar.gz # Distribution URL doesn't always have the correct version