Discussion:
ffmpeg vs ffmpeg2
Thomas Klausner
2014-08-09 10:47:47 UTC
Permalink
Hi!

I've recently tried running a program (wip/mpv) using ffmpeg2 while
ffmpeg1 was still installed. It didn't start, complaining about a
missing symbol in a library.

The problem was that while it was originally linked against ffmpeg2
libraries in lib/ffmpeg2, during runtime it used (some) libraries from
ffmpeg which are directly in lib.

So I fear we'll have to move the ffmpeg libraries to a subdirectory
(like is already done for the ffmpeg010 and ffmpeg2 packages).

Or is there another solution?
Thomas
OBATA Akio
2014-08-09 14:13:06 UTC
Permalink
Post by Thomas Klausner
Hi!
I've recently tried running a program (wip/mpv) using ffmpeg2 while
ffmpeg1 was still installed. It didn't start, complaining about a
missing symbol in a library.
The problem was that while it was originally linked against ffmpeg2
libraries in lib/ffmpeg2, during runtime it used (some) libraries from
ffmpeg which are directly in lib.
So I fear we'll have to move the ffmpeg libraries to a subdirectory
(like is already done for the ffmpeg010 and ffmpeg2 packages).
Let's it move to ffmpeg1 and drop release date from PKGVERSION :)
Post by Thomas Klausner
Or is there another solution?
This kind of issue also happened with X11 related libraries,
builtin native v.s. pkgsrc modular libraries.

There are three solutions:

1. move .include "../../multimedia/ffmpeg2/buildlink3.mk" to top,

BUILDLINK_LDFLAGS is defined in bsd.buildlink3.mk, by adding
BUILDLINK_LDFLAGS.pkg as buildlinked order.
so if ffmpeg2 is appeared before any packages with same prefix
with ffmpeg1, BUILDLINK_LDFLAGS.ffmpeg2 (contains rpath
flags) will be put before ffmpeg1's location.

This is simple, but tricky, and not works if LDFLAGS is set by
the package itself with unwanted order.

2. reorder LDFLAGS from buildlink in bsd.buildlink3.mk

see pkg/44304, it will change RPATH to ${LOCALBASE}/lib over ${X11BASE}/lib
from BUILDLINK_LDFLAGS.

This is better than 1, but same issue.

3. reorder RPATH with wrapper

This is better than 2, but how to define the reorder rule?
--
OBATA Akio / ***@lins.jp
Thomas Klausner
2014-08-11 23:13:40 UTC
Permalink
Post by OBATA Akio
Let's it move to ffmpeg1 and drop release date from PKGVERSION :)
Ok, in the end I liked this solution best. I've renamed ffmpeg and
ffplay to ffmpeg1 and ffplay1 respectively. I've compile-tested the
programs, but some didn't compile before, and I didn't check closely
if something might have just lost ffmpeg support. Let me know if you
find breakage.
Thomas
Ottavio Caruso
2014-08-12 12:40:11 UTC
Permalink
Post by Thomas Klausner
Post by OBATA Akio
Let's it move to ffmpeg1 and drop release date from PKGVERSION :)
Ok, in the end I liked this solution best. I've renamed ffmpeg and
ffplay to ffmpeg1 and ffplay1 respectively. I've compile-tested the
programs, but some didn't compile before, and I didn't check closely
if something might have just lost ffmpeg support. Let me know if you
find breakage.
Thomas
Incidentally (and sorry if this seems a thread hijacking)
gst-plugins1-libav compiled against ffmpeg2 seg faults:
http://mail-index.netbsd.org/pkgsrc-users/2014/08/11/msg020209.html

Is this one of these case where gst plugins should/could be rebuilt
against a different version?

Continue reading on narkive:
Loading...