conan-center-index
conan-center-index copied to clipboard
[package] ffmpeg/*: Android:armv8 build fails
Description
The ffmpeg build system for Android armv8 fails. I have checked the problem exists also when Conan v. 2.x is used or Android API higher that 24.
Package and Environment Details
- Package Name/Version: ffmpeg/*
- Operating System+version: Debian GNU/Linux 11
- Compiler+version: clang 14
- Conan version: conan 1.59.0
- Python version: Python 3.9.2
Conan profile
profile: default
[settings] os=Linux os_build=Linux arch=x86_64 arch_build=x86_64 compiler=gcc compiler.version=10 compiler.libcxx=libstdc++11 build_type=Release [options] [build_requires] [env]
profile: a24
[settings] arch=armv8 arch_build=x86_64 build_type=Release compiler=clang compiler.libcxx=c++_static compiler.version=14 os=Android os.api_level=24
[tool_requires] android-ndk/r25c
[options] [env]
Steps to reproduce
conan install ffmpeg/6.0@ --profile:host=a24 --profile:build=default --build=missing --json out.json -o:h with_asm=False -o:h with_zlib=False -o:h with_bzip2=False -o:h with_lzma=False -o:h with_libiconv=False -o:h with_freetype=False -o:h with_openjpeg=False -o:h with_openh264=False -o:h with_opus=False -o:h with_vorbis=False -o:h with_libx264=False -o:h with_libx265=False -o:h with_libvpx=False -o:h with_libmp3lame=False -o:h with_libfdk_aac=False -o:h with_libwebp=False -o:h with_ssl=False -o:h with_programs=False -o:h disable_everything=True -o:h disable_all_encoders=True -o:h disable_all_decoders=True -o:h disable_all_hardware_accelerators=True -o:h disable_all_muxers=True -o:h disable_all_demuxers=True -o:h disable_all_parsers=True -o:h disable_all_bitstream_filters=True -o:h disable_all_input_devices=True -o:h disable_all_output_devices=True -o:h disable_all_filters=True
Logs
Click to expand log
# conan install ffmpeg/6.0@ --profile:host=a24 --profile:build=default --build=missing --json out.json -o:h with_asm=False -o:h with_zlib=False -o:h with_bzip2=False -o:h with_lzma=False -o:h with_libiconv=False -o:h with_freetype=False -o:h with_openjpeg=False -o:h with_openh264=False -o:h with_opus=False -o:h with_vorbis=False -o:h with_libx264=False -o:h with_libx265=False -o:h with_libvpx=False -o:h with_libmp3lame=False -o:h with_libfdk_aac=False -o:h with_libwebp=False -o:h with_ssl=False -o:h with_programs=False -o:h disable_everything=True -o:h disable_all_encoders=True -o:h disable_all_decoders=True -o:h disable_all_hardware_accelerators=True -o:h disable_all_muxers=True -o:h disable_all_demuxers=True -o:h disable_all_parsers=True -o:h disable_all_bitstream_filters=True -o:h disable_all_input_devices=True -o:h disable_all_output_devices=True -o:h disable_all_filters=True
Configuration (profile_host):
[settings]
arch=armv8
arch_build=x86_64
build_type=Release
compiler=clang
compiler.libcxx=c++_static
compiler.version=14
os=Android
os.api_level=24
[options]
disable_all_bitstream_filters=True
disable_all_decoders=True
disable_all_demuxers=True
disable_all_encoders=True
disable_all_filters=True
disable_all_hardware_accelerators=True
disable_all_input_devices=True
disable_all_muxers=True
disable_all_output_devices=True
disable_all_parsers=True
disable_everything=True
with_asm=False
with_bzip2=False
with_freetype=False
with_libfdk_aac=False
with_libiconv=False
with_libmp3lame=False
with_libvpx=False
with_libwebp=False
with_libx264=False
with_libx265=False
with_lzma=False
with_openh264=False
with_openjpeg=False
with_opus=False
with_programs=False
with_ssl=False
with_vorbis=False
with_zlib=False
[build_requires]
*: android-ndk/r25c
[env]
Configuration (profile_build):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=10
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
ffmpeg/6.0: WARN: Package binary is corrupted, removing: 2b88079bc75663d961058d4918832b2854d30acc
Installing package: ffmpeg/6.0
Requirements
ffmpeg/6.0 from 'conancenter' - Cache
Packages
ffmpeg/6.0:2b88079bc75663d961058d4918832b2854d30acc - Build
Build requirements
android-ndk/r25c from 'conancenter' - Cache
pkgconf/1.9.3 from 'conancenter' - Cache
Build requirements packages
android-ndk/r25c:4db1be536558d833e52e862fd84d64d75c2b3656 - Cache
pkgconf/1.9.3:24647d9fe8ec489125dfbae4b3ebefaf7581674c - Cache
Cross-build from 'Linux:x86_64' to 'Android:armv8'
Installing (downloading, building) binaries...
android-ndk/r25c: Already installed!
pkgconf/1.9.3: Already installed!
pkgconf/1.9.3: Appending PATH env var: /home/conan/pkgconf/1.9.3/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin
pkgconf/1.9.3: Setting PKG_CONFIG env var: /home/conan/pkgconf/1.9.3/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/pkgconf
pkgconf/1.9.3: Appending AUTOMAKE_CONAN_INCLUDES env var: /home/conan/pkgconf/1.9.3/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/aclocal
ffmpeg/6.0: Applying build-requirement: android-ndk/r25c
ffmpeg/6.0: Applying build-requirement: pkgconf/1.9.3
ffmpeg/6.0: WARN: Build folder is dirty, removing it: /home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc
ffmpeg/6.0: Copying sources to build folder
ffmpeg/6.0: Building your package in /home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc
ffmpeg/6.0: Generator txt created conanbuildinfo.txt
ffmpeg/6.0: Calling generate()
ffmpeg/6.0: Aggregating env generators
ffmpeg/6.0: Calling build()
ffmpeg/6.0: apply_conandata_patches(): No patches defined in conandata
ffmpeg/6.0: Calling:
> "/home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/src/configure" '--disable-shared' '--enable-static' '--prefix=/' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' '--pkg-config-flags=--static' '--disable-doc' '--enable-cross-compile' '--disable-asm' '--disable-shared' '--enable-static' '--enable-pic' '--enable-avdevice' '--enable-avcodec' '--enable-avformat' '--enable-swresample' '--enable-swscale' '--enable-postproc' '--enable-avfilter' '--disable-bzlib' '--disable-zlib' '--disable-lzma' '--disable-iconv' '--disable-libopenjpeg' '--disable-libopenh264' '--disable-libvorbis' '--disable-libopus' '--disable-libzmq' '--disable-sdl2' '--disable-libx264' '--disable-libx265' '--disable-libvpx' '--disable-libmp3lame' '--disable-libfdk-aac' '--disable-libwebp' '--disable-openssl' '--disable-alsa' '--disable-libpulse' '--disable-vaapi' '--disable-vdpau' '--disable-libxcb' '--disable-libxcb-shm' '--disable-libxcb-shape' '--disable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-cuda' '--disable-cuvid' '--disable-nonfree' '--enable-gpl' '--disable-everything' '--disable-encoders' '--disable-decoders' '--disable-hwaccels' '--disable-muxers' '--disable-demuxers' '--disable-parsers' '--disable-bsfs' '--disable-indevs' '--disable-outdevs' '--disable-filters' '--disable-vulkan' '--arch=aarch64' '--disable-programs' '--nm=/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm' '--ar=/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar' '--strip=/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip' '--cc=/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang' '--cxx=/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++' '--ld=/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/bin/ld' '--ranlib=/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib' '--target-os=android' '--extra-cflags=-fPIC --sysroot /home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot -O3' '--extra-ldflags=--sysroot /home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot'
install prefix /
source path /home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/src
C compiler /home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang
C library bionic
host C compiler gcc
host C library glibc
ARCH c (generic)
big-endian no
runtime cpu detection yes
debug symbols yes
strip symbols yes
optimize for size no
optimizations yes
static yes
shared no
postprocessing support yes
network support yes
threading support pthreads
safe bitstream reader yes
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled no
makeinfo supports HTML no
xmllint enabled no
External libraries:
External libraries providing hardware acceleration:
Libraries:
avcodec avfilter avutil swresample
avdevice avformat postproc swscale
Programs:
Enabled decoders:
Enabled encoders:
Enabled hwaccels:
Enabled parsers:
Enabled demuxers:
Enabled muxers:
Enabled protocols:
Enabled filters:
Enabled bsfs:
Enabled indevs:
Enabled outdevs:
License: GPL version 2 or later
GEN libavutil/libavutil.version
GEN libavcodec/libavcodec.version
GEN libavformat/libavformat.version
GEN libavfilter/libavfilter.version
GEN libavdevice/libavdevice.version
GEN libswscale/libswscale.version
GEN libswresample/libswresample.version
GEN libpostproc/libpostproc.version
CC libavdevice/alldevices.o
CC libavdevice/avdevice.o
CC libavdevice/utils.o
CC libavdevice/version.o
GEN libavdevice/libavdevice.pc
CC libavfilter/allfilters.o
CC libavfilter/audio.o
CC libavfilter/avfilter.o
CC libavfilter/avfiltergraph.o
CC libavfilter/buffersink.o
CC libavfilter/buffersrc.o
CC libavfilter/colorspace.o
CC libavfilter/drawutils.o
In file included from src/libavdevice/version.c:23:
In file included from src/libavutil/avassert.h:30:
In file included from /home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/stdlib.h:31:
/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: error: expected identifier or '('
char* getenv(const char* __name);
^
./config.h:18:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
^
/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/14.0.7/include/stddef.h:89:18: note: expanded from macro 'NULL'
# define NULL ((void*)0)
^
In file included from src/libavdevice/version.c:23:
In file included from src/libavutil/avassert.h:30:
In file included from /home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/stdlib.h:31In file included from :
src/libavdevice/avdevice.c:/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h20::
61In file included from :src/libavdevice/avdevice.h7::55 :
In file included from src/libavutil/opt.herror: :31:
expected ')'In file included from src/libavutil/avutil.h
:296:
In file included from ./config.hsrc/libavutil/common.h::18575::
19In file included from :src/libavutil/internal.h :106:
note: expanded from macro 'getenv'src/libavutil/libm.h:
54:32#define getenv(x) NULL:
^
error: /home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/14.0.7/include/stddef.h:static declaration of 'cbrt' follows non-static declaration89:
18: note: expanded from macro 'NULL'
static av_always_inline double cbrt(double x)# define NULL ((void*)0)
^ ^
/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: note: to match this '('
./config.h/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h::18189::198:: note: expanded from macro 'getenv'
note: previous declaration is here#define getenv(x) NULL
^
double cbrt(double __x);/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/14.0.7/include/stddef.h
:89 ^:
17: note: expanded from macro 'NULL'
# define NULL ((void*)0)
^
In file included from src/libavdevice/version.c:23:
In file included from src/libavutil/avassert.h:30:
In file included from /home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/stdlib.h:In file included from 31src/libavdevice/avdevice.c:
:20/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:
:In file included from src/libavdevice/avdevice.h:55:
In file included from src/libavutil/opt.h:61:731: :
In file included from src/libavutil/avutil.h:296:
In file included from src/libavutil/common.h:575:
In file included from src/libavutil/internal.h:106:
src/libavutil/libm.h:61:31: error: static declaration of 'cbrtf' follows non-static declaration
static av_always_inline float cbrtf(float x)
^
/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:190:7: note: previous declaration is here
float cbrtf(float __x);
^
In file included from src/libavdevice/avdevice.c:20:
In file included from src/libavdevice/avdevice.h:55:
In file included from src/libavutil/opt.h:31:
In file included from src/libavutil/avutil.h:296:
In file included from src/libavutil/common.h:575:
In file included from src/libavutil/internal.h:106:
src/libavutil/libm.h:68:32: error: static declaration of 'copysign' follows non-static declaration
static av_always_inline double copysign(double x, double y)
^
/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:277:8: note: previous declaration is here
double copysign(double __value, double __sign) __attribute_const__;
^
In file included from src/libavdevice/avdevice.c:20:
In file included from src/libavdevice/avdevice.h:55:
In file included from src/libavutil/opt.h:31:
In file included from src/libavutil/avutil.h:296:
In file included from src/libavutil/common.h:575:
In file included from src/libavutil/internal.h:106:
src/libavutil/libm.h:121:22: error: static declaration of 'erf' follows non-static declaration
static inline double erf(double z)
^
/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:209:8: note: previous declaration is here
double erf(double __x);
^
error: expected ')'
char* getenv(const char* __name);
^
.....
In file included from src/libavfilter/buffersink.c:29:
In file included from src/libavutil/common.h:575:
In file included from src/libavutil/internal.h:106:
src/libavutil/libm.h:465:40: error: static declaration of 'truncf' follows non-static declaration
static av_always_inline av_const float truncf(float x)
^
/home/conan/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:262:7: note: previous declaration is here
float truncf(float __x);
^
make: *** [/home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/src/ffbuild/common.mak:81: libavfilter/colorspace.o] Error 1
2 warnings and 12 errors generated.
2 warnings and 12 errors generated.
make: *** [/home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/src/ffbuild/common.mak:81: libavfilter/drawutils.o] Error 1
make: *** [/home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/src/ffbuild/common.mak:81: libavdevice/alldevices.o] Error 1
2 warnings and 15 errors generated.
2 warnings and 12 errors generated.
2 warnings and 15 errors generated.
make: *** [/home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/src/ffbuild/common.mak:81: libavdevice/version.o] Error 1
make: *** [/home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/src/ffbuild/common.mak:81: libavfilter/audio.o] Error 1
make: *** [/home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/src/ffbuild/common.mak:81: libavfilter/avfiltergraph.o] Error 1
2 warnings and 12 errors generated.
2 warnings and 12 errors generated.
make: *** [/home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/src/ffbuild/common.mak:81: libavfilter/buffersink.o] Error 1
make: *** [/home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/src/ffbuild/common.mak:81: libavfilter/avfilter.o] Error 1
ffmpeg/6.0:
ffmpeg/6.0: ERROR: Package '2b88079bc75663d961058d4918832b2854d30acc' build failed
ffmpeg/6.0: WARN: Build folder /home/conan/ffmpeg/6.0/_/_/build/2b88079bc75663d961058d4918832b2854d30acc/build-release
JSON file created at '/home/workspace/conan_recipes/ffmpeg/out.json'
ERROR: ffmpeg/6.0: Error in build() method, line 676
autotools.make()
ConanException: Error 2 while executing make -j12
root@android-armv8-dev:/home/workspace/conan_recipes/ffmpeg#
I get the same error when building ffmpeg/6.1 with conan 2.0.12 for android
First you need to check if ffmpeg can be built without conan, as it could be upstream bug
Hello @trampen and @NielsHygum We just merged the PR #24566 that should mitigate Android build for FFmpeg. Please, update your local copy with conan install -r conancenter --update --requires=ffmpeg/<version>
and try it.
The current Android build logs can be found here: https://github.com/conan-io/conan-center-index/pull/24566#issuecomment-2292915235
Regards!
Hello @trampen and @NielsHygum We just merged the PR #24566 that should mitigate Android build for FFmpeg. Please, update your local copy with
conan install -r conancenter --update --requires=ffmpeg/<version>
and try it.The current Android build logs can be found here: #24566 (comment)
Regards!
@uilianries nice work! Compiles on Android for me now :+1: