[x264-devel] [PATCH] Fix shared libs on MacOSX

Guillaume POIRIER poirierg at gmail.com
Sat Mar 29 17:07:15 CET 2008


Hello,

2008/3/29 İsmail Dönmez <ismail at namtrac.org>:
> Hi again,
>
>
>  On Sat, Mar 29, 2008 at 1:13 AM, Guillaume POIRIER <poirierg at gmail.com> wrote:
>
>  >  On my Tiger Macintel machine, this allows to build PIC, shared, and
>  >  PIC+shared kinds in 64 bits mode.
>  >  It however doesn't work in 32 bits mode.
>  >
>  >  Can your confirm 32 bits mode also doesn't compile on your machine İsmail?
>  >
>  >  Apart from that, the patch looks very clean to me. I'm tempted to
>  >  apply it unless Loren objects...
>
>  I checked ffmpeg and they use -Wl,-read_only_relocs,supress , attached
>  patch adds this and fixes 32bit shared build too. Please apply this
>  one.

Maybe it fixes Leopard support, but Tiger support is still broken:

gcc -dynamiclib -Wl,-read_only_relocs,suppress -o libx264.58.dylib
common/mc.o common/predict.o common/pixel.o common/macroblock.o
common/frame.o common/dct.o common/cpu.o common/cabac.o
common/common.o common/mdate.o common/set.o common/quant.o
encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o
encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o
encoder/eval.o common/x86/mc-c.o common/x86/predict-c.o
common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o
common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o
common/x86/predict-a.o common/x86/quant-a.o common/x86/sad-a.o
common/x86/cpu-32.o common/x86/dct-32.o common/x86/pixel-32.o
-Wl,-install_name,libx264.58.dylib -lm -lmx -lpthread -s
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: -static not
specified, -s invalid
ld: common symbols not allowed with MH_DYLIB output format with the
-multi_module option
common/dct.o definition of common _x264_dct4_weight2_zigzag (size 128)
common/dct.o definition of common _x264_dct8_weight2_zigzag (size 512)
encoder/analyse.o definition of common _x264_cost_mv_fpel (size 832)
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link edit
command failed
make: *** [libx264.58.dylib] Error 1

I googled a bit and it seems like this is a GCC bug, but I'm not sure.

İsmail, do you have a idea of how to fix this problem?

Guillaume
-- 
A soldier will fight long and hard for a bit of colored ribbon.
 -- Napoleon Bonaparte


More information about the x264-devel mailing list