Author Topic: Upgrading x264 with a custom rpm  (Read 724 times)

Offline clarms

  • Full Member
  • ***
  • Posts: 72
Upgrading x264 with a custom rpm
« on: January 15, 2012, 08:37:10 PM »
Trying to upgrade x264 with a recent release, using the pclos specfile as a template, and get rpm dependency errors when running a rpm -Uvh x264-* from the custom built rpms.

libx264.so.115 is needed by (installed) [a list of programs]

Is there a way around this to not break the rpm dependencies?

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8590
  • Aurum nostrum non est aurum vulgi.
Re: Upgrading x264 with a custom rpm
« Reply #1 on: January 15, 2012, 09:31:18 PM »
Heya clarms,

If it is an upgrade, then it is most likely that you have to make corrections the specfile - compiling and installation method used, removing or adding files, cleanup, etc. If a specfile was for a specific package, it doesn't mean it will always work for an upgrade.

I assume you got the build without errors because you were already trying to install the RPM (I assume for testing purposes)? And on installing, one of the Requires: is libx264.so.115 and you stated that it is already installed. Then something is definitely wrong either with the build or your installed library.

Look at the README on the tarball for extra build and installation info.

Code: [Select]
$ locate libx264.so.115
/usr/lib64/libx264.so.115
$ rpm -qf /usr/lib64/libx264.so.115
x264-1.115-1pclos2011
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline clarms

  • Full Member
  • ***
  • Posts: 72
Re: Upgrading x264 with a custom rpm
« Reply #2 on: January 16, 2012, 05:50:16 PM »
What I did was only bump the version in the pclos specfile to version 120. The build works without any errors and creates the three rpms of x264, devel, and static.

I *think* the issue is that ldconfig shows:
libx264.so.115 --> libx264.so.115

even though there is an installed link from libx264.so --> libx264.so.115.

My thinking is that a shared library should have a link of "libsomelib.so", "libsomelib.so.0", or both(?) to the real library,

so that programs link to the link and not the real library, making library upgrades possible without breaking things.

Since ldconfig shows a "hardwired" libx264.so.115, and not to a ".so", any rpm installed program that needs x264 is going to use the hardwired lib. On any attempt to upgrade x264, rpm will then show errors with those programs because they "need" that hardwired version. ( Did that make sense?  :-[)
 
For a test I recompiled the pclos 115 src rpm and reinstalled, and ldconfig still did not show the ".so" link, even though it is installed.

I am no expert on libs, shared libs, and ldconfig, and this is all a best guess!  ;D ;D ;D

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Upgrading x264 with a custom rpm
« Reply #3 on: January 17, 2012, 12:35:59 AM »
When upgrading like this, you should have a look at the Requires list in the spec file and compare versions to what the newer version of the software needs. An upgrade of those dependencies (Requires) may be needed. Those may need others to be upgraded. If you get all upgraded successfully, maybe your system won't be broken. Go carefully. Remember please, we do not support outside installations.