[Ffmpeg-devel] Mac OS X local relocation entries in non-writable section...
Ryan Martell
rdm4
Mon Oct 16 23:15:31 CEST 2006
I am trying to link against the ffmpeg libraries from XCode 2.4, and
I get the "local relocation entries in non-writable section" error.
This is on a MacBook Pro (Intel Dual Core)
/usr/bin/gcc-4.0 -bundle -arch i386 /usr/local/lib/libavcodec.a -Wl,-
all_load -Wl,-twolevel_namespace -Wl,-twolevel_namespace_hints -Wl,-
undefined -Wl,dynamic_lookup -Wl,-multiply_defined -Wl,suppress -
isysroot /Developer/SDKs/MacOSX10.4u.sdk -o /Users/rmartell/dev/
SDLOpenGLTest/build/SDLOpenGLTest.build/Debug/SDLOpenGLTest.build/
Objects-normal/i386/libavcodec.ab
/usr/bin/ld: /usr/local/lib/libavcodec.a(bitstream.o) has local
relocation entries in non-writable section (__TEXT,__text)
I know this has been posted before, and I have tried the various
options:
1) The code is compiled with -mdynamic-no-pic, which supposedly
caused issues in the past, but not on gcc 3.3 (i think) or later...
3) configure ffmpeg without the flag --enable-shared. (This is done).
I am building the libraries statically.
If I take out the -mdynamic-no-pic (whack it out of config.mak), then
I get lots of i386 dsp util errors:
386/dsputil_mmx.c:634: error: can't find a register in class
'GENERAL_REGS' while reloading 'asm'
i386/dsputil_mmx.c:634: error: can't find a register in class
'GENERAL_REGS' while reloading 'asm'
{standard input}:14278:non-relocatable subtraction expression,
"_ff_vp3_idct_add_mmx" minus "L00000000039$pb"
{standard input}:14278:symbol: "_ff_vp3_idct_add_mmx" can't be
undefined in a subtraction expression
{standard input}:14275:non-relocatable subtraction expression,
"_ff_vp3_idct_put_mmx" minus "L00000000039$pb"
{standard input}:14275:symbol: "_ff_vp3_idct_put_mmx" can't be
undefined in a subtraction expression
[...]
Elsewhere, someone suggested
1) Link with the flag '-read_only_relocs suppress',
Which sounds a bit scary to me.
I know that the -mdynamic-no-pic was a 5% speed boost (according to
Michael), so I'd like to leave it in, but I'm stymied.
So, gcc gurus, what's my magic compiler option to fix this?
Thanks!
-Ryan Martell
More information about the ffmpeg-devel
mailing list