I used to be a fan of Opera browser. Now we have yacc (yet another chromium clone), but there's nothing I can do about it but grit my teeth and try to enjoy my web surfing.
One thing in the new Opera that kinda stands in my way is HTML5 audio and video support. Opera claims to support H.264 video and MP3 audio, but it actually doesn't. Well, this particular case is a known bug. But to actually to be able to support those it needs ffmpeg libraries. Opera Beta 25.0.1614.11 requires ffmpeg from 2.3 branch. And that's where the problem starts.
I have ffmpeg-2.1 installed on my system. ffmpeg is known to break its ABI with every major release, which means a headache with installed applications that depend on ffmpeg, so I decided to compile a local version of ffmpeg-2.3.3 (which I hoped to incorporate later in my SlackBuild that repackages the new Opera for Slackware). It compiles just fine. But when I start the browser with
Code:
LD_LIBRARY_PATH="/usr/lib64/opera-beta/ffmpeg:${LD_LIBRARY_PATH}" opera-beta
and navigate to a page with an H.264 video or MP3 audio, its page crashes. The terminal produces the following message:
Code:
/usr/lib64/opera-beta/opera-beta --type=renderer --alt-high-dpi-setting=96 --disable-direct-npapi-requests --enable-deferred-image-decoding --lang=ru --enable-proprietary-media-types-playback --disable-client-side-phishing-detection --with-feature:enhanced-autofill --enable-delegated-renderer --enable-impl-side-painting --disable-accelerated-video-decode --channel=1872.8.239267877: relocation error: /home/fsleg/tgz/ffmpeg-2.3.3/pkg/usr/lib64/opera-beta/ffmpeg/libavformat.so.55: symbol av_add_stable, version LIBAVUTIL_52 not defined in file libavutil.so.52 with link time reference
As you can see, LD_LIBRARY_PATH tells Opera where to look for libraries in case it needs ones, and it honestly tries to use those I provided. But it doesn't tell ffmpeg libraries where to look for their dependencies. For example, in this message we see that libavformat depends on libavutil. libavutil from ffmpeg-2.3.3 is located in the same directory libavformat resides, and this is the directory LD_LIBRARY_PATH points to. But for some reason libavformat links itself to libavutil from installed system-wide ffmpeg-2.1:
Code:
[fsleg@fsleg-slacktop:ffmpeg]$ LD_LIBRARY_PATH=/home/fsleg/tgz/ffmpeg-2.3.3/pkg/usr/lib64/opera-beta/ffmpeg ldd libavformat.so
...
libavcodec.so.55 => /usr/lib64/libavcodec.so.55 (0x00007f5f3c15e000)
libavutil.so.52 => /usr/lib64/libavutil.so.52 (0x00007f5f3bf0d000)
...
If I uninstall ffmpeg-2.1, libav* libraries link themselves correctly and I can watch cat videos on YouTube using HTML5 player. If ffmpeg-2.1 is present system-wide, there is a version mismatch when libraries from ffmpeg-2.3.3 try to link themselves.
This is definitely not an Opera's fault. And I don't think it has anything to do with ffmpeg. Most likely there's something I don't quite understand about dynamic library linking if there are tree-like dependencies. So my question is: how can I use local ffmpeg libraries while having the ones from the other version installed system-wide?