Javernaut / ffmpeg-android-maker

Contains a script that assembles FFmpeg library for Android
MIT License
586 stars 173 forks source link

C compiler test failed. #57

Closed waqasakram117 closed 2 years ago

waqasakram117 commented 2 years ago

I am using Mac MOnterey

home/name/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/i686-linux-android19-clang is unable to create an executable file. C compiler test failed.

If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem.

Javernaut commented 2 years ago

Hey @waqasakram117 , tell me what is the version of the Android ndk you use? And what exact command do you use to execute the script? And the version of the ffmpeg-android-maker itself.

waqasakram117 commented 2 years ago

Ndk version: 23.1.7779620 1: ./ffmpeg-android-maker.sh 2: ./ffmpeg-android-maker.sh -android=27 Maker version: v2.6.1

Javernaut commented 2 years ago

Given this and this brief tests, both your commands can be properly executed in a properly set environment. That is why I think there is something with your setup.

Can you also share the config.log file? It should be available at sources/ffmpeg/ffmpeg-4.4.1/ffbuild/config.log of your local directory after the unsuccessful build.

waqasakram117 commented 2 years ago

config.log

Javernaut commented 2 years ago

The prelast line of it states:

./configure: line 984: //Users/waqasakram/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/i686-linux-android27-clang: No such file or directory

Have you set the ANDROID_NDK_HOME variable correctly? Try manual exploring the android sdk directory. Usually NDK resides in $sdk/ndk/$version directories. You can test the proper setting up with a simple cd $ANDROID_NDK_HOME command.

waqasakram117 commented 2 years ago

When I echo $ANDROID_NDK_HOME /Users/waqasakram/Library/Android/sdk/ndk-bundle this prints and I believe this is ok. Is it?

Javernaut commented 2 years ago

@waqasakram117 , I specifically metioned the cd command and the exploring of the sdk directory. Have you done it?

Although the value or your ANDROID_NDK_HOME variable seems ok, there may be no actual directory with such a path in your system. The 'ndk-bundle' directory isn't used in sdk for quite some time. SDK Manager now installs NDKs 'side by side' in $sdk/ndk directory.

waqasakram117 commented 2 years ago

yes when I run cd $ANDROID_NDK_HOME it went to ndk-bundle % and everything is located as it should be. .../sdk/ndk/23.1.7779620/...

Should I install a fresh SDK?

Javernaut commented 2 years ago

The 'bundle' is installed separately from 'side by side' NDKs. There can be either 'ndk-bundle' or the version in the path itself.

try export the variable like this: export /Users/waqasakram/Library/Android/sdk/ndk/23.1.7779620 and execute the script after that.

waqasakram117 commented 2 years ago

Thanks. After exporting the variable it is working. anyways in the ndk-bundle directory was empty so I just opened my Android project in project structure there is a section download NDK. After downloading ndk-bundle directory has files related to ndk then the environmental variable is also working. ndk-bundle is confusing. Anyways it's working fine.