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

Error while building ffmpeg library for android #53

Open
DaAlx opened this issue Nov 7, 2021 · 10 comments
Open

Error while building ffmpeg library for android #53

DaAlx opened this issue Nov 7, 2021 · 10 comments

Comments

@DaAlx
Copy link

DaAlx commented Nov 7, 2021

Hello,

first of all thank you for this awesome project. I tested the demo android application and I'm suprised with the excellent performance of the player.

Now I'm trying to build the ffmpeg library for the android application. My environment is an Ubuntu 20.04.3 (kernel: 5.11.0-37-generic). The build process results to the following error:

./fanplayer/player-android/jni/soundtouch/source/Android-lib/jni/soundtouch-lib.cpp:39:24: fatal error: soundtouch.h: No such file or directory
 #include "soundtouch.h"

I have followed the steps from the readme (https://github.com/rockcarry/fanplayer/wiki/build-ffmpeg-for-android):

  • git clone https://github.com/rockcarry/fanplayer.git
  • cd player-android/jni
  • export ANDROID_NDK_HOME=/Downloads/android-ndk-r13b/
  • ./build_fanplayer_jni.sh
    --> this results to the error no NDK arm-linux-androideabi-gcc on $PATH at (eval 10) line 124.
  • I changed the line 54 of the build_fanplayer_jni.sh script from export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/windows-x86_64/bin to export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/linux-x86_64/bin
    --> Now the the scripts continues but after a few seconds it results to the error ./fanplayer/player-android/jni/soundtouch/source/Android-lib/jni/soundtouch-lib.cpp:39:24: fatal error: soundtouch.h: No such file or directory'

I have looked in the directory ./fanplayer/player-android/jni/soundtouch/source/Android-lib/jni. There is no file named soundtouch.h.

Do I missing something?

Best Regards,
DaAlx

@rockcarry
Copy link
Owner

git clone https://github.com/rockcarry/soundtouch.git
soundtouch-lib.h and soundtouch-lib.cpp is in directoy soundtouch/source/Android-lib/jni
please check the build script build_fanplayer_jni.sh.

@DaAlx
Copy link
Author

DaAlx commented Nov 9, 2021

This unfortunately does not fix the error. The file soundtouch/source/Android-lib/jni/soundtouch-lib.cpp includes on line 39 the header file soundtouch.h. In this directory (https://github.com/rockcarry/soundtouch/tree/master/source/Android-lib/jni) there is no file with this name.

@rockcarry
Copy link
Owner

image

@DaAlx
Copy link
Author

DaAlx commented Nov 11, 2021

During the script execution the copy command on line 99 is never reached, because the error appears on line 80 (execution of ${CROSS_PREFIX}gcc command, in this case it is arm-linux-androideabi-gcc).

Do I missing some configuration?

@rockcarry
Copy link
Owner

check PATH environment variable:
export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/windows-x86_64/bin
on ubuntu it is differernt, not windows-x86_64, but you should use the correct value of you ndk path

@DaAlx
Copy link
Author

DaAlx commented Nov 12, 2021

I changed the line 54 of the script (see my first post). So my PATH variable has the following value $PATH:$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/linux-x86_64/bin.

@rockcarry
Copy link
Owner

try command:
$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -v

@DaAlx
Copy link
Author

DaAlx commented Nov 14, 2021

I tried it with -v parameter but I'm not able to see what the error could be. Maybe you can figure out what is going wrong!
build.log

@tangfuhao
Copy link

During the script execution the copy command on line 99 is never reached, because the error appears on line 80 (execution of ${CROSS_PREFIX}gcc command, in this case it is arm-linux-androideabi-gcc).

Do I missing some configuration?

soundtouch.h, the issue is file name lowercase.

@MRDHR
Copy link

MRDHR commented Jan 10, 2024

modify soundtouch-lib.cpp line 39
#include "soundtouch.h" to #include "SoundTouch.h"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants