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

İsmail Dönmez ismail at namtrac.org
Sat Mar 29 00:55:45 CET 2008


Hi,

On Sat, Mar 29, 2008 at 1:13 AM, Guillaume POIRIER <poirierg at gmail.com> wrote:
> Hello,
>
>
>  On Fri, Mar 28, 2008 at 11:44 PM, İsmail Dönmez <ismail at namtrac.org> wrote:
>  > Hi,
>  >
>  >  2008/3/28 alex gao <madfxgao at gmail.com>:
>  >
>  > >  After using your patch v1 or v2, with --enable-shared option and Xcode
>  >  >  3.1 beta1, I still meet error:
>  >  >
>  >  >
>  >  >  ld warning: option -s is obsolete and being ignored
>  >  >  ld: absolute addressing (perhaps -mdynamic-no-pic) used in
>  >  >  _x264_cabac_encode_decision from common/x86/cabac-a.o not allowed in
>  >  >  slidable image. Use '-read_only_relocs suppress' to enable text relocs
>  >  >  collect2: ld returned 1 exit status
>  >  >  make: *** [libx264.dylib.58] Error 1
>  >  >
>  >  >  So I add option -read_only_relocs suppress to gcc, and it works fine
>  >
>  >  Can you try ./configure --enable-shared --host=x86_64-apple-darwin9 ,
>  >  maybe its 32bit related as I can't reproduce it with my 64bit build.
>
>  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...

Indeed the 32bit build fails, googling suggests to use --enable-pic
but it results in an asm error :

yasm -O2 -f macho -DPREFIX -DHAVE_SSE3 -D__PIC__ -Icommon/x86/ -o
common/x86/cabac-a.o common/x86/cabac-a.asm
common/x86/cabac-a.asm:91: undefined symbol `fakegot' (first use)
common/x86/cabac-a.asm:91:  (Each undefined symbol is reported only once.)
make: *** [common/x86/cabac-a.o] Error 1

Regards,
ismail

-- 
Never learn by your mistakes, if you do you may never dare to try again.


More information about the x264-devel mailing list