Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mpv ffmpeg/libav shared library issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Proinsias
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2014
Posts: 109
Location: Scotland

PostPosted: Wed Feb 20, 2019 1:23 am    Post subject: mpv ffmpeg/libav shared library issue Reply with quote

I've seen this a few times over the last year or so, maybe longer, when playing video with mpv:

Code:
mpv was compiled against a different version of FFmpeg/Libav than the shared
library it is linked against. This could result in misbehavior and crashes.

Upstream does not support this configuration.
Please rebuild mpv in case of any problems.


Running revdep-rebuild reports the system is consistent and emerge @preserved-rebuild says there is nothing to do.....but emerge mpv fixes the issue.

I am doing something wrong?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5584

PostPosted: Wed Feb 20, 2019 1:30 am    Post subject: Reply with quote

It's safe to ignore if everything appears to work fine. It's just there in case there is a problem, to stop users filing invalid bug reports.
Back to top
View user's profile Send private message
Proinsias
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2014
Posts: 109
Location: Scotland

PostPosted: Wed Feb 20, 2019 1:40 am    Post subject: Reply with quote

Questioned it as watching youtube with mpv tonight kept either stopping the audio or pausing the video whilst the audio kept going. Emerging mpv again fixed the issue and the upstream warning.

Seemed odd portage thought everything was consistent but emerging mpv again solved the issue, figured I was missing some system maintenece step.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13485

PostPosted: Wed Feb 20, 2019 2:39 am    Post subject: Reply with quote

There are different levels of inconsistency.

When the library's name changes, that is an extreme inconsistency and is diagnosed by the loader refusing to load the program (mpv) because the actual name of the library differs from the name mpv declared it expected. Portage has been good at catching that for a long time. That is the type of problem that @preserved-rebuild can easily handle.

If the library's name stays the same, but its exports change (such as by renaming public functions), that inconsistency is also diagnosed by the loader ("cannot resolve symbol"). I don't think Portage handles that, but it's at least plausible that it could be handled if someone wanted to write the tooling to find these inconsistencies. The loader can do it on demand, so you just need a tool that can check whether the loader would work, then provide a structured report to the user when the answer is that the loader will reject the combination.

If the library's exports stay the same, but their meaning changes (such as by adding more parameters to a function definition, or changing the size or layout of a structure used both in the library and in the caller), that is hard to detect by tooling and very likely to cause problems. It is possible to build a fully functional library that doesn't include sufficient control information for an automated analyzer to recognize that this failure mode has happened. Worse, I am not aware of any standardized way of representing this control information, so even if upstream wanted to declare it, there are no tools to use the information. Fortunately, it is entirely upstream's choice whether to make this type of change. If they are responsible, any breaking changes of this type will also rename the affected exports so that incompatible programs fail to load rather than loading incorrectly. The message you saw is a crude attempt at defending against this failure mode by warning any time a problem could possibly occur (mpv built with different headers than the library), regardless of whether it actually has occurred (those headers changed in a way that leads to this problem). There are other ways the headers could change that are completely safe, such as if they added new functionality (which mpv will not be able to use, since it saw the old headers) while leaving all existing functionality unchanged.
Back to top
View user's profile Send private message
Proinsias
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2014
Posts: 109
Location: Scotland

PostPosted: Wed Feb 20, 2019 12:16 pm    Post subject: Reply with quote

Thanks Hu.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum