Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Getting build error #25

Closed
vishalknishad opened this issue Apr 18, 2021 · 7 comments
Closed

Getting build error #25

vishalknishad opened this issue Apr 18, 2021 · 7 comments
Assignees
Labels
android Affect Android platform no-issue-activity question Further information is requested scripts Affect build scripts v4.4 Affects v4.4 release

Comments

@vishalknishad
Copy link

> $ ./android.sh --disable-arm-v7a-neon --disable-arm64-v8a --disable-x86 --disable-x86-64


Building ffmpeg-kit library for Android

Architectures: arm-v7a
Libraries: none

Downloading sources: ok

Building arm-v7a platform on API level 24

cpu-features: ok

ffmpeg: ok

ffmpeg-kit: failed


> $ tail build.log 
[armeabi-v7a] Compile arm    : ffmpegkit <= ffprobekit.c
[armeabi-v7a] Compile arm    : ffmpegkit <= ffmpegkit_exception.c
[armeabi-v7a] Compile arm    : ffmpegkit <= fftools_cmdutils.c
[armeabi-v7a] Compile arm    : ffmpegkit <= fftools_ffmpeg.c
jni/../ffmpeg-kit-android-lib/src/main/cpp/fftools_ffmpeg.c:507:32: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
    struct sigaction action = {0};
                               ^
                               {}
1 error generated.
make: *** [/home/vishal/Android/Sdk/ndk/21.3.6528147/build/core/build-binary.mk:476: obj/local/armeabi-v7a/objs/ffmpegkit/fftools_ffmpeg.o] Error 1

@tanersener while compiling your library I'm getting above error. How to solve this issue?

OS - linux
ndk version - 21.3.6528147

@tanersener tanersener added the question Further information is requested label Apr 18, 2021
@tanersener tanersener self-assigned this Apr 18, 2021
@tanersener
Copy link
Collaborator

I don't know why you have this error. Can you try using NDK version 21.4 or 22? These are the versions that were used to test the scripts.

@juha-h
Copy link

juha-h commented Apr 19, 2021

I got the same error. I'm using /opt/Android/ndk/21.1.6352462 that comes bundled by latest stable Android Studio. It works with --disable-arm-v7a, but fails with --disable-arm64-v8a.

I don't need ffmpegkit. Is there a way to stop after

ffmpeg: ok

so that ffmpeg-kit: failed would not appear?

@juha-h
Copy link

juha-h commented Apr 19, 2021

I was able to skip ffmpeg-kit by setting environment var

SKIP_ffmpeg_kit=1

@vishalknishad
Copy link
Author

vishalknishad commented Apr 20, 2021

quick hack:

In file android/ffmpeg-kit-android-lib/src/main/cpp/fftools_ffmpeg.c, line 493 & 506

Replace __linux__ with __linux1__

recompile

@tanersener a better solution would be passing -Wmissing-braces flag to the compiler.

@tanersener tanersener added the android Affect Android platform label Apr 20, 2021
@tanersener
Copy link
Collaborator

I got the same error. I'm using /opt/Android/ndk/21.1.6352462 that comes bundled by latest stable Android Studio. It works with --disable-arm-v7a, but fails with --disable-arm64-v8a.

My suggestion is to use the newer NDK versions, the ones that we tested. I don't guarantee that you won't get an error on older versions. And by the way, you can upgrade the NDK from Android Studio. Android Studio allows you to do that.

so that ffmpeg-kit: failed would not appear?

You can use --skip-ffmpeg-kit option.

@tanersener a better solution would be passing -Wmissing-braces flag to the compiler.

As far as I remember, the flag that breaks the build in this issue is added automatically by ndk-build. It is not easy to update those flags.

@dnovikov
Copy link

Switch from NDK 21.3.6528147 to 22.0.7026061 fixed this for me.

@tanersener tanersener added scripts Affect build scripts v4.4 Affects v4.4 release labels May 1, 2021
@github-actions
Copy link

github-actions bot commented Jul 1, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Affect Android platform no-issue-activity question Further information is requested scripts Affect build scripts v4.4 Affects v4.4 release
Projects
None yet
Development

No branches or pull requests

4 participants