For some time, I've been using the minidlna program to serve media to TVs, etc, in my house. Unfortunately, recent updates to the ffmpeg suite broke the program: Certainly library calls no longer work. I'm therefore trying to build a static binary against the last version of ffmpeg that worked.
I understand that these aren't fedora-supported programs, but I think the question is really more general, namely: how exactly one goes about building a static binary.
What I've done is:
./configure --enable-static make
But I get linking errors:
/usr/bin/ld: cannot find -ljpeg /usr/bin/ld: cannot find -lid3tag /usr/bin/ld: cannot find -lsqlite3 /usr/bin/ld: cannot find -lavformat /usr/bin/ld: cannot find -lavutil /usr/bin/ld: cannot find -lexif /usr/bin/ld: cannot find -lFLAC /usr/bin/ld: cannot find -logg /usr/bin/ld: cannot find -lvorbis /usr/bin/ld: cannot find -lpthread /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lc /usr/bin/ld: cannot find -lgcc_s collect2: error: ld returned 1 exit status
The libraries are all there, though, where one would expect to find them. And non-static compilation works fine (with the right version of ffmpeg).
Is there something I need to pass to configure to make this work?
Alternatively, is it possible to install older ffmpeg libraries, etc, alongside the newer ones and tell minidlna to use those? If so, how?
Thanks, Richard
PS I'll eventually raise other aspects of this sort of question at SourceForge, but.....
On 07/23/2015 10:38 AM, Richard Heck wrote:
The libraries are all there, though, where one would expect to find them. And non-static compilation works fine (with the right version of ffmpeg).
Static linking requires ".a" files, which probably aren't there. Some libraries, such as glibc have a static package available (glibc-static). Others, like vorbis, don't appear to. For any library package that doesn't provide a static library, you'd have to build those manually as well.
Alternatively, is it possible to install older ffmpeg libraries, etc, alongside the newer ones and tell minidlna to use those? If so, how?
Probably. Often all that's required is to get the old package and "rpm -i <package>". As long as there aren't file conflicts, it should install. If ffmpeg's library changed in an incompatible way, they should have also changed the so number, so that the old one can install in parallel.
Did you have to create symlinks to libraries to get minidlna to run?