BtbN / FFmpeg-Builds

MIT License
7.77k stars 1.07k forks source link

Portable Linux binaries #362

Closed Kartatz closed 7 months ago

Kartatz commented 7 months ago

I know that the minimum libc requirement for Linux binaries is at least glibc 2.28, but it is still very frustrating not being able to run those binaries on an ancient Linux distribution.

I'm trying to run the ffmpeg binary on CentOS Linux 7, which comes with glibc 2.17 preinstalled. However, that fails with the following error:

$ ./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg
./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg: /lib64/libpthread.so.0: version `GLIBC_2.28' not found (required by ./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg)
./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by ./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg)      
./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg: /lib64/libm.so.6: version `GLIBC_2.23' not found (required by ./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg)
./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by ./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg)      
./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg)      
./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by ./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg)      
./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg: /lib64/libc.so.6: version `GLIBC_2.26' not found (required by ./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg)      
./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg)

Is there any chance that you could provide portable ffmpeg binaries in the future?

BtbN commented 7 months ago

The binaries already are as portable as they get. FFmpeg and some other dependencies have recently started requiring C11 features, and full support for C11 was only introduced with glibc 2.28, so that's what the minimum now is. A completely static binary of FFmpeg would be half broken, since a whole lot of stuff in FFmpeg and in various dependencies depends on working dlopen(), which inherently breaks if you produce a fully static binary.

Kartatz commented 7 months ago

Oh, I didn't know that. Guess I will have to look for other alternatives to that prehistoric Linux distribution.

Thanks anyway!