[FFmpeg-devel] Symbol versioning failure on Android
Martin Storsjö
martin
Wed Dec 8 21:07:46 CET 2010
On Wed, 8 Dec 2010, Reimar D?ffinger wrote:
> On Wed, Dec 08, 2010 at 01:45:27PM +0200, Martin Storsj? wrote:
> > On Wed, 8 Dec 2010, Aurelien Jacobs wrote:
> >
> > > On Wed, Dec 08, 2010 at 11:37:56AM +0200, Martin Storsj? wrote:
> > > > On Tue, 7 Dec 2010, Martin Storsj? wrote:
> > > > [...]
> > > >
> > > > An even more accurate, but more messy, solution would be to link a full
> > > > binary, then examine the built binary and see if it specifies
> > > > /system/bin/linker as its dynamic linker. (I'm not totally sure of how to
> > > > achieve that cleanly, though.)
> > >
> > > You can add a function like:
> > >
> > > check_string(){
> > > log check_string "$@"
> > > str="$1"
> > > shift
> > > check_ld "$@" && strings $TMPE | grep -q "$str"
> > > }
> > >
> > > And then you can use it this way:
> > >
> > > check_string /system/bin/linker <<EOF && echo disable symver
> > > int main(void){ return 0; }
> > > EOF
> >
> > Thanks for the suggestion, the attached patch does things this way.
> >
> > So, now there's three options. Which one is preferred?
>
> Hm, I only saw two.
The first mail from me today had two options, one checking --target-os (if
you set it to linux-android, we disable symbol versioning), another
checking cross-prefix.
> But I do think that if in any way possible configure should
> check for the actual feature, not use some hacks based on the path/name
> of the linker or the target system that have no direct relation at all,
> this almost always means just delaying the proper solution.
It's not possible to check for the actual feature when cross compiling -
the feature is fully available in the toolchain (which is quite close to a
normal linux toolchain), it's just the runtime dynamic linker that doesn't
handle these cases properly.
The third option actually is the closest one to checking for this feature,
where we check for the linker name /system/bin/linker, which is the
runtime linker that doesn't support versioning.
FWIW, Vladimir Pantelic said on irc that he prefers the --target-os
option.
// Martin
More information about the ffmpeg-devel
mailing list