For a few days I've been trying to build libVLC for Android, unfortunately without any success.
I'm using an Ubuntu 20.04 live usb, and have been following instructions from https://wiki.videolan.org/AndroidCompile/
After solving many other issues, now I'm stuck at missing libavcodec problem.
The result of the
Code: Select all
buildsystem/compile.sh -l -a all -r
Code: Select all
VLC source: found sources, leaving untouched
VLC sources: Checking TESTED_HASH and patches presence
NOTE: checks can be bypass by adding '-b' option to this script.
Checking presence of patch ../libvlc/patches/vlc3/0001-compat-Workaround-sendmsg-bug-on-android.patch
Checking presence of patch ../libvlc/patches/vlc3/0002-libvlc-events-Add-callbacks-for-record.patch
Checking presence of patch ../libvlc/patches/vlc3/0003-network-tls-Handle-errors-from-older-kernels.patch
Checking presence of patch ../libvlc/patches/vlc3/0004-access_output-file-Add-error-dialog-for-write-open.patch
Checking presence of patch ../libvlc/patches/vlc3/0005-libvlc-media_player-Add-record-method.patch
Configuring
ABI: armeabi-v7a
API: 17
PATH: /home/ubuntu/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ubuntu/android-sdk/platform-tools:/home/ubuntu/android-sdk/cmdline-tools/tools
VLC_CFLAGS: -g -O2 -fPIC -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -DNDEBUG
VLC_CXXFLAGS: -fexceptions -frtti
Building tools
protoc too old
To-be-built packages: protoc
You are ready to build VLC and its contribs
make: '.gas' is up to date.
Building the contribs
Generating EGL pkg-config file
Generating GLESv2 pkg-config file
Guessing build system... x86_64-linux-gnu
Packages licensing... GPL version 3, with advertisement clauses
Creating configuration file... config.mak
Bootstrap completed.
/bin/sh: 1: arm-linux-androideabi-gcc: not found
/bin/sh: 1: arm-linux-androideabi-gcc: not found
/bin/sh: 1: arm-linux-androideabi-gcc: not found
Run "make" to start compilation.
/*some rather not important stuff*/
-- The C compiler identification is Clang 9.0.8
-- Check for working C compiler: /home/ubuntu/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi17-clang
-- Check for working C compiler: /home/ubuntu/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi17-clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pow in m
-- Looking for pow in m - found
-- Trying SIMD32 C flags: -mfpu=neon -mfloat-abi=hard
-- Performing Test DETECT_SIMD32_C_FLAGS
-- Performing Test DETECT_SIMD32_C_FLAGS - Failed
-- Trying SIMD32 C flags: -mfpu=neon -mfloat-abi=softfp
-- Performing Test DETECT_SIMD32_C_FLAGS
-- Performing Test DETECT_SIMD32_C_FLAGS - Success
-- Found SIMD32: -mfpu=neon -mfloat-abi=softfp
-- Could NOT find SIMD64 (missing: SIMD64_C_FLAGS SIMD64_C_FLAGS)
-- Found PkgConfig: pkg-config (found version "0.29.1")
-- Checking for module 'libavcodec'
-- No package 'libavcodec' found
CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
CMakeLists.txt:132 (pkg_check_modules)
-- Configuring incomplete, errors occurred!
See also "/media/ubuntu/casper-rw/home/ubuntu/Desktop/libVLC/vlc-android/vlc/contrib/contrib-android-arm-linux-androideabi/soxr/CMakeFiles/CMakeOutput.log".
See also "/media/ubuntu/casper-rw/home/ubuntu/Desktop/libVLC/vlc-android/vlc/contrib/contrib-android-arm-linux-androideabi/soxr/CMakeFiles/CMakeError.log".
make: *** [../../contrib/src/soxr/rules.mak:33: .soxr] Error 1
Code: Select all
/home/ubuntu/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: CMakeFiles/cmTC_7415c.dir/src.c.obj uses VFP register arguments, output does not
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/cmTC_7415c.dir/build.make:87: cmTC_7415c] Error 1
make[2]: Leaving directory '/media/ubuntu/casper-rw/home/ubuntu/Desktop/libVLC/vlc-android/vlc/contrib/contrib-android-arm-linux-androideabi/soxr/CMakeFiles/CMakeTmp'
make[1]: *** [Makefile:121: cmTC_7415c/fast] Error 2
I don't understand why libavcodec cannot be found. I've installed it separately using
Code: Select all
sudo apt-get install libavcodec-dev
Code: Select all
pkg-config --modversion libavcodec
I've exported PKG_CONFIG_PATH to
Code: Select all
/usr/lib/x86_64-linux-gnu/pkgconfig
Any hint what may be the problem here? I'm rather a Ubuntu noob, so please use simple language