[Q] AOSP make error with multi-threading [~solved, sorta] - Android Q&A, Help & Troubleshooting

Update: I have since found a solution to this error... I was using "make -j9 otapackage" and doing "make" instead seems to prevent the error.
===
Old post:
I am new to AOSP building... I first synced the master branch and built it, no issues, then I synced 4.2.1_r1.2 and built that (both for toro), no issues. Then I decided to sync many recent branches going back to 4.0.4... I decided to try and build 4.1.1_r5 since that seems to be what the factory image uses. I recieved the following error:
Import includes file: out/target/product/toro/obj/EXECUTABLES/check_prereq_intermediates/import_includes
Export includes file: build/tools/check_prereq/Android.mk -- out/target/product/toro/obj/EXECUTABLES/check_prereq_intermediates/export_includes
Export includes file: device/samsung/tuna/recovery/Android.mk -- out/target/product/toro/obj/STATIC_LIBRARIES/librecovery_updater_tuna_intermediates/export_includes
Export includes file: device/samsung/toro/recovery/Android.mk -- out/target/product/toro/obj/STATIC_LIBRARIES/librecovery_updater_toro_intermediates/export_includes
make: *** No rule to make target `out/target/product/toro/obj/PACKAGING/updater_extensions_intermediates/register.inc.list', needed by `out/target/product/toro/obj/PACKAGING/updater_extensions_intermediates/register.inc'. Stop.
make: *** Waiting for unfinished jobs....
Export includes file: bootable/recovery/edify/Android.mk -- out/target/product/toro/obj/STATIC_LIBRARIES/libedify_intermediates/export_includes
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
I'm not exactly sure why this happened, any hints anyone can offer will be greatly appreciated. First I had an error regarding some vender proprietary file from the master branch, so I deleted it and re-extracted the 4.1.1 proprietary binaries. Of course I am compiling jro03o while the binaries are jro03h. Maybe I should try it with jro 03r binaries?
I was thinking maybe if I could "unsync" all other aosp branches other than the one I want to build on (4.1.1_r5) that might fix the error due to some mix-matching of files between syncs... Is it possible to "unsync" from aosp branches?
I re-extracted the most recent binaries for 4.2.1 and synced back to the master branch and am rebuilding that one. So far no errors, but won't know until it finishes in an hour or so.

bump...
Since this, I have successfully built and flashed 4.2.1_r1.2, however, now I am trying to syn 4.1.1_r6.1 and getting this same error again. Any ideas?
I decided to try just a simple "make" with no multi-threading to see if that might help, and it definitely created the "out/target/product/toro/obj/PACKAGING/updater_extensions_intermediates/register.inc.list" file.
Any idea why this might happen when using "make -j9 otapackage" as opposed "make"? Is it possible that doing a single-threaded build at first is necessary, then multi-threaded builds after that work. When I first compiled the master branch, I did a single-thread build, and may have done single threaded at first with 4.2.1_r1.2, I can't exactly recall how many single-thread builds I did before I learned about "-j#" option... which VASTLY speeds up my builds to an hour give or take!

Related

[REF][3/28] Compiling Jt1134's AOSP

I compiled this tonight and just have some info if others are interested in it.
Link to ROM thread: http://forum.xda-developers.com/showthread.php?p=12437432#post12437432
Dev machine: newest CentOS x64 on VMWare Workstation 7, about a day old
I already had Git installed, but if you're new to this you'll need it (and some dependencies):
Code:
yum install gettext-devel expat-devel curl-devel zlib-devel openssl-devel
wget http://kernel.org/pub/software/scm/git/git-1.7.4.2.tar.bz2
tar xvfj git-1.7.4.2.tar.bz2
cd git-1.7.4.2
make prefix=/usr/local all
make prefix=/usr/local install
Repo was a new tool to me, so it wasn't installed... If you don't have repo, download/install it using this set of commands:
Code:
curl http://android.git.kernel.org/repo > /usr/bin/repo
chmod a+x /usr/bin/repo
Now that you have repo you can download everything. Make a folder somewhere and cd there (mine is /phone/aosp), then:
Code:
repo init -u git://github.com/jt1134/platform_manifest.git -b froyo
This sets up the folder, but you need to download everything:
Code:
repo sync
Jt1134 had -j40 as a parameter, but this caused a Python error for me and does not appear necessary. This downloads an incredible amount of projects and takes quite a while (over an hour at ~500K/s). It's exciting, how much is involved.
The next two lines are very quick, but I had to install Bison ('yum install bison') first:
Code:
source build/envsetup.sh
lunch full_fascinate-eng
Then the final line to actually build the whole package:
Code:
make -j$(grep processor /proc/cpuinfo | wc -l) bacon && fixzip
From this point forward I'm walking through the errors I encountered and how I fixed them to get to completion:
It failed on first run and I had to install glibc-devel because a 32 bit header file stubs-32.h was missing ('yum install glibc-devel').
It failed on the second run because I did not have 'flex' installed. ('yum install flex').
Third time looked good, compiled a ton of stuff, then bombed because 'libsecril-client.so' was missing. Exact error:
Code:
/phone/aosp/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld:
warning: libsecril-client.so, needed by out/target/product/fascinate/obj/lib/libsecgps.so, not found (try using -rpath or -rpath-link)
It was however found in two places:
Code:
/phone/aosp/vendor/samsung/vzwtab/proprietary/lib/libsecril-client.so
/phone/aosp/vendor/samsung/fascinate/proprietary/lib/libsecril-client.so
So what I did is copy it to the output folder (not the optimal solution I'm sure, but it worked):
Code:
cp vendor/samsung/fascinate/proprietary/lib/libsecril-client.so out/target/product/fascinate/obj/lib/
Fourth time through it continued on an compiled a ton of projects, and then... 'gperf' command not found. ('yum install gperf')
Fifth time, I actually went to sleep during this one , woke up to this error:
Code:
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
I fixed this with 'yum install ncurses-devel' and let the process continue, and shortly afterwards got another error:
Code:
In file included from external/qemu/android/skin/window.c:19:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55:22: error: X11/Xlib.h: No such file or directory
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:56:23: error: X11/Xatom.h: No such file or directory
I fixed this with 'yum install libX11-devel' and off we go again... a new error!:
Code:
/usr/bin/ld: cannot find -lhistory
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/sqlite3_intermediates/sqlite3] Error 1
This was fixed by running 'yum install readline-devel' and we're back to a lot more compiling...
Success!! full_fascinate.zip is in the root folder, ready to be moved to the phone.
Hope someone might find this helpful or interesting... let me know if there's anything I can do to make it better!
What dev environment do you guys use to edit these files?
Do you just keep recompiling them and running the rom using the SDK virtual phone?
I'm an experienced developer but I am only familiar with windows development but want to get into some apps development soon.
Eclipse is rather popular.
Sent from my SCH-I500 using XDA App
I'm using Eclipse, run them on the phone for testing, and haven't done much yet.
Would other developers be willing to chime in with their advice/preferences on the whole process? Thanks!
-j40 is only to parallelize the tasks (up to 40 threads I believe) so it's not strictly necessary.
By the way, all the dependencies to build android should be on here: http://source.android.com/source/download.html
And @SmokeyDP, you don't need to build your own version of the OS to write apps, so these instructions aren't really relevant for that if that's all you want to do. Eclipse is probably the most common IDE for Android app development because that's what Google supports directly, but I've heard that IntelliJ IDEA also has nice Android support and just lacks a GUI builder. I've recently switched to IDEA for other Java development and it's a lot faster and more refined than eclipse, so I would suggest trying that if you're going to start learning because you won't be used to either eclipse or IDEA and can choose which one seems the best to you.
I realize you don't need to rebuild the OS to develop an app, but I was asking about developing both since I imagine it's the same IDE and I was curious. Thanks for the info.
SmokeyDP said:
I realize you don't need to rebuild the OS to develop an app, but I was asking about developing both since I imagine it's the same IDE and I was curious. Thanks for the info.
Click to expand...
Click to collapse
Unless you're going to be using the NDK to write apps, you're not going to be using C, which is what the Linux Kernel is written in... and Eclipse's support for C is a lot poorer than its support for Java (honestly, I can't stand its support for either, its interface is quite the unorganized mess, IMO). I, personally, use a different set of tools for each language/toolkit I use, as each have their pros and cons.

(Q) First time Compiling

Ok, I setup my 2 build boxes. One Ubuntu 11.10x64 and one Mint 11x86. Installed required packages and downloaded multiple toolchains. I have tried compiling on both machines and on both I get the same errors.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
make: *** Waiting for unfinished jobs....
CHK include/linux/version.h
I have tried make thunderc_perf_defconfig and get the same error. Copied .config from device dropped into source, same error.
Any ideas on what is going on? I'm new to this so any help would be great.
I don't known, maybe gcc
try checking your mount options?
Nope its not gcc; as I said I have installed all required packages including gcc + bison etc. My mount options? Is that the "export ARCH=arm" ? Where I have to set the default compiler? I'm new to the newer flavors of linux. The last distro I used was Mandrake 7.1 ;-) Now I am testing this on 2 builds; an x64 Ubuntu and a x86 Mint(Which is Ubuntu). I have to be missing something on both, but I have followed tutorials guides to the T and still get this error. I get more errors than this by the way. The compiler kicks back Kconfig saying unexpected line of code.
SgtPropain said:
Ok, I setup my 2 build boxes. One Ubuntu 11.10x64 and one Mint 11x86. Installed required packages and downloaded multiple toolchains. I have tried compiling on both machines and on both I get the same errors.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
make: *** Waiting for unfinished jobs....
CHK include/linux/version.h
I have tried make thunderc_perf_defconfig and get the same error. Copied .config from device dropped into source, same error.
Any ideas on what is going on? I'm new to this so any help would be great.
Click to expand...
Click to collapse
I ran a search on your error message about the missing rule to make auto.conf and found this:
https://bbs.archlinux.org/viewtopic.php?id=99089
It relates to the other poster's comment about checking your mount options. It's a short process to fix it.
And if it doesn't work maybe it will at least give you a new error message to research.
glarepate said:
I ran a search on your error message about the missing rule to make auto.conf and found this:
https://bbs.archlinux.org/viewtopic.php?id=99089
It relates to the other poster's comment about checking your mount options. It's a short process to fix it.
And if it doesn't work maybe it will at least give you a new error message to research.
Click to expand...
Click to collapse
just as i thought. that might have happened. its worth a try though.
SgtPropain said:
Nope its not gcc; as I said I have installed all required packages including gcc + bison etc. My mount options? Is that the "export ARCH=arm" ? Where I have to set the default compiler? I'm new to the newer flavors of linux. The last distro I used was Mandrake 7.1 ;-) Now I am testing this on 2 builds; an x64 Ubuntu and a x86 Mint(Which is Ubuntu). I have to be missing something on both, but I have followed tutorials guides to the T and still get this error. I get more errors than this by the way. The compiler kicks back Kconfig saying unexpected line of code.
Click to expand...
Click to collapse
Wrong...
Because you don't have .config file in the source. If you are building kernel from source, you must have the kernel config. That kernel config can be shared in the source code, it depends on that kernel developer, he can shared it in arch/arm/config, access to there then find that kernel defconfig. Or you can get the kernel config of that kernel with another method, but this method just can be applied if the kernel you want to build is for our device: flash that kernel then go to terminal then type:
Code:
su
(Accept the super user)
Code:
cp /proc/config.gz /sdcard
If it show "No such file or directory found" so you should ask that kernel developer for their .config.
If it doesn't show anything, go to sdcard and find if there is a file that named config.gz, it's the kernel config. Get back to terminal then type:
cd /sdcard
gunzip config.gz
Voila!
I actually tried that already.... I have been at this for about three days. XDA was my last resort as I like to figure things out on my own. However I'm stuck @ a brick wall. I have edited /etc/fstab and removed the bs mount options..remounted same error. Mind you I'm doing most of this from a Virtual Environment. Starting to think this is my issue, but it doesn't explain the same error on machine #2. Maybe I'm doing it right, possibly a bad git clone?
thachtunganh said:
Wrong...
Because you don't have .config file in the source. If you are building kernel from source, you must have the kernel config. That kernel config can be shared in the source code, it depends on that kernel developer, he can shared it in arch/arm/config, access to there then find that kernel defconfig. Or you can get the kernel config of that kernel with another method, but this method just can be applied if the kernel you want to build is for our device: flash that kernel then go to terminal then type:
Code:
su
(Accept the super user)
Code:
cp /proc/config.gz /sdcard
If it show "No such file or directory found" so you should ask that kernel developer for their .config.
If it doesn't show anything, go to sdcard and find if there is a file that named config.gz, it's the kernel config. Get back to terminal then type:
cd /sdcard
gunzip config.gz
Voila!
Click to expand...
Click to collapse
Yeah that would be great if I hadn't done that already. In my post I stated I had replaced the .config from my device. I have literately tried everything but doing this from base. IE not from a VM. I appreciate the help but its a "no go".
Beginning of my .config for proof
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.9-ck2
# Wed Apr 11 20:41:44 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_CPUFREQ=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y
Setting up a third independent machine Ubuntu x86 testing..
where do you get that .config from?
pull /proc/config.gz
SgtPropain said:
pull /proc/config.gz
Click to expand...
Click to collapse
What device are you using, and what kernel are you using.
for the time being you can use prebuilt kernel...no need to build kernel from source....
williamcharles said:
for the time being you can use prebuilt kernel...no need to build kernel from source....
Click to expand...
Click to collapse
He isn't building ROM from source. He is learning how to build a kernel from source.
Sorry for the delay; had 2 deaths in the family.
I setup my third box and again I get the same results. I really don't know where I'm going wrong. This kinda makes me lean to, I have bad source code. I'm no pro C programmer; however when building I get Kconfig errors. I opened said file and the comments look all messed up. The compiler I think is reading the comments as code and kicking it back giving me this error.
by the way what are you compiling and please teach me compiling i want to learn it .
I'm compiling a modified kernel for the Optimus V. I can't teach you how to compile because I don't even know if I'm doing it right.

No system.img when building AOSP full-eng

EDIT: I don't know why but I rerun the below commands and It worked. I wanted to delete this thread, but Edit/Delete just allows me to edit :/
Hi, I was building android from AOSP and followed the instructions at source.android.com.
But I find no system.img in out/ subdirectories.
I used this commands to build it:
Code:
. build/envsetup.sh
lunch full-eng
nohup make -j8 &
I looked at log file nohup.out for errors but I found no one. The building process ended like this:
Code:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
target Dex: android.core.tests.libcore.package.org.no-core-tests-res
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
target Dex: android.core.tests.libcore.package.sun.no-core-tests-res
make: *** [out/target/common/obj/APPS/android.core.tests.libcore.package.com.no-core-tests-res_intermediates/noproguard.classes-with-local.dex] Killed
make: *** Waiting for unfinished jobs....
make: *** [out/target/common/obj/APPS/android.core.tests.libcore.package.org.no-core-tests-res_intermediates/noproguard.classes-with-local.dex] Killed
make: *** [out/target/common/obj/APPS/android.core.tests.libcore.package.libcore.no-core-tests-res_intermediates/noproguard.classes-with-local.dex] Killed
DroidDoc took 299 sec. to write docs to out/target/common/docs/api-stubs
DroidDoc took 483 sec. to write docs to out/target/common/docs/doc-comment-check
What have I done wrong? Is there some step I missed?
PD: Attached is the log of the whole building process.
Thanks.

[Q] Make dist build from AOKP source

Hello there,
I am trying to build a custom ROM for Samsung P3113 based on AOKP source on the jb branch. I was able to make "unofficial" release using "brunch aokp_p3113". However, when I attempted to make a distribution release, the "make -j4 dist" failed. The following are the commands I used:
. build/envsetup.sh
lunch aokp_p3113-userdebug
make -j4 dist
I got the following error messages:
device/moto/stingray/recovery/recovery_ui.cpp:22:20: fatal error: device.h: No such file or directory compilation terminated.
make: *** [out/target/product/p3113/obj/STATIC_LIBRARIES/librecovery_ui_stingray_intermediates/recovery_ui.o] Error 1
Can someone help? By the way, I don't need to build OTA package.
Found root cause
Found the root cause -
All the three header files needed by recovery_ui.cpp are missing. To workaround, I excluded the stingray recovery from the make, and the problem solved.
Hopefully, someone in the AOKP team will add the missing files to repository.

Troubles while building custom CM(13) for kccat6xx

Ok so I searched for quite a while now and fixed few issues but I don't seem to be able to fix this one.
I'm trying to build a custom CM for kccat6xx(roughly a Samsung Galaxy S5+), beeing my first time I'd assume I'll run into some problems but I think I got more than enough to post here.
Lil' summary:
I followed normal CM guide for klte(since those devices works more or less the same way I'd assume the guide would be more or less the same), I synced and all, got android SDK, OpenJDK(which was quite annoying since first sync was detecting my computer as a MAC while running Gentoo Linux, got fixed in a sync the day after tho) made custom local manifest and made the pre-build thingies
I ran into a first issue at that point, considering libinit_msm or so that was removed from qcom_common in latest commits, had to reverse it to make the build works(dirty but eh, works at least) and after that got several issues that I won't list here that I, for the most fixed.
Then I ran on the issue I'm stuck in for about a day now
Code:
make: *** No rules to make target «*/home/govanify/android/system/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/R.stamp*», needed for «*/home/govanify/android/system/out/target/common/obj/APPS/BasicDreams_intermediates/src/R.stamp*»
I tried to edit out BasicDreams, just in case, but then Bluetooth would block. Knowing it is just after BasicDreams in the alphabet I figured out it'll do it for all packages. So then I tried to manually build vendor/cmsdk/cm/res and got this issue:
Code:
make: *** No rules to make target «*/home/govanify/android/system/out/host/linux-x86/bin/acp*», needed for «*/home/govanify/android/system/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/R.stamp*»
I continued then by trying to compile frameworks/base, but of course:
Code:
make: *** No rules to make target «*/home/govanify/android/system/out/host/linux-x86/bin/aidl*», needed for «*/home/govanify/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/accessibilityservice/IAccessibilityServiceConnection.java*»
So I finally tried to build aidl manually, but then again:
Code:
make: *** No rules to make target «*/home/govanify/android/system/out/host/linux-x86/obj/lib/libc++.so*», needed for «*/home/govanify/android/system/out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl*»
I figured out it'll be endless so I stopped here and tried to do a global make of Cyanogen, maybe it'll integrate dependencies after all
But as you already imagined:
Code:
make: *** Aucune règle pour fabriquer la cible «*/home/govanify/android/system/out/target/common/obj/JAVA_LIBRARIES/tcmiface_intermediates/classes.jar*», nécessaire pour «*/home/govanify/android/system/out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/classes-full-debug.jar*». Arrêt.
So yeah, help would be very much appreciated, if you want to replicate the issue grab my manifest here: githubDOTcom/GovanifY/main_kccat6xx/blob/master/kccat6xx.xml (I have less than 10 post so unfortunatelly no link) repo sync and a brunch kccat6xx should do the work. You don't need afaik vendor bins since the bin step is not even started at that point, so I guess build should run into the issue smoothly.
Thanks a lot for any help once again, I'm really running out of ideas on that one
Seems like this got fixed by a mma -B in res folder, thanks ciwrl and Decad3nce from #cyanogen-dev for pointing me out!
Edit: res builds correctly but build still fails so issue still open
Last answer to this post: Issue was with a multi-thread error of CyanogenMod build system itself. Getting on a clean ubuntu install fixed this issue(got others in the meanwhile but I was able to build the ROM at the end, still having major issues tho)
I have cyanogen 13 on samsung s5 i have these problems..Help me to fix them
1.When i unistall a app it reboots with out permision or anything and the app is not deleted
2. When i press security settings it says'Unfortunately,Settings has stopped.'

Categories

Resources