rpmbuild SPEC file - shared library path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I build my app with shared libraries. In my spec file, I source a
script which export LD_LIBRARY_PATH.
Below is how I proceed in my spec file:

************************************
%global _prod_dir /opt/intel/compilers_and_libraries_2016/linux
%global _mklroot_dir %{_prod_dir}/mkl
%global _mkllibpath %{_mklroot_dir}/lib/intel64_lin
%global _openmplibpath %{_prod_dir}/compiler/lib/intel64_lin
...............
%build
source /opt/intel/bin/compilervars.sh intel64
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:%{_mkllibpath}:%{_openmplibpath}:%{_builddir_full}/lib
..............
**************************************

make complains at one point about not finding one shared library:

/home/poisonivy/rpmbuild/BUILD/R-3.2.1/bin/exec/R: error while loading
shared libraries: libiomp5.so: cannot open shared object file: No such
file or directory

This library is indeed in %{_openmplibpath}. I conclude that
LD_LIBRARY_PATH has not been correctly populated in my build
environment.
Further evidence is to source /opt/intel/bin/compilervars.sh intel64
and export LD_LIBRARY_PATH in my shell environment before I start
rpmbuild. This way, there is no make error about the shared library.

I don't understand why variable LD_LIBRARY_PATH is not took into
account in my rpmbuild environment. Does the issue come from the
${LD_LIBRARY_PATH} env variable declaration? Maybe something like
%{....} ?

Thank you for hints.

-- 

google.com/+arnaudgabourygabx
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux