tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.85k stars 787 forks source link

`undefined reference to 'std::__ndk1::` when trying ffmpeg executable #709

Closed eusoubrasileiro closed 3 years ago

eusoubrasileiro commented 3 years ago

Following the description from here to create an ffmpeg executable. Iam using ndk/22.1.7171670 and cmake installed from android studio.

Unfortunattly no matter weather I use master branch or 4.4.LTS with -s or -l I allways get the errors bellow (tail -n 50 build.log)

**Logs**
./libavformat/avformat.h:879:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
fftools/ffprobe.c:2954:49: warning: 'codec' is deprecated [-Wdeprecated-declarations]
            ist->dec_ctx->coded_width = stream->codec->coded_width;
                                                ^
./libavformat/avformat.h:879:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
fftools/ffprobe.c:2955:50: warning: 'codec' is deprecated [-Wdeprecated-declarations]
            ist->dec_ctx->coded_height = stream->codec->coded_height;
                                                 ^
./libavformat/avformat.h:879:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
3 warnings generated.
8 warnings generated.
6 warnings generated.
9 warnings generated.
GEN     libavcodec/libavcodec.ver
LD      libswscale/libswscale.so.5
LD      libswresample/libswresample.so.3
LD      libavcodec/libavcodec.so.58
LD      libavformat/libavformat.so.58
LD      libavfilter/libavfilter.so.7
LD      libavdevice/libavdevice.so.58
LD      ffmpeg_g
LD      ffprobe_g
libavformat/libavformat.so: error: undefined reference to 'std::__ndk1::__vector_base_common<true>::__throw_length_error() const'
libavformat/libavformat.so: error: undefined reference to 'operator delete(void*)'
libavformat/libavformat.so: error: undefined reference to 'operator new(unsigned long)'
libavformat/libavformat.so: error: undefined reference to 'std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >::resize(unsigned long, char)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:114: ffprobe_g] Error 1
make: *** Waiting for unfinished jobs....
libavformat/libavformat.so: error: undefined reference to 'std::__ndk1::__vector_base_common<true>::__throw_length_error() const'
libavformat/libavformat.so: error: undefined reference to 'operator delete(void*)'
libavformat/libavformat.so: error: undefined reference to 'operator new(unsigned long)'
libavformat/libavformat.so: error: undefined reference to 'std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >::resize(unsigned long, char)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:114: ffmpeg_g] Error 1

build command is:

./android.sh -s --enable-gpl --enable-android-media-codec --enable-android-zlib --enable-chromaprint --enable-kvazaar --enable-libaom --enable-libiconv --enable-libvorbis --enable-libvpx --enable-opus --enable-shine --enable-wavpack --enable-libwebp --enable-fribidi --enable-freetype --enable-libaom --enable-libass --disable-arm-v7a --disable-arm-v7a-neon --disable-x86 --disable-x86-64 --reconf-shine --reconf-libuuid --reconf-libass

Environment