I am using this repository to build ffmpeg static library which includes x264,libpng and others, please
visit this link https://github.com/writingminds/ffmpeg-android
i am using windows 7 as host and ubuntu 15.10 (_64) as guest os using VMware Workstation 12 and
Android-ndk-r11b-linux-x86_64
i do have Prebuilt libraries , but now i want it without PIE support
i am getting this error in config.log in x264 folder while building
through
./android_build.sh
here is the log :
x264 configure script
Command line options: "--cross-prefix=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/arm-linux
/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-gcc
checking whether /mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-gcc
--sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot works... no
Failed commandline was:
--sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot conftest.c -Wall -I. -I$(SRCPATH) --sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot --sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot -lm -o conftest
/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: fatal error:
conftest: Input/output error
Failed program was:
int main (void) { return 0; }
DIED: No working C compiler found.
ushare is my shared folder between windows and ubuntu
I have spend almost a week ,trying to solve every error i get.
these errors are like never ending , 1 solution give 10 more errors
i have researched a LOT for this library
thanks a lot in advance.
Also i thought that x264 library might have poroblem ,so i tried to disable it
but next library "libpng" also had Same log Error
i think problem is in Input/output error (obviously)
this line in log kind of confuses me (those /../../)
/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: fatal error:
its like two folder overlaping address...
thanks a lot in advance.
please don't go harsh on me ,its my first time,all thanks to this thing...
Well i solved my problem. the problem was in NDK ,i extracted it in windows and was using it on ubuntu. Later i used ubuntu to extract ,and found the built to be working.
hope this help to new future users!
Related
I downloaded the source code for Android 11 for Tinker Board (S) R2.0 and Tinker Board 2/2S, from this link https://github.com/TinkerBoard/TinkerBoard/wiki . I tried to build the code using these commands given (in same link) :
source build/envsetup.sh
lunch WW_Tinker_Board_2-userdebug
./build.sh -UCKAu
during last step I got this error and it said build kernel failed. I don't know what to do, any help is appreciated,build failed error cause of error (probably)
I am new to android and I don't know what I can try to solve this problem.
Edit after comment :
I ran on wsl Ubuntu 22.04LTS, I have 200GB left after downloading the source code
I have a Problem on an emulated Android device. To be honest on every emulated Android Device. There is a mutex test from Android Bionic. It could be found under:
https://android.googlesource.com/platform/system/extras/+/froyo/tests/bionic/libc/bionic/test_mutex.c
So, when compiling this with CMake and the Android Toolchain for Android x86 or x86_64 it compiles fine.
Altough, when running the file it throws an error in line 90:
expect( pthread_mutex_trylock( &lock ), EDEADLK );
The error message:
generic_x86_arm:/data/local # ./test_mutex
/home/tjk/coding/oorexx/mutex/test_mutex.c:80: call returned 16 instead of 35: pthread_mutex_trylock( &lock )
If I delete this on line everything is fine and I get an "ok". Thats not a solution because I'm working on a big project and debugging tells me that there are problems and its very likely that the trylock function is the reason for that. So I need to fix that. The mutex test has to work.
What can I do? What could be the reason for that? Is it the device? Is it the Android Toolchain or is there something wrong with my CMake Command? My CMake Command:
cmake -H./ -B./build2 -DANDROID_NDK=~/coding/android-ndk-r22b/ -DCMAKE_TOOLCHAIN_FILE=~/coding/android-ndk-r22b/build/cmake/android.toolchain.cmake -DANDROID_ABI="x86" -DCMAKE_BUILD_TYPE=Release \ (base)
-DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DANDROID_NATIVE_API_LEVEL=30
The CMakeLists.txt:
cmake_minimum_required(VERSION 3.6.0)
project(test_mutex)
add_executable(test_mutex test_mutex.c)
I would really appreciate any useful tips. Thank you!
Best Regards Thomas
While installing NVidia Android CodeWorks I have received an error at the very end of the installation process saying :
installing compile samples 4.0 failed nvidia
Return Code: 2Compile Samples failed. Please check the /home/user/NVPACK//_installer/compile.log. You can send it to TegraDeveloperPack-Users#nvidia.com if you can not resolve it.
Does anyone know how to solve this problem please
So that other people having the same problem might go on something for I have not found an optimal solution to this problem.
I have managed to solve it by simply copying my version of jdk (which is jdk1.8.0_101) to the specified Nvidia Codeworks folder and renaming to the one missing in the log (...\Nvidia\Codeworks_installer\compile.log - \Nvidia\Codeworks\jdk1.8.0_77" does not exist.) In my case it compiled successfully, however it must be noted that this is not a good solution. Messing around with the environment valuables might be a reasonable place to start otherwise.
If your log file shows:
Error: JAVA_HOME is not defined correctly.
make: *** [antbuild_Basic_debug] Error 1
We cannot execute /usr/bin/java
Makefile.Basic.mk:92: recipe for target 'antbuild_Basic_debug' failed
you can fix it by creating a soft link like this:
sudo ln -s $JAVA_HOME/bin/java /usr/bin/java
I am trying to compile some source code but when i run the command
make -f android-9-armv7.mk
I get the following error
android-9-armv7.mk:1: * missing separator. Stop.
This is the contents of the file above:
And I have set the IMAGINE_PATH variable as well, cant seem to figure it out.
link ../imagine/make/shortcut/common-builds/android-9-armv7.mk
Compiling instructions
http://code.google.com/p/emu-ex-plus-alpha/wiki/Compiling
Imagine is locaed at C:/Imagine
I don't know where you've taken the sources, but all the android-9-armv7.mk files from different projects on that git has following content:
../imagine/make/shortcut/common-builds/android-9-armv7.mk
...there is no link keyword, which probably is why you get this error.
Also, please be informed that you're building this on Windows machine while documentation clearly states that it's supported only on Linux and Mac OS X.
Hi
I'm in need to build OpenSSL lib for Android NDK r5b, today it will be second day of my ... useles fight. Here is short list what i've done
Downloaded: https://github.com/fries/android-external-openssl/
As i found here on StackOverflow fixed .S <->.s problem
Crypto gets builded... until i get this message:
/prebuilt/windows/bin/arm-linux-androideabi-
SharedLibrary : libcrypto.so
arm-linux-androideabi-g++.exe: CreateProcess: No such file or directory
make: * [/cygdrive/c/AndroidDev/AndroidOpenSSL/obj/local/armeabi/libcrypto.so]
Error 1*
It's 10 years when i last time used make, and i was sure it's problem with g++ path. Added some debug to toolchain, and got:
TOOLCHAIN_NAME: arm-linux-androideabi-4.4.3
TOOLCHAIN_PREFIX: /cygdrive/c/Android_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-
both looks fine for me, as /cygdrive/c/Android_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/ does exist, and arm-linux-androideabi-g++.exe is right there :(
Any one ever had this same problem? I realy have no idea where to look any future :(
Will be appreciative for help
One solution is also to shorten the openssl build path, eg. from c:\code\openssl-android to just c:\ssl
Looks like only i had such problem. Here is a solution i found, mayby someone will figure out why this happend.
Saved command line to separate file called bild_data (output from ndk-build), then removed from it g++ call, this way my build file had only list of files and needed flags. Then i just executed from cygwin arm-linux-androideabi-g++ #build_data
After that i had my 'precious' libcrypto.so, ndk-build executed again with libcrypto.so alerdy builded from command line, builded openssl library.
For me it looks like command line that was over 31kb did not fit to cygwin buffer :(
I had the same problem building on Windows (cygwin), and shortening the path to the project directory (see mango's answer) is what worked for me.