# [Q] Compiling for Toro Errors..



## airforcegeek (Nov 17, 2011)

Alright, so for about the last week, I've tried different distro's, linux mint 13, fedora 17, and ubuntu 12.04 LTS trying to compile AOSP for Toro (VZW Nexus). I've been working with Drod2169 trying to get my setup going but had many problems. Now I'm stuck. So here I am.

When I do a : . build/envsetup.sh lunch	full_toro-userdebug and go to do a make -j4

I get this :


```
<br />
============================================<br />
PLATFORM_VERSION_CODENAME=REL<br />
PLATFORM_VERSION=4.1.1<br />
TARGET_PRODUCT=full_toro<br />
TARGET_BUILD_VARIANT=userdebug<br />
TARGET_BUILD_TYPE=release<br />
TARGET_BUILD_APPS=<br />
TARGET_ARCH=arm<br />
TARGET_ARCH_VARIANT=armv7-a-neon<br />
HOST_ARCH=x86<br />
HOST_OS=linux<br />
HOST_OS_EXTRA=Linux-3.2.0-29-generic-x86_64-with-Ubuntu-12.04-precise<br />
HOST_BUILD_TYPE=release<br />
BUILD_ID=JRO03R<br />
OUT_DIR=out<br />
============================================<br />
[email protected]:~/WORKING_DIRECTORY$ make clean -j4<br />
============================================<br />
PLATFORM_VERSION_CODENAME=REL<br />
PLATFORM_VERSION=4.1.1<br />
TARGET_PRODUCT=full_toro<br />
TARGET_BUILD_VARIANT=userdebug<br />
TARGET_BUILD_TYPE=release<br />
TARGET_BUILD_APPS=<br />
TARGET_ARCH=arm<br />
TARGET_ARCH_VARIANT=armv7-a-neon<br />
HOST_ARCH=x86<br />
HOST_OS=linux<br />
HOST_OS_EXTRA=Linux-3.2.0-29-generic-x86_64-with-Ubuntu-12.04-precise<br />
HOST_BUILD_TYPE=release<br />
BUILD_ID=JRO03R<br />
OUT_DIR=out<br />
============================================<br />
Checking build tools versions...<br />
Entire build directory removed.<br />
[email protected]:~/WORKING_DIRECTORY$ make -j4<br />
============================================<br />
PLATFORM_VERSION_CODENAME=REL<br />
PLATFORM_VERSION=4.1.1<br />
TARGET_PRODUCT=full_toro<br />
TARGET_BUILD_VARIANT=userdebug<br />
TARGET_BUILD_TYPE=release<br />
TARGET_BUILD_APPS=<br />
TARGET_ARCH=arm<br />
TARGET_ARCH_VARIANT=armv7-a-neon<br />
HOST_ARCH=x86<br />
HOST_OS=linux<br />
HOST_OS_EXTRA=Linux-3.2.0-29-generic-x86_64-with-Ubuntu-12.04-precise<br />
HOST_BUILD_TYPE=release<br />
BUILD_ID=JRO03R<br />
OUT_DIR=out<br />
============================================<br />
Checking build tools versions...<br />
find: `src': No such file or directory<br />
PRODUCT_COPY_FILES device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml ignored.<br />
PRODUCT_COPY_FILES frameworks/base/data/sounds/F1_MissedCall.ogg:system/media/audio/notifications/F1_MissedCall.ogg ignored.<br />
<br />
PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressSpacebar.ogg:system/media/audio/ui/KeypressSpacebar.ogg ignored.<br />
PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressDelete.ogg:system/media/audio/ui/KeypressDelete.ogg ignored.<br />
Note: Some input files use or override a deprecated API.<br />
Note: Recompile with -Xlint:deprecation for details.<br />
4 errors<br />
host C: libcutils <= system/core/libcutils/tztime.c<br />
make: *** [out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar] Error 41<br />
make: *** Waiting for unfinished jobs....<br />
system/core/libcutils/tztime.c: In function 'differ_by_repeat':<br />
system/core/libcutils/tztime.c:303:2: warning: comparison is always false due to limited range of data type [-Wtype-limits]<br />
system/core/libcutils/tztime.c: In function 'localsub':<br />
system/core/libcutils/tztime.c:1267:24: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]<br />
[email protected]:~/WORKING_DIRECTORY$<br />
```
There was a lot more but I couldnt post it all. I omitted a bunch of ignored this ignored that stuff.. My biggest issue is the error right off the bat, the "find: `src': No such file or directory".

I read online that its because of a setup_fs that is referenced twice in device tree. so i did a
grep -R setup_fs *

and got


```
<br />
[email protected]:~/WORKING_DIRECTORY$ cd device<br />
[email protected]:~/WORKING_DIRECTORY/device$ grep -R setup_fs *<br />
grep: asus/grouper/.git/packed-refs: No such file or directory<br />
grep: asus/grouper/.git/svn: No such file or directory<br />
asus/grouper/init.grouper.rc:service setup_fs /system/bin/setup_fs \<br />
asus/grouper/device.mk:	setup_fs \<br />
grep: common/.git/packed-refs: No such file or directory<br />
grep: common/.git/svn: No such file or directory<br />
grep: generic/armv7-a/.git/packed-refs: No such file or directory<br />
grep: generic/armv7-a/.git/svn: No such file or directory<br />
grep: generic/goldfish/.git/packed-refs: No such file or directory<br />
grep: generic/goldfish/.git/svn: No such file or directory<br />
grep: generic/armv7-a-neon/.git/packed-refs: No such file or directory<br />
grep: generic/armv7-a-neon/.git/svn: No such file or directory<br />
grep: google/accessory/arduino/.git/packed-refs: No such file or directory<br />
grep: google/accessory/arduino/.git/svn: No such file or directory<br />
grep: google/accessory/demokit/.git/packed-refs: No such file or directory<br />
grep: google/accessory/demokit/.git/svn: No such file or directory<br />
grep: moto/wingray/.git/packed-refs: No such file or directory<br />
grep: moto/wingray/.git/svn: No such file or directory<br />
grep: moto/stingray/.git/packed-refs: No such file or directory<br />
grep: moto/stingray/.git/svn: No such file or directory<br />
grep: moto/common/.git/packed-refs: No such file or directory<br />
grep: moto/common/.git/svn: No such file or directory<br />
grep: sample/.git/packed-refs: No such file or directory<br />
grep: sample/.git/svn: No such file or directory<br />
grep: samsung/tuna/.git/packed-refs: No such file or directory<br />
grep: samsung/tuna/.git/svn: No such file or directory<br />
samsung/tuna/init.tuna.rc:service setup_fs /system/bin/setup_fs \<br />
samsung/tuna/device.mk~: setup_fs<br />
samsung/tuna/device.mk:# setup_fs<br />
grep: samsung/crespo4g/.git/packed-refs: No such file or directory<br />
grep: samsung/crespo4g/.git/svn: No such file or directory<br />
samsung/crespo4g/init.herring.rc:service setup_fs /system/bin/setup_fs /dev/block/platform/s3c-sdhci.0/by-name/userdata<br />
grep: samsung/toro/.git/packed-refs: No such file or directory<br />
grep: samsung/toro/.git/svn: No such file or directory<br />
grep: samsung/crespo/.git/packed-refs: No such file or directory<br />
grep: samsung/crespo/.git/svn: No such file or directory<br />
samsung/crespo/init.herring.rc:service setup_fs /system/bin/setup_fs /dev/block/platform/s3c-sdhci.0/by-name/userdata<br />
samsung/crespo/device_base.mk: setup_fs<br />
grep: samsung/torospr/.git/packed-refs: No such file or directory<br />
grep: samsung/torospr/.git/svn: No such file or directory<br />
grep: samsung/maguro/.git/packed-refs: No such file or directory<br />
grep: samsung/maguro/.git/svn: No such file or directory<br />
grep: ti/panda/.git/packed-refs: No such file or directory<br />
grep: ti/panda/.git/svn: No such file or directory<br />
[email protected]:~/WORKING_DIRECTORY/device$<br />
```
I see a few in tuna. However, I'm trying to keep from messing this up worse. Can someone tell me what to comment out? or delete, whatever I need to do.

Thanks for any help. Just really hoping to get this computer compiling AOSP...

Regards,

Patrick aka AirForceGeek


----------



## yarly (Jun 22, 2011)

Most errors are usually one of the following:

1) did not have repo completely download everything or it got out of sync later when pulling the latest changes

2) did not get all the proprietary libraries (binaries) and put them in the correct location.

3) did not get all the required prereqs to compiling the source


----------



## JBirdVegas (Jun 11, 2011)

Try compiling with -j1 this will force the CPU to only process one job at a time, it won't recompile already successfull compilations of packages somif you have already hit the error you will get a clean output of just the error... give us the output of that, because it shouldn't fail from ignored files, and I only see warnings after the error message, which also shouldn't cause a failure. So I'm guessing you cut the real error on accident ;-)


----------



## PonsAsinorem (Oct 10, 2011)

I just glanced at it from my phone, and it does look like you cut out the the real error. The not finding src isn't am issue, so don't worry about that part. Next time you upload it, try uploading the full output to pastebin so it's easier to read and stuff doesn't get left out.


----------



## airforcegeek (Nov 17, 2011)

Here is the full pastebin as requested.

http://pastebin.com/Jn0gqMMY

Also, at JBird, lol sorry I didn't reply. When you last gtalked me it was lik 1 am here.. and i had to be up now







its 5 am. So yeah, ill check this from work and see what ppl find. Thanks everyone!


----------



## JBirdVegas (Jun 11, 2011)

The error starts on line 398. The 4 errors are all in Maps (external/guava/guava/src/com/google/common/collect/Maps.java). The error is complaining found: java.util.TreeMap required: java.util.SortedMap which means sorted maps is missing the instance variables in front of the class so when it attempts to cast the TreeMap to the SortedMap it fails... what version of Java are you using? Ensure only Jave 6 is in your $PATH and try again. If that doesn't work checkout the class I pointed you to on CM specifically the lines the 4 errors are on (543, 544, 545, 547) see if they are the same.


----------



## imnuts (Jun 9, 2011)

Also, I would run "make clobber" prior to trying again if you change anything related to the source or Java version. I've encountered a lot of random errors, but I've never seen it stop there before. Possibly also resync just to make sure nothing was missed when you synced before.


----------



## airforcegeek (Nov 17, 2011)

Still no clue. If someone has some time later this evening and would like to try and play around with it, i can do a share desktop or something and go about it that way. I know linux, just, never really had to compile much other than a few things here in there. .. newest pastebin with more errors. http://pastebin.com/8xiggQkk @ jbird, i did the path thing you told me to do.


----------



## imnuts (Jun 9, 2011)

```
make clobber
```
not

```
make cobbler
```
Though I do like a good apple cobbler if you want to make one for me


----------



## airforcegeek (Nov 17, 2011)

You have no idea how hard i laughed at this. Can't believe i did that. I went ahead, just to avoid any possibility of error, did a FULL repo sync of manifest. maybe just pulling down android-4.1.1_r6 is missing something ?

I'm not sure. But I am going to wait for this to repo sync and try again. 0.o maybe by next year ill succesfully build something







.

Thanks tho imnuts lol ill keep this thread posted with whats goin on. and ill add you on twitter as well.

UPDATE:

It compiled last night after doing a :


```
repo init -u [URL=https://android.googlesource]https://android.googlesource[/URL].com/platform/manifest
```
instead of:

```
repo init -u [URL=https://android.googlesource.com/platform/manifest]https://android.googlesource.com/platform/manifest[/URL] -b android-4.1.1_r6
```
Wonder what was breaking it or being missed in r6?

ALSO, it compiled platform 4.0.0 not 4.1.1 . Do I just do a repo sync again make clobber, and try again? or is there something i need to define to say I want 4.1.1_r6 to compile for toro?
Also, are there any proprietaries I need to have installed or are they back in AOSP now? Just want to make sure I end up with something functional before i make an otapackage and then flash it and have problems lol.


----------



## imnuts (Jun 9, 2011)

What version of Java are you using?

```
java -version
```
I'm not sure if that could be the issue or not, but I do know that Google only guarantees that the master branch will build properly with Ubuntu 12.04. I haven't tried building any of the Jelly Bean items myself with it, but it's possible that you need a patch or two to fix the problem on android-4.1.1_r6


----------



## airforcegeek (Nov 17, 2011)

Not sure either man. I'm currently pulling down 4.1.2 and going to see what happens lol... this time with an otapackage and flash it. If it doesnt work. well then f***, but if it does .
update:

FFFFFFFFF...

this machine hates JB. Made 4.0.0 just fine. pulled down 4.1.2 and did a make.. and now :

http://pastebin.com/YJyWiVWf

also you were wondering about java version imnuts:


```
[email protected]:~/WORKING_DIRECTORY$ java -version<br />
java version "1.6.0_35"<br />
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)<br />
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
```


----------



## imnuts (Jun 9, 2011)

I just compiled android-4.1.1_r6 this morning on a brand new Ubuntu 10.04 VM I setup, no changes made other than bringing in the proprietary files, and it compiled without errors.


----------



## airforcegeek (Nov 17, 2011)

UPDATE:

ok, so i installed Ubuntu 10.04.4 LTS. It's actually supported til APR 2013. That being said, im sure by then android site will be updated for next LTS. I was able to compile 4.1.2_r1. I found what my issue was all along in this process. $PATH to java. It was ALL jacked up and what it was doing is failing to see that path and going back to openjdk6. Hence, the actually well known guava map error. There is a patch for it that you can find online (xda has a link I think). Basically, its an issue with openjdk6 and 12.04 LTS that needs fixed. Anyway.. made my first OTAPackage. Now i just gotta figure out how to include superuser.apk and other apk's like that. lol then i might try cherry picking features and making a feature rich rom.


----------

