0

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 ?

Blue4Whale
  • 11
  • 3
  • Portable : Build on "older" ... to be used with "newer". I.e. an Ubuntu 18.04 build with glibc (libc6) version 2.27 cannot be used in Fedora 27 : glibc-2.26 . **Note** : glibc *is* your OS ( together with the kernel), and cannot be changed. – Knud Larsen May 07 '18 at 18:48
  • You can take a look into my PR to bitcoin, https://github.com/bitcoin/bitcoin/pull/13177/files . use ld `--wrap` option to replace the function and use `.symver` asm point to the older function. – Ken Lee May 07 '18 at 22:07
  • Ken: your solution looks smart. Maybe too smart and i don't really understand all the implications and risks. I went for Knud suggestion, setup an Ubuntu 16.04 VM to recompile the whole thing. So far, so good. Thanks. – Blue4Whale May 09 '18 at 00:26

0 Answers0