Issue
I'm trying to build libxvidcore
from source using the tarball and working off of the href="http://download1.rpmfusion.org/free/fedora/releases/22/Everything/source/SRPMS/repoview/xvidcore.html" rel="nofollow">RPM specfile provided in RPMFusion. I have my reasons for repackaging this.
%global _hardened_build 1
# can't seem to find debug info for now
%global debug_package %{nil}
%define package_name libxvidcore
%define package_version 1.3.4
%define package_release 1
Name: %{package_name}
Summary: A video decoder and encoder library aimed at providing the best compression efficiency and picture quality possible.
Version: %{package_version}
Release: %{package_release}%{?dist}
License: GPL
Source: http://downloads.xvid.org/downloads/xvidcore-%{package_version}.tar.bz2
%ifarch %{ix86} x86_64
BuildRequires: nasm
%endif
%description
A video decoder and encoder library aimed at providing the best compression efficiency and picture quality possible.
%prep
%setup -n xvidcore
%build
cd build/generic
%configure
make %{?_smp_mflags}
%install
make -C build/generic install DESTDIR=$RPM_BUILD_ROOT
%files
%{_libdir}/libxvidcore.so.4
%{_libdir}/libxvidcore.so.4.3
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%package devel
Summary: libxvidcore-devel
Requires: libxvidcore = %{package_version}
%description devel
libxvidcore-devel
%files devel
%{_includedir}/xvid.h
%{_libdir}/libxvidcore.so
%exclude %{_libdir}/libxvidcore.a
A really strange things happens with the shared libraries. The files provided by libxvidcore
are:
/usr/lib64/libxvidcore.so.4 -> /usr/lib64/libxvidcore.so.4.3
/usr/lib64/libxvidcore.so.4.3
The libxvidcore-devel
package depends on libxvidcore
. However, I can't install libxvidcore-devel
due to the following error:
$ sudo rpm -ivh RPMS/x86_64/libxvidcore-1.3.4-1.fc23.x86_64.rpm \
RPMS/x86_64/libxvidcore-devel-1.3.4-1.fc23.x86_64.rpm
error: Failed dependencies:
libxvidcore.so.4()(64bit) is needed by libxvidcore-devel-1.3.4-1.fc23.x86_64
This shared library (libxvidcore.so.4
) as pointed out above, is a symlink to libxvidcore.so.4.3
, which is the real ELF shared library. Since I'm not defining how this build runs, I'm not sure how to work around this.
Here's the layout of the packages:
$ rpm -qp --provides --fileprovide RPMS/x86_64/libxvidcore-1.3.4-1.fc23.x86_64.rpm
libxvidcore = 1.3.4-1.fc23
libxvidcore(x86-64) = 1.3.4-1.fc23
/usr/lib64/libxvidcore.so.4
/usr/lib64/libxvidcore.so.4.3
$ rpm -qp --provides --fileprovide RPMS/x86_64/libxvidcore-devel-1.3.4-1.fc23.x86_64.rpm
libxvidcore-devel = 1.3.4-1.fc23
libxvidcore-devel(x86-64) = 1.3.4-1.fc23
/usr/include/xvid.h
/usr/lib64/libxvidcore.so
For sanity's sake, here's the info on the shared library as reported by file
:
$ file /usr/lib64/libxvidcore.so.4{,.3}
/usr/lib64/libxvidcore.so.4: symbolic link to libxvidcore.so.4.3
/usr/lib64/libxvidcore.so.4.3: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=86c2c379f2ca0dc2f3d3f1306c55de29b1d76738, not stripped
Here's some more info on the libxvidcore package:
$ rpm -qi --qf 'Arch : %{arch}\n' --provides libxvidcore
Name : libxvidcore
Version : 1.3.4
Release : 1.fc23
Architecture: x86_64
Install Date: Mon 25 Jan 2016 01:28:08 AM UTC
Group : Unspecified
Size : 2697952
License : GPL
Signature : (none)
Source RPM : libxvidcore-1.3.4-1.fc23.src.rpm
Build Date : Mon 25 Jan 2016 01:27:50 AM UTC
Build Host : fedora23
Relocations : (not relocatable)
Summary : A video decoder and encoder library aimed at providing the best compression efficiency and picture quality possible.
Description :
A video decoder and encoder library aimed at providing the best compression efficiency and picture quality possible.
Arch : x86_64
libxvidcore = 1.3.4-1.fc23
libxvidcore(x86-64) = 1.3.4-1.fc23
Is there a way for me to deal with the weird symlink properly?
Solution
The problem is that rpm is "smart". It only scans libraries with execute permissions for library provides during the rpmbuild
process.
For some reason the xvidcore build is broken (in this respect) and isn't installing the library with execute permissions.
Fix that (as I did in a quick test with a call to chmod
in the %install
section but you should probably look for a better solution) and you get libxvidcore.so.4()(64bit)
in the --requires
output as expected.
I don't know why the build wouldn't be doing that by itself though; I think it should be.
Answered By - Etan Reisner Answer Checked By - Mary Flores (WPSolving Volunteer)