problem:
/opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavcodec/libavcodec.a(libstagefright.o): in function std::priv::_Rb_tree<long long, std::less<long long>, std::pair<long long const, TimeStamp>, std::priv::_Select1st<std::pair<long long const, TimeStamp> >, std::priv::_MapTraitsT<std::pair<long long const, TimeStamp> >, std::allocator<std::pair<long long const, TimeStamp> > >::_M_insert(std::priv::_Rb_tree_node_base*, std::pair<long long const, TimeStamp> const&, std::priv::_Rb_tree_node_base*, std::priv::_Rb_tree_node_base*) [clone .constprop.27]:/opt/android-ndk-r8d/sources/cxx-stl/stlport/stlport/stl/_alloc.h:158: error: undefined reference to 'std::__node_alloc::_M_allocate(unsigned int&)' /opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavcodec/libavcodec.a(libstagefright.o): in function std::priv::_Rb_tree<long long, std::less<long long>, std::pair<long long const, TimeStamp>, std::priv::_Select1st<std::pair<long long const, TimeStamp> >, std::priv::_MapTraitsT<std::pair<long long const, TimeStamp> >, std::allocator<std::pair<long long const, TimeStamp> > >::_M_insert(std::priv::_Rb_tree_node_base*, std::pair<long long const, TimeStamp> const&, std::priv::_Rb_tree_node_base*, std::priv::_Rb_tree_node_base*) [clone .constprop.27]:/opt/android-ndk-r8d/sources/cxx-stl/stlport/stlport/stl/_alloc.h:158: error: undefined reference to 'std::__node_alloc::_M_allocate(unsigned int&)' /opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavcodec/libavcodec.a(libstagefright.o): in function std::priv::_Rb_tree<long long, std::less<long long>, std::pair<long long const, TimeStamp>, std::priv::_Select1st<std::pair<long long const, TimeStamp> >, std::priv::_MapTraitsT<std::pair<long long const, TimeStamp> >, std::allocator<std::pair<long long const, TimeStamp> > >::_M_insert(std::priv::_Rb_tree_node_base*, std::pair<long long const, TimeStamp> const&, std::priv::_Rb_tree_node_base*, std::priv::_Rb_tree_node_base*) [clone .constprop.27]:/opt/android-ndk-r8d/sources/cxx-stl/stlport/stlport/stl/_alloc.h:158: error: undefined reference to 'std::__node_alloc::_M_allocate(unsigned int&)' /opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavcodec/libavcodec.a(libstagefright.o): in function decode_thread(void*):/opt/android-ndk-r8d/sources/cxx-stl/stlport/stlport/stl/_alloc.h:161: error: undefined reference to 'std::__node_alloc::_M_deallocate(void*, unsigned int)' /opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavcodec/libavcodec.a(libstagefright.o): in function std::priv::_Rb_tree<long long, std::less<long long>, std::pair<long long const, TimeStamp>, std::priv::_Select1st<std::pair<long long const, TimeStamp> >, std::priv::_MapTraitsT<std::pair<long long const, TimeStamp> >, std::allocator<std::pair<long long const, TimeStamp> > >::_M_erase(std::priv::_Rb_tree_node_base*):/opt/android-ndk-r8d/sources/cxx-stl/stlport/stlport/stl/_alloc.h:161: error: undefined reference to 'std::__node_alloc::_M_deallocate(void*, unsigned int)' /opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavcodec/libavcodec.a(libstagefright.o): in function std::priv::_Rb_tree<long long, std::less<long long>, std::pair<long long const, TimeStamp>, std::priv::_Select1st<std::pair<long long const, TimeStamp> >, std::priv::_MapTraitsT<std::pair<long long const, TimeStamp> >, std::allocator<std::pair<long long const, TimeStamp> > >::_M_erase(std::priv::_Rb_tree_node_base*):/opt/android-ndk-r8d/sources/cxx-stl/stlport/stlport/stl/_alloc.h:161: error: undefined reference to 'std::__node_alloc::_M_deallocate(void*, unsigned int)' /opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavcodec/libavcodec.a(libstagefright.o): in function std::priv::_Rb_tree<long long, std::less<long long>, std::pair<long long const, TimeStamp>, std::priv::_Select1st<std::pair<long long const, TimeStamp> >, std::priv::_MapTraitsT<std::pair<long long const, TimeStamp> >, std::allocator<std::pair<long long const, TimeStamp> > >::_M_erase(std::priv::_Rb_tree_node_base*):/opt/android-ndk-r8d/sources/cxx-stl/stlport/stlport/stl/_alloc.h:161: error: undefined reference to 'std::__node_alloc::_M_deallocate(void*, unsigned int)'
Solution:
(1) Turns out I had the APP_STL := stlport_static in the wrong file. It goes in Application.mk. Not Android.mk. (2) $TOOLCHAIN/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o $TOOLCHAIN/bin/arm-linux-androideabi-ld -rpath-link=$TOOLCHAIN/usr/lib -L$TOOLCHAIN/usr/lib -L$ANDROID_LIBS -soname libffmpeg-neon.so -shared -z noexecstack -Bsymbolic --whole-archive --no-undefined -o $DEST/libffmpeg-neon.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a -lc -lm -lz -ldl -llog -lstdc++ -lmedia -lutils -lstagefright -lbinder --dynamic-linker=/system/bin/linker /opt/android-ndk-r8d/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_static.a $NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a