Android NDK arm-linux-androideabi-g++: error - android

I am trying to compile android-NDK project which uses L2CAP Bluetooth profile.When I compile in eclipse with android-ndk-r8d-windows and android-sdk-4.2 I am getting following error
arm-linux-androideabi-g++: error: libbluetooth.so: No such file or directory
make: *** [obj/local/armeabi/libl2cap_BTComm.so] Error 1
Please help me in solving this

I got the same problem in Ubuntu 12.04 while building the ndk project using ndk-build.
The problem is the missing g++ compiler. After install a GNU C++ compiler it works now.
Interestingly, when I recompile the whole project from fresh it got the same complain again.
(before I was using cygwin and ubuntu to compile the same project and it was working)

Its been over a year now since the last reply but I think the answer is to use the -l option of g++ to add the directory with the lib to g++'s search paths.

Related

Compiling in using android NDK fails

I was trying to compile Magisk in android studio and it had told me to use the build.py file to build the binarys and so I did.
Except I get this error ALL THE TIME!
Building binaries: magisk magiskinit magiskboot busybox
fcntl(): Bad file descriptor
C:/Users/(name)/AppData/Local/Android/Sdk/ndk/magisk/build//../build/core/build-binary.mk:654: Android NDK: Module magisk depends on undefined modules: cxx
Anyway to fix this?
I did install Cmake for windows and I still can't figure out what cxx might be
The Magisk GitHub repository is, in fact, multiple repositories composed. To download all of them you need to:
git clone --recurse-submodules https://github.com/topjohnwu/Magisk.git
This is mentioned in the readme.md as well as on the GitHub main page: https://github.com/topjohnwu/Magisk

The C compiler "clang.exe" is not able to compile a simple test program

I am trying to compile shell script that compiles the C project library, but i am stuck at this when it comes to compile the nmake part.
I am using NDK 21 and cmake version is 3.10
I am using shell script using bash same as defined here, i want to compress this library as they showing in the docs running ./android.sh
Please check the link: https://github.com/tanersener/mobile-ffmpeg#52-build-scripts
here is the attached log:
DEBUG: Downloading library source: cpu-features
DEBUG: Checking if cpu-features is already downloaded at /d/Bilals/Projects/GithubProjects/mobile-ffmpeg/src/cpu-features
INFO: cpu-features library already downloaded
INFO: cpu-features already downloaded. Source folder found at /d/Bilals/Projects/GithubProjects/mobile-ffmpeg/src/cpu-features
-- Building for: NMake Makefiles
-- Check for working C compiler: D:/Bilals/PcBackupData/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_adf3f\fast"
-- Check for working C compiler: D:/Bilals/PcBackupData/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
CMake Error at D:/Bilals/PcBackupData/sdk/cmake/3.10.2.4988404/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"D:/Bilals/PcBackupData/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/Bilals/Projects/GithubProjects/mobile-ffmpeg/android/build/cpu-features/arm/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_adf3f\fast"
The system cannot find the file specified
Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_adf3f\fast"
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)
-- Configuring incomplete, errors occurred!
See also "D:/Bilals/Projects/GithubProjects/mobile-ffmpeg/android/build/cpu-features/arm/CMakeFiles/CMakeOutput.log".
See also "D:/Bilals/Projects/GithubProjects/mobile-ffmpeg/android/build/cpu-features/arm/CMakeFiles/CMakeError.log".
and here is my environmental variables
You should use Linux Make, not NMake. Generally speaking, these scripts were never tuned to run on Windows, in cygwin or mingw shell, even though I have run them in WSL (Ubuntu) bash.

Compiling FFMpeg for android

A lot of people have mentioned about compiling ffmpeg for android. But I recently tried many of them and did not find them working.
Here is what I tried.
https://github.com/guardianproject/android-ffmpeg-java
but in this I got the following errors.
/home/musil/Desktop/android-ndk-r10c-linux-x86_64/android-ndk-r10c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/home/musil/Desktop/android-ndk-r10c-linux-x86_64/android-ndk-r10c/platforms/android-3/arch-arm -I../x264 -mfloat-abi=softfp -mfpu=neon -mcpu=cortex-a8 -c -o /tmp/ffconf.6LOSva5W.o /tmp/ffconf.YWZ9ftQ8.c
arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
C compiler test failed.
Than I have tried other way mentioned on
http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/
but in that I got the following error.
But in that the prefix install is /usr/local/ instead of ./arm/ and arch is x86 instead of arm. And it compiles but no arm folder is created.
Does anyone know how to compile ffmpeg for ndk-r10c.
Will be very helpful if someone can point out what I am doing wrong or how can I build the ffmpeg 2.4.1 for latest ndk.
Thanks
I am not sure why you see that error. I was able to successfully compile FFMpeg and you should be able to get the .so files for all architecture from this link https://github.com/android-native-libraries

Is there any way to compile ffmpeg library on Windows?

Hi I have been working for weeks to compile ffmpeg library on Windows platform.But I found no way so far.Is it there any way to compile ffmpeg library on Windows 7.
I am using Cygwin on Windows.
Whenever I try to do ndk-build I get this message.
Android NDK: ERROR:jni/yuv2rgb/Android.mk:ffmpeg-prebuilt: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/ffmpeg-build/armeabi/libffmpeg.so exists or that its path is correct
/cygdrive/D/AndroidNDK/android-ndk-r8c/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting . Stop.
& while searching for solution of this error I found that I will have to compile the libraries first.For compiling by using ./build_android.sh. I got this error message.
./build_android.sh
./build_android.sh: line 72: ./configure: No such file or directory
Please please guide me what should I do.

Android NDK : ndk-build building error

I'm starting to use the android ndk (r8c), and for that I have installed a fresh version of Ubuntu 12.10 (32bit)
Problem, whatever I try to build, I got freaky errors that drive me crazy...
~/workspace/Test$ ndk-build
Compile thumb : Test <= Test.c
SharedLibrary : libTest.so arm-linux-androideabi-g++: error:
./obj/local/armeabi/objs/Test/Test.o: No such file or directory make:
* [obj/local/armeabi/libTest.so] Error 1
So here, I try to run ndk-build on a simple hello world in jni. I can't understand the problem, as I thought the ndk-build command was suppose to create Test.o itself...
So I tried the same thing with ndk-r7 (we never know), and it is even uglier...
~/workspace/Test$ ~/Code/android-ndk-r7/ndk-build
Compile thumb :
Test <= Test.c Messages de l'assembleur: Erreur fatale: option -march=
invalide: « armv5te » make: * [obj/local/armeabi/objs/Test/Test.o]
Erreur 1
I can't find any answer that seems to help. (I've also tried to build hello-jni sample the same way, but the output was the same.
Please, someone save my hair... Hope I've been clear enough.
So I decided to reinstall my ubuntu, and it worked well this time.
I still have no idea why it didn't the first time, as I think I have done exactly the same manipulation (I went to Ubuntu 12.04 instead of 12.10 though).

Categories

Resources