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

alex gao madfxgao at gmail.com
Wed Mar 26 04:46:18 CET 2008


After patched,

with --enable-shared, error message:

gcc -shared -o libx264.dylib.58 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 -dynamiclib -install_name
libx264.dylib.58 -lm -lmx -lpthread -s
ld64: 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
collect2: ld returned 1 exit status
make: *** [libx264.dylib.58] Error 1

with --enable-shared --enable-pic, error message:

encoder/macroblock.c: In function 'x264_macroblock_probe_skip':
encoder/macroblock.c:624: warning: 'mvp[0]' may be used uninitialized
in this function
encoder/macroblock.c:624: warning: 'mvp[1]' may be used uninitialized
in this function
gcc -O4 -ffast-math  -Wall -I. -falign-loops=16 -DHAVE_MMX -DHAVE_SSE3
-DARCH_X86 -DSYS_MACOSX -DHAVE_PTHREAD -fPIC -s -fomit-frame-pointer
-c -o encoder/cabac.o encoder/cabac.c
gcc -O4 -ffast-math  -Wall -I. -falign-loops=16 -DHAVE_MMX -DHAVE_SSE3
-DARCH_X86 -DSYS_MACOSX -DHAVE_PTHREAD -fPIC -s -fomit-frame-pointer
-c -o encoder/cavlc.o encoder/cavlc.c
gcc -O4 -ffast-math  -Wall -I. -falign-loops=16 -DHAVE_MMX -DHAVE_SSE3
-DARCH_X86 -DSYS_MACOSX -DHAVE_PTHREAD -fPIC -s -fomit-frame-pointer
-c -o encoder/encoder.o encoder/encoder.c
gcc -O4 -ffast-math  -Wall -I. -falign-loops=16 -DHAVE_MMX -DHAVE_SSE3
-DARCH_X86 -DSYS_MACOSX -DHAVE_PTHREAD -fPIC -s -fomit-frame-pointer
-c -o encoder/eval.o encoder/eval.c
gcc -O4 -ffast-math  -Wall -I. -falign-loops=16 -DHAVE_MMX -DHAVE_SSE3
-DARCH_X86 -DSYS_MACOSX -DHAVE_PTHREAD -fPIC -s -fomit-frame-pointer
-c -o common/x86/mc-c.o common/x86/mc-c.c
gcc -O4 -ffast-math  -Wall -I. -falign-loops=16 -DHAVE_MMX -DHAVE_SSE3
-DARCH_X86 -DSYS_MACOSX -DHAVE_PTHREAD -fPIC -s -fomit-frame-pointer
-c -o common/x86/predict-c.o common/x86/predict-c.c
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


2008/3/26 İsmail Dönmez <ismail at namtrac.org>:
> Hi,
>
>  x264 build system hardcodes .so as shared file extension but on MacOSX
>  dylib is used. Attached patch updates build system to produce dylib
>  files on MacOSX, tested with ffmpeg. Currently versioning is just set
>  to 0.0.0 so it might need some more fixup later on.
>
>  Regards,
>  ismail
>
>  --
>  Never learn by your mistakes, if you do you may never dare to try again.
>
> _______________________________________________
>  x264-devel mailing list
>  x264-devel at videolan.org
>  http://mailman.videolan.org/listinfo/x264-devel
>
>


More information about the x264-devel mailing list