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

FFmpeg decoder module building error #808

Closed
1 task
LSDsl opened this issue Nov 13, 2023 · 8 comments
Closed
1 task

FFmpeg decoder module building error #808

LSDsl opened this issue Nov 13, 2023 · 8 comments
Assignees

Comments

@LSDsl
Copy link

LSDsl commented Nov 13, 2023

Version

Media3 1.1.1

More version details

No response

Devices that reproduce the issue

NDK r21e and r21
Ubuntu 20.04.2 LTS

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

https://github.com/androidx/media/tree/release/libraries/decoder_ffmpeg#readme

Expected result

Success build

Actual result

Using 64 jobs for make
~/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi16-clang is unable to create an executable file.
C compiler test failed.

Media

none

Bug Report

  • You will email the zip file produced by adb bugreport to [email protected] after filing this issue.
@rohitjoins
Copy link
Contributor

Hi @LSDsl,

The error you're encountering suggests that there is an issue with the C compiler (armv7a-linux-androideabi16-clang) being unable to create an executable file. Can you please ensure that the user running the build process has the necessary permissions to create executable files in the specified directories?

If there is no permission issue, I would request you to attach the full log dump here for me to look further into this.

@LSDsl
Copy link
Author

LSDsl commented Nov 15, 2023

script running from root. how I can create full log dump?

@rohitjoins
Copy link
Contributor

Just add set -x at the beginning of the script. Although I'm not sure if the logs generated will help me debug it any further.

I'm able to run the same script without any issues, you'll probably need to try this on another system. The error above is not specific to setting up ffmpeg decoder or ExoPlayer.

@rohitjoins
Copy link
Contributor

Closing this issue as we are unable to assist with this issue as it relates to a generic Linux error, which is outside our area of expertise.

@rohitjoins
Copy link
Contributor

Hi @LSDsl,

I was able to reproduce the error when trying to build ffmpeg.

You can find the actual reason for the failure when you go to the end of config log file in ffbuild. From the jni folder where you're executing the command, you can check the log file at ffmpeg/ffbuild/config.log.

Please let me know the error you see there and may be we can debug this further. Thank you for your patience.

@google-oss-bot
Copy link
Collaborator

Hey @LSDsl. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@davidwonghk
Copy link

davidwonghk commented Dec 17, 2023

TL;DR

Hi @rohitjoins I think the armv7a-linux-androideabi16-clang is deprecated from latest Android NDK but the build_ffmpeg script is still using it. As for future proof we may not hard-code the version of the ndk tools in the script?


I got the error with another root cause.

I have downloaded the latest Android NDK from Android Studio as of the time writing this (version 26.1.10909125), and in my ndk directory (Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin) there is no armv7a-linux-androideabi16-clang. The earliest version it has is "armv7a-linux-androideabi21-clang".

I tried to modify the build_ffmpeg.sh to use the binary "armv7a-linux-androideabi21-clang" instead of "armv7a-linux-androideabi16-clang" and it seems working.

@rohitjoins
Copy link
Contributor

Hi @davidwonghk,

#867 already allows setting ANDROID_ABI version, please note that this is still in the main branch.

Also note that the README in the release branch says its only been tested with r23c and doesn't support the latest NDK.

@androidx androidx locked and limited conversation to collaborators Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants