Running AOSP on MAC: stdarg.h error - android

I have the source code for android-5.0.0_r7.0.1. After doing:
make -j4
I keep getting this:
error: stdarg.h: No such file or directory
In file included from system/core/include/cutils/log.h:1,
from system/core/include/utils/KeyedVector.h:24,
from frameworks/native/include/input/Input.h:26,
from frameworks/native/include/input/InputDevice.h:20,
from frameworks/native/libs/input/InputDevice.cpp:23:
system/core/include/log/log.h:35:20: error: stdarg.h: No such file or directory
make: *** [out/host/darwin-x86/obj32/EXECUTABLES/validatekeymaps_intermediates/Main.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/darwin-x86/obj32/STATIC_LIBRARIES/libinput_intermediates/Keyboard.o] Error 1
make: *** [out/host/darwin-x86/obj32/STATIC_LIBRARIES/libinput_intermediates/InputDevice.o] Error 1
make: *** [out/host/darwin-x86/obj32/STATIC_LIBRARIES/libinput_intermediates/Input.o] Error 1
#### make failed to build some targets (01:32 (mm:ss)) ####
I have looked at the google groups and other stack overflow questions, but I cannot seem to figure out what is going wrong.

#Meteorite
Well, ultimately after googling I discovered the AOSP for some reason did not support the latest version of Xcode tools and OS X. I dualbooted windows 7 with ubuntu, and did the whole process. And when I did the make command on ubuntu I typed: make -k -i -B. That is, I gave it the keep going, ignore make errors and build unconditionally flags.

Related

How to make openconnect app for android makefile?

How to build openconnect app from makefile on github?
https://github.com/openconnect/openconnect.git
Am I doing the right thing?
cd openconnect/android
make
Error output
ERROR: Unknown option '--system'. See --help for usage.
make: *** [Makefile:83: /home/openconnect/android/x86_64-linux-android/toolchain/.built] Error 1
What to do?

Building libreoffice gives an error and I don't know how to fix it

Build output is:
... very long output of compiled files is omitted...
[MAK] CustomTarget/android/source/done
creating liboSettings.gradle
[build PY ] native-code.cxx
/bin/sh: 1: /home/bart/Projects/libreoffice/solenv/bin/native-code.py: not found
Makefile:15: recipe for target 'native-code.cxx' failed
make[2]: *** [native-code.cxx] Error 127
/home/bart/Projects/libreoffice/android/CustomTarget_lo_android.mk:17: recipe for target '/home/bart/Projects/libreoffice/workdir/CustomTarget/android/source/done' failed
make[1]: *** [/home/bart/Projects/libreoffice/workdir/CustomTarget/android/source/done] Error 2
Makefile:282: recipe for target 'build' failed
make: *** [build] Error 2
I am on Ubuntu 18.04.2 LTS.
My autogen.input is:
--with-distro=LibreOfficeAndroid
--with-android-sdk=/home/bart/Android/Sdk
--with-android-ndk=/home/bart/Android/android-ndk-r20
--with-jdk-home=/usr/lib/jvm/java-8-openjdk-amd64
I have used this page as a manual.
Also, I have noticed that native-code.cxx file is empty in libreoffice/android/source
Ok, figured it out. I didn't had python2 installed on my system (however had python3). Could configure check it?

android kernel source code compilation error

I need to customize the kernel of android to run on my Nexus S.
So I download the kernel with branch name "remotes/origin/android-samsung-2.6.35-gingerbread"
I tried to follow the instruction here http://source.android.com/source/building-kernels.html to build the kernel. To do this, I need the cross compile tool.In my target android source code version android-2.3.5_r1, there is no such tool(no prebuilts/ folder). So I downloaded the version 4.1.2 and set up the tool as path prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin .
Then I tried to build my kernel, but I got the following error:
[root#localhost samsung]# make
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC drivers/gpu/pvr/osfunc.o
In file included from drivers/gpu/pvr/osfunc.c:39:0:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: error: variable 'c' set but not used [-Werror=unused-but-set-variable]
drivers/gpu/pvr/osfunc.c: In function 'OSAccessOK':
drivers/gpu/pvr/osfunc.c:2144:13: error: variable 'linuxType' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[3]: *** [drivers/gpu/pvr/osfunc.o] Error 1
make[2]: *** [drivers/gpu/pvr] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
Should I just disable the "all warnings being treated as errors" to solve it? Or maybe I need a better toolchain?
PS: The tool chain of the master branch and branch 4.2 can not be used by me. Because it looks like they are made for a 64-bit OS while my linux is 32-bit
Do you have the path of ARCH=ARM and TOOLCHAIN pointing to the toolchain in \prebuilts folder?
make ARCH=ARM TOOLCHAIN=\<homeofAOSP>\prebuilt\.. herring_defconfig
make clean before you do the make

Building Pocketsphinx On Android on Windows

I have been following this Building Pocketsphinx on android for days now and I am very confused what to do now. I will be telling what I have done step by step so you will know what I have done wrong.
I am using Windows 7 64-bit.
First of all I have downloaded PocketSphinx and Sphinxbase and I have unpack it in C:\Sphinx. Then I have downloaded mingw from MINGW DOWNLOAD only that. after I downloaded this stuffs, I started the mingw.exe and as a amateur I am, I tried sudo -i only and that did not do anything so I gone to the next instructions installing swig.
I tried typing apt-get install swig and yum install swig as the same as last time it did not work. Then I have tried mingw-get install swig and the result is mingw-get.exe: *** ERROR *** swig: unknown package. So with that I tried again the next intructions installation of sphinxbase.
In installing sphinxbase, I have gone to sphinxbase directory - C:\Sphinx\sphinxbase and I typed ./autogen.sh. So with that it compiled without problems and I typed ./configure It compiled good as well. the next is make this is where I got a problem, it compiled but it got errors. the error is:
make[3]: *** [pio.lo] Error 1
make[3]: Leaving directory `/c/sphinx/sphinxbase/src/libsphinxbase/util`
make[2]: *** [All-recursive] Error 1
make[2]: Leaving directory `/c/sphinx/sphinxbase/src/libsphinxbase`
make[1]: *** [All-recursive] Error 1
make[1]: Leaving directory `/c/sphinx/sphinxbase/src`
make: *** [all-recursive] Error 1
this is the problem I got until now. Then I have tried downloading pio.lo from pio.lo download. So it fix the error but another error appeared. Second Error:
collect2.exe: error: ld returned 1 exit status
make[2]: *** [sphinx_fe.exe] Error 1
make[2]: Leaving directory `/c/sphinx/sphinxbase/src/sphinx_fe`
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/sphinx/sphinxbase/src`
make: *** [all-recursive] Error 1
This is where I got stuck. I have tried copying sphinx_fe from sphinxbase-0.7-win32.zip after doing that nothing happens. The compilation would only delete the sphinx_fe.exe.
My question is What Should I do now?
If it is not clear feel free to comment and ask. Thank you for the help.
MinGW is not supported for now, try to use Cygwin instead.
Actually you don't need to run autogen.sh and make, it's enough to unpack sources
sudo, yum and other commands are Unix only commands, you need to search for their analog on windows.
For more information about SWIG on windows see
http://www.swig.org/Doc2.0/Android.html

Argument list too long - Android 2.2.3_r1 build failed

I have downloaded the android 2.2.3_r1 and set up build environement.
I have made a special change to build the output in the USB drive by adding following line to buildspec.mk file and placing it in the source directory (the file has only that line as I want only to change the out directory).
OUT_DIR:=/media/SHANTHA/ANDROID
The build process is done issuing following commands in order:
source build/envsetup.sh
lunch full-eng
make -j4
When I run make -j4 it ends after fairly long time with following lines at the end of trace.
...
...
target Prelink: libthread_db (/media/SHANTHA/ANDROID/target/product/generic/symbols/system/lib/libthread_db.so)
target StaticLib: libwebcore (/media/SHANTHA/ANDROID/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a)
make: execvp: /bin/bash: Argument list too long
make: *** [/media/SHANTHA/ANDROID/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a] Error 127
make: *** Waiting for unfinished jobs....
shantha#shantha:~/ANDROID_S$
The trace indicates the error as make: execvp: /bin/bash: Argument list too long
It is a great help if someone can help me to solve this.
I had this problem too while building WebKit.
My solution was to download the kernel-sources, change line 14 in include/linux/binfmts.h from
#define MAX_ARG_STRLEN (PAGE_SIZE * 32)
to
#define MAX_ARG_STRLEN (PAGE_SIZE * 64)
compile and install the kernel and reboot.
However, the problem of this solution is that every running process needs more memory. But you could boot this kernel for building android only.

Categories

Resources