Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NDK #163

Closed
janbolat opened this issue Sep 22, 2021 · 4 comments
Closed

NDK #163

janbolat opened this issue Sep 22, 2021 · 4 comments
Assignees
Labels
android Affect Android platform question Further information is requested scripts Affect build scripts v4.5 Affects v4.5 release

Comments

@janbolat
Copy link

Failing to build with x264 (similar to https://github.com/tanersener/ffmpeg-kit/issues/144).
Using main branch. NDK 23.0.7599858

./android.sh --lts --speed --debug \ --enable-gpl --enable-x264

x264/config.log:

checking for -Werror=unknown-warning-option... yes
checking for -Werror=unknown-attributes... yes
checking for -Werror=attributes... yes
checking for -Werror=ignored-attributes... yes
x264 configure script
Command line options: "--prefix=/Users/zhanbolat/StudioProjects/ffmpeg-kit/prebuilt/android-x86-lts/x264" "--enable-pic" "--sysroot=/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot" "--enable-static" "--disable-cli" "--disable-asm" "--host=i686-linux-android"

checking whether i686-linux-android16-clang works... yes
checking whether i686-linux-android16-clang supports for( int i = 0; i < 9; i++ ); with -std=gnu99... yes
checking whether i686-linux-android16-clang supports __attribute__((force_align_arg_pointer))... yes
checking for -mpreferred-stack-boundary=6... no
Failed commandline was:
--------------------------------------------------
i686-linux-android16-clang conftest.c -m32 -march=i686 -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_X86 -std=c99 -Wno-unused-function -fstrict-aliasing -DANDROID_NDK -fPIC -DANDROID -DFFMPEG_KIT_LTS -D__ANDROID__ -D__ANDROID_MIN_SDK_VERSION__=16 -g  -Wall -I. -I$(SRCPATH) --sysroot=/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot -std=gnu99 -D_GNU_SOURCE   -Werror=unknown-warning-option -Werror=unknown-attributes -Werror=attributes -Werror=ignored-attributes -mpreferred-stack-boundary=6  -m32 -march=i686 -g -lc -lm -ldl -llog -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/i686-linux-android/lib -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/i686-linux-android/16 -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/lib -Wl,--hash-style=both -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libunwind.a --sysroot=/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot -lm -o conftest
clang-12: error: unknown argument: '-mpreferred-stack-boundary=6'
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main (void) {  return 0; }
--------------------------------------------------
checking for -mstack-alignment=64... yes
checking for pthread_create(0,0,0,0); in pthread.h... no
Failed commandline was:
--------------------------------------------------
i686-linux-android16-clang conftest.c -m32 -march=i686 -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_X86 -std=c99 -Wno-unused-function -fstrict-aliasing -DANDROID_NDK -fPIC -DANDROID -DFFMPEG_KIT_LTS -D__ANDROID__ -D__ANDROID_MIN_SDK_VERSION__=16 -g  -Wall -I. -I$(SRCPATH) --sysroot=/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot -std=gnu99 -D_GNU_SOURCE -mstack-alignment=64   -Werror=unknown-warning-option -Werror=unknown-attributes -Werror=attributes -Werror=ignored-attributes -lpthread  -m32 -march=i686 -g -lc -lm -ldl -llog -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/i686-linux-android/lib -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/i686-linux-android/16 -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/lib -Wl,--hash-style=both -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libunwind.a --sysroot=/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot -lm -o conftest
ld: error: unable to find library -lpthread
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
--------------------------------------------------
Failed program was:
--------------------------------------------------
#include <pthread.h>
int main (void) { pthread_create(0,0,0,0); return 0; }
--------------------------------------------------
checking for pthread_create(0,0,0,0); in pthread.h... yes
checking for cpu_set_t p_aff; return CPU_COUNT(&p_aff); in sched.h... yes
checking for volatile float x = 2; return log2f(x); in math.h... no
Failed commandline was:
--------------------------------------------------
i686-linux-android16-clang conftest.c -m32 -march=i686 -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_X86 -std=c99 -Wno-unused-function -fstrict-aliasing -DANDROID_NDK -fPIC -DANDROID -DFFMPEG_KIT_LTS -D__ANDROID__ -D__ANDROID_MIN_SDK_VERSION__=16 -g  -Wall -I. -I$(SRCPATH) --sysroot=/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot -std=gnu99 -D_GNU_SOURCE -mstack-alignment=64   -Werror=unknown-warning-option -Werror=unknown-attributes -Werror=attributes -Werror=ignored-attributes   -m32 -march=i686 -g -lc -lm -ldl -llog -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/i686-linux-android/lib -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/i686-linux-android/16 -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/lib -Wl,--hash-style=both -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libunwind.a --sysroot=/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot -lm  -o conftest
ld: error: undefined symbol: log2f
>>> referenced by conftest.c:2
>>>               /var/folders/68/rltx43751yjbk2kk3vkd_w980000gn/T/conftest-4d7364.o:(main)
>>> did you mean: logbf
>>> defined in: /Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/i686-linux-android/16/libm.so
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
--------------------------------------------------
Failed program was:
--------------------------------------------------
#include <math.h>
int main (void) { volatile float x = 2; return log2f(x); return 0; }
--------------------------------------------------
checking for strtok_r(0, 0, 0); in string.h... yes
checking for clock_gettime(CLOCK_MONOTONIC, 0); in time.h... yes
checking whether defined(MAP_PRIVATE) is true... yes
checking for MADV_HUGEPAGE; in sys/mman.h... yes
checking for uint32_t test_vec __attribute__ ((vector_size (16))) = {0,1,2,3}; in stdint.h... yes
checking for stdio.h... yes
checking for -fno-tree-vectorize... yes
checking for fseeko(stdin,0,0); in stdio.h... yes
checking for -Wshadow... yes
checking for -Wmaybe-uninitialized... no
Failed commandline was:
--------------------------------------------------
i686-linux-android16-clang conftest.c -Wshadow -O3 -ffast-math -m32 -march=i686 -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_X86 -std=c99 -Wno-unused-function -fstrict-aliasing -DANDROID_NDK -fPIC -DANDROID -DFFMPEG_KIT_LTS -D__ANDROID__ -D__ANDROID_MIN_SDK_VERSION__=16 -g  -Wall -I. -I$(SRCPATH) --sysroot=/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot -std=gnu99 -D_GNU_SOURCE -mstack-alignment=64 -fPIC -fomit-frame-pointer -fno-tree-vectorize   -Werror=unknown-warning-option -Werror=unknown-attributes -Werror=attributes -Werror=ignored-attributes -Wmaybe-uninitialized  -m32 -march=i686 -g -lc -lm -ldl -llog -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/i686-linux-android/lib -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/i686-linux-android/16 -L/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/lib -Wl,--hash-style=both -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libunwind.a --sysroot=/Users/zhanbolat/Library/Android/sdk/ndk/23.0.7599858//toolchains/llvm/prebuilt/darwin-x86_64/sysroot -lm  -o conftest
error: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Werror,-Wunknown-warning-option]
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main (void) {  return 0; }
--------------------------------------------------
checking for -fvisibility=hidden... yes

platform:       X86
byte order:     little-endian
system:         LINUX
cli:            no
libx264:        internal
shared:         no
static:         yes
bashcompletion: no
asm:            no
interlaced:     yes
avs:            no
lavf:           no
ffms:           no
mp4:            no
gpl:            yes
thread:         posix
opencl:         yes
filters:        crop select_every
lto:            no
debug:          no
gprof:          no
strip:          no
PIC:            yes
bit depth:      all
chroma format:  all
@tanersener
Copy link
Collaborator

Your config.log doesn't show any errors. These are just regular option checks done by every configure script.

test-163

@tanersener tanersener added android Affect Android platform question Further information is requested scripts Affect build scripts labels Sep 22, 2021
@janbolat
Copy link
Author

Thanks for a quick response.

It builds successfully without x264. But when I try to add x264, it fails on x86-64 (the last one) saying:
clang-12: error: linker command failed with exit code in config.log

Building x86-64 platform on API level 21

x264: failed

See build.log for details

build.log

@janbolat
Copy link
Author

I guess I found the reason in build.log :)
Will check and return back

@tanersener tanersener added the v4.5 Affects v4.5 release label Sep 22, 2021
@janbolat
Copy link
Author

I figured it out. That was my bad, sorry.

@tanersener tanersener self-assigned this Sep 22, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
android Affect Android platform question Further information is requested scripts Affect build scripts v4.5 Affects v4.5 release
Projects
None yet
Development

No branches or pull requests

2 participants