LD_LIBRARY_PATH
environment variable in the enable
scriptlet as follows:
export LD_LIBRARY_PATH=%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Note
DT_RUNPATH
attribute instead of the LD_LIBRARY_PATH
environment variable to make the private shared library accessible in the Software Collection environment.
/etc/ld.so.conf.d/
for this purpose.
Warning
/etc/ld.so.conf.d/
for libraries already available on the system. Using /etc/ld.so.conf.d/
is only recommended for a library that is not available on the system, as otherwise the version of the library in the Software Collection might get preference over the system version of the library. That could lead to undesired behavior of the system versions of the applications, including unexpected termination and data loss.
Procedure 3.1. Using /etc/ld.so.conf.d/ for libraries in the Software Collection
%{?scl_prefix}libs.conf
and adjust the spec file configuration accordingly:
SOURCE2: %{?scl_prefix}libs.conf
%{?scl_prefix}libs.conf
file, include a list of directories where the versions of the libraries associated with the Software Collection are located. For example:
/opt/provider/software_collection_1/root/usr/lib64/
/usr/lib64/
directory that is part of the Software Collection software_collection_1 is included in the list.
%install
section of the spec file, so the %{?scl_prefix}libs.conf
file is installed as follows:
%install install -p -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/ld.so.conf.d/