Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing lib libmfx.so.1 for ffmpeg #3150

Closed
wants to merge 1 commit into from

Conversation

diepfote
Copy link
Contributor

To fix (on Arch):

$ ffmpeg
/usr/bin/ffmpeg: error while loading shared libraries: libmfx.so.1: cannot open shared object file: No such file or directory

@glitsj16
Copy link
Collaborator

glitsj16 commented Jan 16, 2020

Cannot reproduce this on Arch. The ffmpeg 1:4.2.2-1 package has a new dependency on intel-media-sdk, which does have that libmfx.so.1 file. Is your Arch fully updated? Or perhaps you have libmfx from Community repo installed, that seems to have a bug that might have hit you.

@diepfote
Copy link
Contributor Author

diepfote commented Jan 16, 2020

Just to be clear I ran $ sudo firecfg, so "ffmpeg" is a symlink:

$ which ffmpeg
/usr/local/bin/ffmpeg
[ ~ (master u=) 0 ]
$ file /usr/local/bin/ffmpeg
/usr/local/bin/ffmpeg: symbolic link to /usr/bin/firejail

It is fully updated and the file is present:

$ pacman -Qs ffmpeg
local/ffmpeg 1:4.2.2-1
    Complete solution to record, convert and stream audio and video
local/gst-libav 1.16.2-1
    GStreamer open-source multimedia framework FFmpeg plugin

$ pacman -Qs intel-media-sdk
local/intel-media-sdk 19.4.0-1
    API to access hardware-accelerated video decode, encode and filtering on Intel
    platforms with integrated graphics


$ ls -alh /opt/intel/mediasdk/lib/libmfx.so.1
lrwxrwxrwx 1 root root 14 Jan  3 20:08 /opt/intel/mediasdk/lib/libmfx.so.1 -> libmfx.so.1.31

The package "libmfx" is not installed:

$ pacman -Qs libmfx
local/intel-media-sdk 19.4.0-1
    API to access hardware-accelerated video decode, encode and filtering on Intel
    platforms with integrated graphics



I filed this pull request because firejail did not provide the library to "ffmpeg".
As far as I'm concerned firejail does not look into "/opt" to resolve libs. The "intel-media-sdk" package places the file into "/opt":

$ pkgfile -l intel-media-sdk  | grep libmfx.so.1
community/intel-media-sdk       /opt/intel/mediasdk/lib/libmfx.so.1
community/intel-media-sdk       /opt/intel/mediasdk/lib/libmfx.so.1.31

@glitsj16
Copy link
Collaborator

glitsj16 commented Jan 16, 2020

@florianbegusch Thanks for your detailed response. I see now what explains my different observation. I run firejail from git, which saw this recent commit. Can you check if the changes made there fix this for you?

In any case, IMHO it wouldn't be advised to add private-lib with only libmfx.so.1 in it to the ffmpeg profile. We leave private-lib out of the picture because it pulls in a rather unpredictable set of dependencies with files in /usr/lib on different Linux distributions that would break it for a lot of users.

@glitsj16
Copy link
Collaborator

glitsj16 commented Jan 16, 2020

@netblue30 Might this warrant backporting @rusty-snake's changes to the release-0.9.62 branch and cutting a fresh release to unbreak ffmpeg (and avoid users reporting issues cfr. #3147 and #3157 )?

@rusty-snake
Copy link
Collaborator

#3076

@glitsj16 glitsj16 mentioned this pull request Jan 16, 2020
@diepfote
Copy link
Contributor Author

@florianbegusch Thanks for your detailed response. I see now what explains my different observation. I run firejail from git, which saw this recent commit. Can you check if the changes made there fix this for you?

In any case, IMHO it wouldn't be advised to add private-lib with only libmfx.so.1 in it to the ffmpeg profile. We leave private-lib out of the picture because it pulls in a rather unpredictable set of dependencies with files in /usr/lib on different Linux distributions that would break it for a lot of users.

It does fix it. Thank you for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants