Open K-os opened 2 days ago
Thanks for posting this issue of my comment. :) By the way, the title is misspelled Adroid, correct first title word is Android.
Why did you explicitly set the ANDROID_STL ? Did the default not work? Otherwise the cmake command line looks Ok to me.
I see you are building mpv-android. We actually do have instructions for building that with VVdeC in our wiki: https://github.com/fraunhoferhhi/vvdec/wiki/How-to-use-VVdeC#build-mpv-android-with-vvc-support
Why did you explicitly set the ANDROID_STL ? Did the default not work? Otherwise the cmake command line looks Ok to me.
Cause, I set ANDROID_STL for C++ shared creates shared library module, so whenever the user can disassembly apk file and replace latest vvdec shared library built of Android on lib folder and repack apk file using apktool. Also default without ANDROID_STL
argument did not work too.
Last twenty-one lines of default without ANDROID_STL, but different log:
>>> referenced by sstream:901 (/home/martineesmaa/mpv-android-vvc/buildscripts/sdk/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/sstream:901)
>>> vvdecimpl.cpp.o:(vvdec::Exception& vvdec::Exception::operator<<<char [14]>(char const (&) [14])) in archive /home/martineesmaa/mpv-android-vvc/buildscripts/prefix/arm64/lib/libvvdec.a
>>> referenced by sstream:901 (/home/martineesmaa/mpv-android-vvc/buildscripts/sdk/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/sstream:901)
>>> vvdecimpl.cpp.o:(vvdec::Exception& vvdec::Exception::operator<<<char [14]>(char const (&) [14])) in archive /home/martineesmaa/mpv-android-vvc/buildscripts/prefix/arm64/lib/libvvdec.a
>>> referenced by sstream:901 (/home/martineesmaa/mpv-android-vvc/buildscripts/sdk/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/sstream:901)
>>> vvdecimpl.cpp.o:(vvdec::Exception& vvdec::Exception::operator<<<char [6]>(char const (&) [6])) in archive /home/martineesmaa/mpv-android-vvc/buildscripts/prefix/arm64/lib/libvvdec.a
>>> referenced 461 more times
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)
ld.lld: error: undefined symbol: VTT for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>
>>> referenced by ostream:216 (/home/martineesmaa/mpv-android-vvc/buildscripts/sdk/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/ostream:216)
>>> vvdecimpl.cpp.o:(vvdec::Exception& vvdec::Exception::operator<<<char [14]>(char const (&) [14])) in archive /home/martineesmaa/mpv-android-vvc/buildscripts/prefix/arm64/lib/libvvdec.a
>>> referenced by ostream:216 (/home/martineesmaa/mpv-android-vvc/buildscripts/sdk/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/ostream:216)
>>> vvdecimpl.cpp.o:(vvdec::Exception& vvdec::Exception::operator<<<char [14]>(char const (&) [14])) in archive /home/martineesmaa/mpv-android-vvc/buildscripts/prefix/arm64/lib/libvvdec.a
>>> referenced by ostream:216 (/home/martineesmaa/mpv-android-vvc/buildscripts/sdk/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/ostream:216)
>>> vvdecimpl.cpp.o:(vvdec::Exception& vvdec::Exception::operator<<<char [6]>(char const (&) [6])) in archive /home/martineesmaa/mpv-android-vvc/buildscripts/prefix/arm64/lib/libvvdec.a
>>> referenced 463 more times
Full log of compressed file: config.zip
I remember last time I compiled vvdec commit (c26979fac06cf0405da7c901b7826ed517444f95) with mpv-android-vvc was 17th June 2024.
EDIT: Even I tried to compile Linux of my custom mpv-build repo did not work for FFmpeg configuration due not found of libvvdec, but cross compiling Windows & Linux in another repo FFmpeg-Builds are fine without issues.
Feel free to reply me again. Thanks! :)
So, you are saying you want the user to be able to replace the vvdec library in the APK, but you are building libvvdec statically. You need to add -DBUILD_SHARED_LIBS=1
to build the shared library.
Otherwise, if you want to link FFmpeg statically against vvdec, you need to link FFmpeg directly against the correct c++ standard library. You can tell the configure script, that it has to link the private dependencies of libvvdec by passing --pkg-config-flags=--static
. Unfortunately, this is only possible as a global option, so FFmpeg will be linked directly against the private dependencies of all other dependencies. To work around that, you can read the Libs.private
from the correct libvvdec.pc
and add these as --extra-ldflags
Originally posted by @MartinEesmaa in https://github.com/fraunhoferhhi/vvdec/issues/198#issuecomment-2395778005 :
@adamjw24 replied :
@MartinEesmaa wrote :