[Ffmpeg-devel] [PATCH] Fix --enable-shared on Darwin
Dan Villiom Podlaski Christiansen
danchr
Wed Jun 22 01:46:49 CEST 2005
Hi,
The attached patch fixes --enable-shared so that it builds proper Mach-O
dynamic libraries on Darwin & Mac OS X. The vhooks directory was changed
to build Mach-O bundles; it seems their semantics are closer to what is
expected.
Also included is support for passing a DESTDIR to 'make install', which
might be useful for open source package managers, such as OpenDarwin and
Fink, and removal of -bind_at_load to not defer linker errors until runtime.
I haven't tested it beyond ensuring that 'ffmpeg' and 'ffmpeg -formats'
do not cause runtime linker errors - which they do if the binary isn't
stripped just the right way :)
There are a few caveats to dynamic libraries on Darwin:
Darwin hard codes all library paths into dependent binaries. As a
result, libavcodec, libavformat, etc. must reside in the configured
prefix, and are not relocatable. This means that a dynamic ffmpeg cannot
be run prior to installation without additional hackery.
I had to edit libavcodec/msmpeg4.c to initialize the three exported
variables. Otherwise they will cause a linker error: "ld: common symbols
not allowed with MH_DYLIB output format with the -multi_module option"
Other than that, the changes should be fairly straightforward.
- Dan Christiansen
P.S. Please Cc any replies directly to me, as I am not subscribed to
this list. Thank you.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg-dynamic-darwin.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050622/b0e764e7/attachment.asc>
More information about the ffmpeg-devel
mailing list