I ran into an issue with ffmpeg/libav and I'm not sure if this is a bug or
not.Compiling minidlnad, a dlna server daemon that requires ffmpeg, failed
consistently on configure testing usability of libavformat. I tried multiple
versions of ffmpeg from 2.8.7, 2.8.15, 3.4.2, 4.0.2, including custom compiled
and slackware precompiled packages with identical result.
./minidlna-1.2.1/configure:...checking for av_open_input_file in -lavformat...
nochecking for avformat_open_input in -lavformat... nochecking for
av_open_input_file in -lavformat... nochecking for avformat_open_input in
-lavformat... noconfigure: error: Could not find libavformat - part of ffmpeg$
I checked the relevent configure test code that was failing:
cat confdefs.h - <<_ACEOF >conftest.$ac_ext/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error. Use char because
int might match the return type of a GCC builtin and then its argument
prototype would still apply. */#ifdef __cplusplusextern "C"#endifchar
avformat_open_input ();intmain (){return avformat_open_input (); ; return
0;}_ACEOF
I tried compiling that code snippet to find out the actual gcc error as
configure isn't helpful:
$gcc -lavformat test.c/usr/lib/libavcodec.so.57: undefined reference to
`lzma_stream_decoder@XZ_5.0'/usr/lib/libavcodec.so.57: undefined reference to
`lzma_end@XZ_5.0'/usr/lib/libavcodec.so.57: undefined reference to
`lzma_code@XZ_5.0'collect2: error: ld returned 1 exit status
This works:$gcc -lavformat -llzma test.c
So I tried env LIBS="-llzma" ./minidlna-1.2.1/configureand that worked!
Seems to me if avformat needs lzma it needs to include it itself!! Failing to
include it broke minidlna from compiling! I'm not sure if this is a bug or if
my install is borked and that's causing the library issue. I'm not fluent in
how ldconfig and the like works.I tried rebuilding the ldconfig cache and that
didn't fix the problem.
Thanks!
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user