From bbbd0b11e2146b4e9c7df78fd3cded5e892daaca Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Wed, 23 Feb 2022 16:10:32 +0100 Subject: [PATCH] Get rid of RPATH --- .suitesparse.metadata | 1 + 0001-build-don-t-set-RPATH-on-Linux.patch | 25 +++++++++++++++++++++++ suitesparse.spec | 8 +++++++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .suitesparse.metadata create mode 100644 0001-build-don-t-set-RPATH-on-Linux.patch diff --git a/.suitesparse.metadata b/.suitesparse.metadata new file mode 100644 index 0000000..6bf643b --- /dev/null +++ b/.suitesparse.metadata @@ -0,0 +1 @@ +23bb875f50c2b1ea7d9e7885e1956fa02e210824 SuiteSparse-5.4.0.tar.gz diff --git a/0001-build-don-t-set-RPATH-on-Linux.patch b/0001-build-don-t-set-RPATH-on-Linux.patch new file mode 100644 index 0000000..cf048e1 --- /dev/null +++ b/0001-build-don-t-set-RPATH-on-Linux.patch @@ -0,0 +1,25 @@ +From 6cfb73889129bd537115479b5756b834f4bf1070 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 21 Feb 2022 18:42:28 +0100 +Subject: [PATCH] build: don't set RPATH on Linux + +--- + SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk b/SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk +index 1d3d18f..ee60de4 100644 +--- a/SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk ++++ b/SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk +@@ -358,7 +358,7 @@ SUITESPARSE_VERSION = 5.4.0 + + ifeq ($(UNAME),Linux) + # add the realtime library, librt, and SuiteSparse/lib +- LDLIBS += -lrt -Wl,-rpath=$(INSTALL_LIB) ++ LDLIBS += -lrt + endif + + #--------------------------------------------------------------------------- +-- +2.33.1 + diff --git a/suitesparse.spec b/suitesparse.spec index ad58f2e..0269220 100644 --- a/suitesparse.spec +++ b/suitesparse.spec @@ -54,6 +54,8 @@ Obsoletes: umfpack <= 5.0.1 Obsoletes: ufsparse <= 2.1.1 Provides: ufsparse = %{version}-%{release} +Patch0001: 0001-build-don-t-set-RPATH-on-Linux.patch + %description suitesparse is a collection of libraries for computations involving sparse matrices. The package includes the following libraries: @@ -164,6 +166,9 @@ This package contains documentation files for %{name}. %prep %setup -c -q + +%patch1 -p1 + pushd SuiteSparse # Remove bundled metis rm -r metis* @@ -401,7 +406,7 @@ do fi for d in $TESTDIRS ; do - %make_build -C $d/Demo CFLAGS="$CFLAGS" LIB="%{?__global_ldflags} -lm -lrt" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX" SPQR_CONFIG=-DHAVE_TBB TBB=-ltbb + LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir}/ %make_build -C $d/Demo CFLAGS="$CFLAGS" LIB="%{?__global_ldflags} -lm -lrt" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX" SPQR_CONFIG=-DHAVE_TBB TBB=-ltbb done popd done @@ -492,6 +497,7 @@ done %changelog * Mon Feb 21 2022 Michal Sekletar - 5.4.0-10 - Disable lazy binding (#2044892) +- Remove RPATH (#2056604) * Tue Aug 10 2021 Mohan Boddu - 5.4.0-9 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags