It might be easier to approach the problem from your main application. I assume you have a closed-source binary that you ship to the user, and want to use known libav* libs. You should compile libav with a path like "PREFIX=/opt/YourSoftware" which causes the libs to get installed at /opt/YourSoftware/lib/. When you compile your main program, you need to tell it to look for libav in that path, (and make sure it finds it in that path) and then double-check that the linker option "rpath" gets set to that path (this embeds the path into the binary), and then doublecheck that "ldd /opt/YourSoftware/bin/YourBinary" is linking against the libav you created. When you distribute your program (installed at those same paths) everything should work.

I'm not claiming its easy, or pretty, but thats more or less the intended mechanism for custom library versions.

On a sidenote, Windows will look in the .exe's path *first* for any .dll it needs, so you don't need to rename anything under Windows.

On both OSes, you can play around with manually loading symbols, so instead of letting the OS link you up as your program starts, you link with a bunch of NULL pointers and then your code sets those pointers at runtime. This gives you full flexibility to find the lib file of your choice, open it, and find addresses of functions by name. But this is equally a hassle. Though actually it results in faster program startup if you don't need those functions right away.

-Mike

On Thu, 18 Mar 2010 10:31:48 -0400, Chris <[email protected]> wrote:

Hi,

In the legal page at http://ffmpeg.org/legal.html, it says:

"Do not rename FFmpeg dlls to some obfuscated name, but adding a
suffix or prefix is fine (renaming "avcodec.dll" to "MyProgDec.dll" is
not fine, but to "avcodec-MyProg.dll" is)."

I need to compile FFmpeg for Windows and Linux and would like it to be
LGPL. To avoid conflicting with system-installed libraries on Linux,
I'd like to use a different name. On Windows I believe I can just
rename the DLLs but this doesn't work on Linux since the SONAME is
embedded. e.g.:

# objdump -R -x /usr/lib/libavcodec.so.52 | grep SONAME
SONAME               libavcodec.so.52

Is there a recommended way to rename the .so libs on Linux? Do I need
to do a massive search and replace on the source tree? If I don't do
this I'll have conflicts with any copies of avcodec (and the rest)
that are installed using the system's package manager.

Thanks,

--
Chris.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user



--
Michael Conrad
IntelliTree Solutions llc.
513-552-6362
[email protected]
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to