[FFmpeg-devel] ffmpeg and musl toolchain support

Jörg Krause jkrause at posteo.de
Mon Sep 1 16:14:52 CEST 2014


When building against musl instead of glibc, compilation fails at
libavutil/error.c

CC libavutil/error.o
libavutil/error.c: In function 'av_strerror':
libavutil/error.c:68:9: error: implicit declaration of function
'strerror_r' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make: *** [libavutil/error.o] Error 1

I tried to find a fix and I am very unsure about the solution.

I am cross compiling for a linux target. I took a look at 
ffmpeg/configure and added the following line:

# OS specific
case $target_os in
[..]
linux)
         add_cppflags -D_POSIX_SOURCE
         enable dv1394
         ;;
[..]

With this I can compile ffmpeg successfully.

What do you think about this solution?

Why is #undef _GNU_SOURCE in libavutil/error.c defined?


More information about the ffmpeg-devel mailing list