From f9c67369d0eceafe24aebde373495c3a714a5051 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 21 Jul 2016 10:52:35 +0900 Subject: [PATCH] Fix to file build error at 64bit [Model] ALL [BinType] AP [Customer] OPEN [Issue#] N/A [Request] N/A [Occurrence Version] N/A [Problem] build error. [Cause & Measure] file version mismatch error at creating for magic file. Add LD_LIBRARY_PATH for linking new version library. Remove RPATH at build option. [Checking Method] Build test [Team] Open Source Management and Setting Part [Developer] dh0128.kwak [Solution company] Samsung [Change Type] N/A Change-Id: Iee8a92c43f75726ff4c12a581a2785a1b984d25e Signed-off-by: DongHun Kwak --- magic/Makefile.am | 2 +- packaging/file.spec | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/magic/Makefile.am b/magic/Makefile.am index 880279d..f7994de 100644 --- a/magic/Makefile.am +++ b/magic/Makefile.am @@ -312,5 +312,5 @@ ${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) exit 1; \ fi; \ fi) - $(FILE_COMPILE) -C -m magic + LD_LIBRARY_PATH=../src/.libs $(FILE_COMPILE) -C -m magic @rm -fr magic diff --git a/packaging/file.spec b/packaging/file.spec index 90bca5b..61ab65d 100644 --- a/packaging/file.spec +++ b/packaging/file.spec @@ -67,6 +67,9 @@ rm -f ltcf-c.sh ltconfig ltmain.sh autoreconf -fiv CFLAGS="$RPM_OPT_FLAGS -DHOWMANY=69632" %configure --disable-silent-rules --datadir=%{_miscdir} --disable-static --with-pic --enable-fsect-man5 +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + %{__make} %{?_smp_mflags} pkgdatadir='$(datadir)' %if 0%{?build_python_bindings:1} pushd python @@ -87,6 +90,7 @@ echo '# global magic file is %{_miscdir}/magic(.mgc)' >> %{buildroot}%{_sy # Check out that the binary does not bail out: LD_LIBRARY_PATH=%{buildroot}%{_libdir} export LD_LIBRARY_PATH +%{buildroot}%{_bindir}/file --version find %{buildroot}%{_bindir}/file %{_bindir}/ /%{_lib}/ %{_libdir}/ | \ xargs %{buildroot}%{_bindir}/file -m %{buildroot}%{_miscdir}/magic unset LD_LIBRARY_PATH -- 2.7.4