Android Opensource Project build error `FAILED: out/soong/build.ninja` - android

I became interested in the Android's source code. I precisely repeated all the steps from the official guide source.android.com to compile it.
I tried to compile it and I got:
... error while loading shared libraries: libncurses.so.5: cannot open shared
object file: No such file or directory
To fix it:
Arch: Enable multilib,sudo pacman -S lib32-ncurses
Ubuntu: sudo apt install libncurses5:i386
Then i tried to compile again
Next time i got no errors messages except exit status 1
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b
out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build
-globs.ninja -o out/soong/build.ninja Android.bp
21:03:08 soong bootstrap failed with: exit status 1
#### failed to build some targets (24:14 (mm:ss)) ####
When there are no error messages, I can't guess what's the matter
But i know, what:
This error is independent of linux distribution
Deleting and downloading all sources again cannot fix this error
Before I get this error, my computer freezes

It seems that your ninja process is getting killed. That's probably because it tries to use too much RAM: we currently allow ~3.5GB RAM per workspace, so the Linux OOM-killer will kill any process that makes your workspace use more than that.
In order to use less RAM, could you please try building with fewer processes? E.g. with:
$ make -j2 aapt

Related

webrtc_android native api not find the AppRTCMobile example

I'm on ubuntu 16.04 and try to install on my lollipop 5.1 tablet, native api webrtc example (AppRtcMobile example).
I successfully installed chromium on my lollipop device. Now after removing the folders used to install chromium on the lollipop device from the ubuntu pc I'm trying to compile an example project about webrtc using the grandle system or adb at the command line. But the compilation always stops at the same point.
Unfortunately, I'm new to git, ninja, fetch and gn, so I do not understand where the error is.
I follow the procedure that I describe below (as I understand that the commands work) and create 3 different installation directories so as to install even on devices other than "arm".
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/my-path/to/depot_tools
mkdir ~/webrTEST && cd ~/webrtcTEST
fetch --nohooks webrtc_android
gclient sync
./build/install-build-deps.sh
gn gen out/DebugArm --args='target_os="android" target_cpu="arm"'
gn gen out/DebugArm64 --args='target_os="android" target_cpu="arm64"'
gn gen out/DebugX64 --args='target_os="android" target_cpu="x64"'
ninja -C out/DebugArm
ninja -C out/DebugArm64
ninja -C out/DebugX64
. build/android/envsetup.sh
ninja -C out/DebugX64 AppRTCMobile
I try to study more than one "tutorial" and the offial guide too, but ninja retur everytime the same result:
myuser#mymachine:~~/webrtcTEST/src$ ninja -C out/DebugX64 AppRTCMobile
ninja: Entering directory `out/DebugX64'
ninja: no work to do.
Anyone can suggest my where is/sre my error?
regards
bkt
UPDATE:
using ls command not find AppRTCMobile but other app example or other ...
the command:
ninja -C out/DebugX64 :xxxx/xxxx/xxxx
work great ... so at these point the question change into:
where is the old AppRTCMobile example located or which is the new name of the example that allows me to android lollipop to use the server google appr.tc ??
Any how if in my manner of install the webrtc-android git there are some error please help my to find it.
regards
bkt
I did not understand the reason, but by deleting everything and re executing the procedure written in the application I got the desired result and I compiled AppRTCMobile.

Error with compiling and source code(AOSPA)

When I compiling the AOSPA ROM, it always stopped with following massage:
make: *** No rule to make target 'out/target/product/nx529j/obj/SHARED_LIBRARIES/libqdutils_intermediates/export_includes', needed by 'out/target/product/nx529j/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/import_includes'. Stop.
I have tried to find solution on Google, github and XDA-Developers forum, but I can't found any solutions .
Wha shoi I do?
Solution is Simple but no perfect:
$ pushd out/target/product/nx529j/obj/SHARED_LIBRARIES/
$ mkdir libqdutils_intermediates
$ touch libqdutils_intermediates/export_includes
$ popd
Do not clear cache or delete the out/ folder, just try to build (bruch/make/launch) again .
The reason for this error is missing libqdutils.so , the one you can pull from device. The solution above just for showing up the missing libqdutils.so error for you in next build you try.
Once you encounter missing libqdutils.so error, just (be sure android device connected to pc for adb):
$ pushd ./vendor/{manufacturer}/{device}/proprietary/
$ adb pull /system/lib/libqdutils.so ./
$ popd
Reference:
https://forum.xda-developers.com/showthread.php?t=2357126
https://forum.xda-developers.com/showthread.php?t=2754997&page=147

How to fix cannot find libgcc.a: No such file or directory error

I'm trying to make a standalone compile of the kernel for my android phone, using Google Toolchain, and have already tried Uber and linarc.
All of them give the same error, which I don't understand:
/home/aayushgupta219/kernel/toolchain64/bin/aarch64-linux-android-ld: cannot find libgcc.a: No such file or directory
/home/aayushgupta219/kernel/toolchain64/bin/aarch64-linux-android-ld: cannot find libgcc.a: No such file or directory
Makefile:814: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
Here is a copy of the source.
Here is a copy of the logfile
OK. In case anyone is having same error and finding no fix here is my own fix for it. I was on Ubuntu 16.04 having gcc5 and was getting this error. I upgraded to Ubuntu 17.04 with gcc6 preinstalled and now no more such errors.
-Fist of all
use command
gcc -m32 -print-libgcc-file-name.
then use
sudo apt-get install -y build-essential gdb git vim
sudo apt-get install gcc-multilib
if it dosent work.
-Second
gcc -m32 -print-libgcc-file-name will give you a path that include libgcc.a.
just copy that to this place.
that path is /usr/lib/gcc/x86_64-linux-gnu/7/32/libgcc.ain my computer
use cp /usr/lib/gcc/x86_64-linux-gnu/7/32/libgcc.a ./

Tool unzip is missing, buildozer, kivy

I am new to kivy, and try to build an app for android using kivy.
When i was creating an apk for the app
buildozer android debug
with log_level=2
it shows:
Tool unzip is missing
Command failed: ./distribute.sh -m "kivy" -d "kivytut"
Buildozer failed to execute the last command
The error might be hidden in the log above this error
Please read the full log, and search for it before
raising an issue with buildozer itself.
In case of a bug report, please add a full log with log_level = 2
I'm unable to find any tool called upzip for buidozer(python-for-android) on the internet.
Help.
install unzip using:
sudo apt-get install unzip
moreover following are the tools that must be installed:
git
ant
python2
cython (can be installed via pip)
a Java JDK (e.g. openjdk-7)
zlib (including 32 bit)
libncurses (including 32 bit)
unzip
virtualenv (can be installed via pip)
ccache (optional)
These are several dependencies for python-for-android

NDK build error with cygwin

i am tying to build a tesseract project to use as a library for my project. I am getting this error with cygwin when trying to build on windows 7 with User Account Controls turned off.
$ /cygdrive/c/android-ndk-r8/ndk-build
SharedLibrary : liblept.so
C:/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libgnustl_static.a: No such file: Permission denied
collect2: ld returned 1 exit status
/cygdrive/c/android-ndk-r8/build/core/build-binary.mk:369: recipe for target `obj/local/armeabi/liblept.so' failed
make: *** [obj/local/armeabi/liblept.so] Error 1
please let me know what i should do to build the project.
Sorry It's my first time answering a question.
I was having a same issue as yours.
Then I solve it using cygwin bash with command: $ chmod -R 777 /cygdrive/c/android/workspace
C:/Android/workspace is my Eclipse work space.
Some one here gave me the insight
A lot of people have struggled with compiling tesseract under Windows, and Cygwin is normally suggested, however its often not necessary.
Have you tried looking at the tess-two project on github? Its tesseract wrapped with some handy android classes, compiling a running is simply a case of :
git clone git://github.com/rmtheis/tess-two tess
cd tess
cd tess-two
ndk-build
android update project --path .
ant release
I've been able to compile the above on 3 windows7 machines, a mac, and ubuntu without any issues.
if you're developing under windows, go to the file, and change it's premissions to full control.
it will be in /obj dir

Categories

Resources