I am trying to build a portable version of ffmpeg to run on major Linux distributions, with the final user only having to extract the distributed targz package to the appropriate directory.
My previous builds on Ubuntu 16.04 worked fine. I upgraded to Ubuntu 18.04 and new builds, when run on Fedora 27 with LD_LIBRARY_PATH=. ./ffmpeg
, show errors:
./ffmpeg: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by ./libavfilter.so.7)
./ffmpeg: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by ./libavformat.so.58)
Which i interpret as the libavxxx
libraries want to dynamically link against system libraries libc
and libm
that would have been compiled with GLIBC_2.27
, but those libs have been compiled with an older GLIBC version.
Note that the fact the errors show from libavxxx.so
is not the point, as if i compile ffmpeg
as a fat binary (libavxxx
linked statically), i get the same error from ffmpeg
.
The only workaround i have found so far is to copy the build system libc.so.6
and libm.so.6
libraries to the directory containing the binaries and make them part of the ffmpeg
package.
Is there a better way to handle this issue ?