question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to build ffmpeg extension

See original GitHub issue

I have upgraded our in app version of ExoPlayer to 2.13.3. Now we also want to build the ffmpeg extension to go along with it, however, I get a build error when the build_ffmpeg.sh script launches:

Using 8 jobs for make
~/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang is unable to create an executable file.
C compiler test failed.

...

After that it still continues with building, but the output files are missing. Previously, I was able to build the 2.11.3 extension with this same machine.

I have checked, and the referenced file does exist:

Daniels-MacBook-Pro-2:jni dzolnai$ ls -l ~/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang
-rwxr-xr-x  1 dzolnai  staff  177 Jun  8  2020 /Users/dzolnai/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang

Switching over to the r20 NDK does not help. I also tried versions 21.4.7075529 and 22.1.7171670 without any success. I am building the aac ac3 eac3 decoders. I have checked, the checked out FFMPEG version is 4.2, as instructed.

Do you perhaps have any idea what might be wrong in my case?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dzolnaicommented, Apr 28, 2021

I have changed TMPDIR to a tmp directory I created inside the ffmpeg root repo. Now the end of my logs look like this:

BEGIN /Users/dzolnai/Documents/Work/ffmpeg/tmp/ffconf.fv1NJEWM/test.c
    1	int main(void){ return 0; }
END /Users/dzolnai/Documents/Work/ffmpeg/tmp/ffconf.fv1NJEWM/test.c
~/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang -march=armv7-a -mfloat-abi=softfp -march=armv7-a -c -o /Users/dzolnai/Documents/Work/ffmpeg/tmp/ffconf.fv1NJEWM/test.o /Users/dzolnai/Documents/Work/ffmpeg/tmp/ffconf.fv1NJEWM/test.c
./configure: line 974: ~/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang: No such file or directory
C compiler test failed.

I have checked, and the file /Users/dzolnai/Documents/Work/ffmpeg/tmp/ffconf.fv1NJEWM/test.c Does not exist. The tmp directory is completely empty. Maybe the part where it should create the temporary file goes wrong? I’ll try to play a bit around with permissions and file locations, I know that macOS has added some special permissions to accessing special directories like Documents or Desktop.

0reactions
kim-vdecommented, Apr 29, 2021

Thanks for sharing the solution! I could indeed reproduce by changing the NDK_PATH to start with a tilde.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to build ffmpeg for ExoPlayer - Stack Overflow
I'm trying to add support for multiple audio formats in my app but cannot seem to build the ffmpeg extension on my mac....
Read more >
[Android Development] How to build Ffmpeg extension for ...
How can I build Ffmpeg Extension. Open ExoPlayer FFmpeg extension. Prepare for start: You need to permit terminal to doing what it want...
Read more >
FFmpeg Formats Documentation
When you configure your FFmpeg build, all the supported demuxers are enabled by default. You can list all available ones using the configure...
Read more >
Troubleshooting - ExoPlayer
Most extensions have manual steps to check out and build the dependencies, so make sure you've followed the steps in the README for...
Read more >
How to install the ffmpeg-php extension in Plesk
Answer ffmpeg-php extension can be installed. ... Go to Domains > example.com > File Manager and create a file named composer.json with the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found