[MPlayer-dev-eng] Linking mplayer fails
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Mon Apr 1 20:26:21 CEST 2013
On 1 Apr 2013, at 13:57, Xidorn Quan <quanxunzhen at gmail.com> wrote:
> However, I suggest to unconditionally add the PIC flag which is that
> configure of ffmpeg actually does. It is obvious that compilation will
> fail without this flag in many situations.
Where do you see this in FFmpeg's configure?
I just checked again and I am absolutely certain that FFmpeg uses the same logic as we do, the only difference is for features the other does not have:
1) FFmpeg enables PIC for shared libraries, but MPlayer can't be built as shared library, so this does not apply.
2) FFmpeg does not support PIE, so it has no handling for that.
Please report the exact error you got.
Also, does PIE actually work/have the desired effect on OSX?
Do you know if this is with or without -mdynamic-no-pic?
I presume this is building a 64 bit MPlayer binary, or also when building 32 bit?
I guess a fixed check of x86-64 and pie -> set config_pic would be ok, though strictly speaking it is not correct, it is possible (though rather pointless) to build a x86-64 toolchain that supports relocation without requiring PIC.
A better way would be to actually test if linking non-PIC code actually works.
Also, do you know if it is only the missing CONFIG_PIC that causes the linking failure or if we actually need to explicitly add -fPIC if we use PIE?
More information about the MPlayer-dev-eng
mailing list