yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] TrymHansen:
Yes, it adds the bin directory in your home-directory to the path. To see the entire path:

echo $PATH

. (The 'path' being the directories the system will search if it it does not find a command in the current directory.)
[LG Optimus 2x] winstonxl2:
Does someone Know how to fix the wifi problem in the build

i tryed to flash over every nightly and aswell after reset i flashed it

Everytime i can't turn on wifi:(
[LG Optimus 2x] TrymHansen:
I had this, but it disappeard by itself. I can only suggest you do a make clean && make clobber, sync, re-fetch the prebuilts, brunch, format /system and install the kang + gapps again.
[LG Optimus 2x] winstonxl2:
Ok i wil try this today or tomorrow cause by me first time i did compiling it took 2 hours to complete

Do i need to let my Out/p990 FOlder or can i delete everything Cause its 20Gb

Only have 10 gb left
[LG Optimus 2x] Sesto_Sento:
Setting up a Linux build environment

These instructions apply to all branches, including master.

The Android build is routinely tested in house on recent versions of Ubuntu LTS (10.04), but most distributions should have the required build tools available. Reports of successes or failures on other distributions are welcome.

For Gingerbread (2.3.x) and newer versions, including the master branch, a 64-bit environment is required. Older versions can be compiled on 32-bit systems.

Note: It is also possible to build Android in a virtual machine. If you are running Linux in a virtual machine, you will need at least 16GB of RAM/swap and 30GB or more of disk space in order to build the Android tree.

Source: http://source.android.com/source/initializing.html
[LG Optimus 2x] owain94:
Please note that 16GB ram is not necessarily needed but it is an advice

You can even build with 4GB but it'll be slow
[LG Optimus 2x] tonyp:
Trivia: make clean and make clobber are exactly the same thing at CM:

"make clean" removes $OUT completely - and make clobber is just calling make clean.

Here's an extract from the CM main.mk file:

https://github.com/CyanogenMod/android_build/blob/jellybean/core/main.mk

.PHONY: clean
clean:
@rm -rf $(OUT_DIR)/*
@echo "Entire build directory removed."

.PHONY: clobber
[B]clobber: clean[/B]
[LG Optimus 2x] TrymHansen:
I'm psychic, I knew somebody would bring that up - because I didn't check it myself and I should have. Always happens ;)
[LG Optimus 2x] Raum1807:
What you consider as 'detail' makes the difference between a fully working build and building a zombie ROM: not really dead but not alive either.

Yes, you can build the ROM-Image without the proprietary files. You even get the 'successful'-message at the end of the building process but the resultung image is around 8 MB smaller compared to the builds that include the proprietary files. Your builds are missing all the important files (LG's ICS blobs) we waited so long for that LG finally would release them. Your builds are at best useful as updates to flash over fully working ROMs, e.g. NIGHTLIES where the blobs are already in place. As soon as you format your system partition and then try to flash one of your ROMs you will see that your ROM is not working as it should.

So to keep a long story short: Warning! It is important to follow the Guide in my first post thoroughly. Including the proprietary files is obligatory. They are a must-have. You have to include them manually in the local_manifest.xml file. Without these files you will not be able to build a fully working ROM.
[LG Optimus 2x] slebit:
Im getting this warning when im trying to compile:

1 warning
/bin/bash: jar: command not found
make: *** [/home/name/cm10/out/host/common/obj/JAVA_LIBRARIES/dumpkey_intermediates/javalib.jar] Error 127
make: *** Waiting for unfinished jobs....
/bin/bash: jar: command not found
make: *** [/home/name/cm10/out/host/common/obj/JAVA_LIBRARIES/jsr305lib_intermediates/javalib.jar] Error 127

What am i doing wrong?
[LG Optimus 2x] Raum1807:
Java (JDK) not installed or not correctly configured.

What does

java -version

say?

And the output of

echo $PATH

?
[LG Optimus 2x] Ferrum Master:
I did like that...

sudo update-alternatives --install "/usr/bin/jar" "jar" "/usr/lib/jvm/jdk1.6.0/bin/jar" 1

You can change "/usr/lib/jvm/jdk1.6.0" to your jdk install directory.

finally run jar to see if it is working, then continue build
[LG Optimus 2x] fuxmen:
I set up everything to build on my laptop then i relize that in my work I have server that stands only for WSUS and PROXY and I can use it for virtual ubuntu ;D

It has 4cores and 8gb ram nad 20/20mbit Internet :) Will try to work on that, and see if i can connect with ssh from my home to the virtual machine on that server.

It has public adres but dont know if nat in VMware will work :)
[LG Optimus 2x] slebit:
The first one says:

java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)

The second one:

/usr/lib/jvm/java-6-sun/bin:/home/name/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/name/cm10/out/host/linux-x86/bin:/home/name/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin:/home/name/cm10/prebuilts/gcc/linux-x86/x86/i686-android-linux-4.4.3/bin:/home/name/cm10/development/emulator/qtools:/home/name/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin:/home/name/cm10/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:/home/name/cm10/development/scripts
[LG Optimus 2x] rugglez:
I'm having the same problem of wifi not turning on. Tried what Trym suggested, but it didnt work :(

Logcat attached.

Although only 2 lines wont be of any use, just copy pasting those here. The attached logcat file would be of more help.

E/WifiStateMachine( 313): Failed to load driver!
E/WifiStateMachine( 313): DriverFailedState

Would be thankful if a dev could have a look at it :)

And thanks to RC for CM10 and Raum for the guide! (and all other devs too)

Everything else seems to be working great :)
[LG Optimus 2x] winstonxl2:
I fixed my problem i didnt delete out folder i juist did repo sync hand compiled
[LG Optimus 2x] TrymHansen:
I noticed that the RIL which got removed does not get removed by syncing and gets included in the installation. Since we're already maxing out the /system-partition with gapps installed this can mean the difference between a successful and failed installation. Removing it will save 251KB.

I guess the easiest way is to delete "vendor/lge" before syncing.
[LG Optimus 2x] rugglez:
I too noticed that the size of the package was a bit more than the nightly i compared it with (20121103), which when combined with gapps could cause failed installation.

My problem of wifi however seems to something which was not related to free space in system partition as it occured even without installing gapps. (You probably were not saying that to me, but just in case :) )

After some experimenting, my 'wifi not turning on' got solved when i overwrote the lib folder in my rom with the 3rd nov nightly's. This may not be the correct way of solving it, but i'll track it down further when i get time tomorrow :)
[LG Optimus 2x] Raum1807:
Try this, it's similar to Ferrum Master's solution:

Run

which jar

to see the path to any jar file if there exists one. If it doesn't exist, and that is very probable in your case, install it. Since you followed my guide to install the SUN JavaJDK 6 not exactly please adjust the path accordingly.

Execute

sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/jar 1

Check with

sudo update-alternatives --config jar

that it's installed

and check with

ls -la /etc/alternatives/jar

that i's in the right place.

Hope this is helping you.
[LG Optimus 2x] slebit:
Thanks for trying to help. I will try this later tonight when I get home.
[LG Optimus 2x] fuxmen:
If You overwrite sth repo sync won't touc these files on syncing?
[LG Optimus 2x] rugglez:
I overwrote only on my phone, not on the PC ;)
[LG Optimus 2x] Ferrum Master:
I suggest you do the same operation also with javadocs!
[LG Optimus 2x] Raum1807:
Well, it works and makes sense to me: I am moving the directory 'jdk1.6.0_37' to /usr/lib/jvm/ and there I am giving the directory the name 'jdk-6u37-linux-x64.bin'. All in one line.

Of course you can use your line instead. But then you have to change the paths of the dependent files/directories as well and it doesn't fit the guide anymore... it's your choice.
[LG Optimus 2x] tomsi91:
I have next problem, java installed, everything like in instruction, who jar show some path. bud when i brunch p990 i see

Checking build tools versions...
find: `src': No such file or directory

Then it starts build and crash on some java problem after more than hour. I cant undrstand why it doesnt work when i do everything according to instructions.
[LG Optimus 2x] p.valenta:
Thanks a lot. You are right, they are missing.

I'm building for two devices, second is Samsung Galaxy S2 and there it didn't build with missing blobs, this is why I assume I got them too in P990, my mistake. :(
[LG Optimus 2x] Raum1807:
At the moment there is no need to think about failing installations. The free space we have left on our systems after formatting the system partition and flashing the ROM and Gapps is scarce but it still fits... And that is all that counts. As we see fit we can easily remove some apks from the system partion, delete the ringtones, erase the videos, etc. Either before flashing the ROM for testing purposes or by leaving them out in the building process.

Well done with the operation 'injecting files' ! :good:

But do yourself a favor: make a clean install with your own build. Format the system-partition, wipe cache and davik, make a factory reset.... Whatever your recovery allows you to do to make a clean install, please do it. Most important is formatting the system partition. Then flash a fresh build and gapps. Nothing else. No restoring from backup, no fancy stuff like installing lockscreens or icon sets, nothing. Just reboot and wait. You will see that WIFI will be working perfectly.
[LG Optimus 2x] Raum1807:
You can ignore the find: 'src' message. It doesn't break anything. What does 'make' say when it stops the building process? As you can imagine it is difficult to help without the error message. Just copy and paste the last 50 lines of the error from the terminal to a text file and post the text file here.
[LG Optimus 2x] fuxmen:
After crash of not having java and solve it, I start build proces again, and have diffrent error but in polish and cant translate it, now when i change may system to english and try to brunch p900 its says:

brunch p900
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/command-not-found/+filebug
Please include the following information with the report:

command-not-found version: 0.2.44
[LG Optimus 2x] Raum1807:
Try 'brunch p990'
[LG Optimus 2x] rafabad:
two BSOD in the last 24 hours, I have the ultimate nigthlies
[LG Optimus 2x] Raum1807:
No problem at all. It was interesting to see that building without the proprietary files was possible at all. It is helpful for others to keep in mind to include the files when building the ROM.

Happy building!
[LG Optimus 2x] Raum1807:
I don't understand what you want to tell us. Please explain it.
[LG Optimus 2x] rugglez:
Thank you for the reply :)

I always do a clean install of my build, no fancy stuff or extra mods or anything. Still had that Wifi problem though. Got that temporary fix through that injection ;)

Thanks for all your help, in building my first ROM. I'll try to proceed to more advanced stuff now :)
[LG Optimus 2x] fuxmen:
Sorry my mistake but with 'brunch p990' same error ;/

i try that 10x times its just p900 one time actualy when I paste code here :)
[LG Optimus 2x] Raum1807:
Did you initialize the building environment in the correct directory before you brunch according to the guide in the first post?
[LG Optimus 2x] fuxmen:
Yes I initialize it in ~/cm10/

and already started before this error 2 times building.

FIrst have error with java foud solution in this tread.

Second have error with sth else.

And on third try have this error, how to clean start? or step back to make it going>
[LG Optimus 2x] TrymHansen:
I've been staring at the first post for a while, and cannot see it specify a path for java. This might be why some of you are having trouble with the builds, especially if you see something like "java: not found" or similar. (Even though you can type java --version in the terminal does not mean that the build-script will automatically find it.)

If that's the case, close any open terminal-windows, open your home folder. Press CTRL-H to show hidden files. Open the file ".bashrc" in an editor. Add the following line to the end of the file. (Or, if there's already a line specifying the path-variable, edit that.)

export PATH="/home/<yourusername>/bin:/usr/lib/jvm/jdk-6u37-linux-x64.bin/bin:$PATH"

Replace <yourusername> with... you know, your username. This also takes care of the repo bin-directory, which may be overkill, but does not hurt. (You can look at the path by "echo $PATH" to see if "/home/<username>/bin" is listed twice, but I wouldn't worry about it.)

I upgraded from an older java version, and doing all the steps in the OP was not enough, I had to do the above to have the build scripts find java.
[LG Optimus 2x] Ferrum Master:
Take some stronger drink... Riga Black Balsam with hot blackberry juice is suggested.

Did you compile or not? What errors more?

For example I used Mint linux I had to assign jar and javadocs manually also from the alternatives... for this distro, btw it should be pulled up in the first topic!

Playing today with Steam... broke my Mint Linux... will try Kubuntu now(same monkey in different bag, but I hope...) (I hate unity and gnome btw).

Some may share your system specs? I was watching how the compile process runs depending on distro... and it is actually too slow for me...

I am using it on my old kitchen PC... I have dual Hex Istambul Opterons on ancient Tyan Thunder S2915 (they come cheap around 20$ on jewbay) and 8 gigs ECC Registered 666Mhz DDR2 RAM. I had first compile time around 35min for twelve real damn K10.5 CPU cores? It's damn long... Almost feeling that something really broken in my distro...

Could you share your specs and compile times? Or I am just paranoid? I am too lazy to install it on my primary Westmere Xeon machine...
[LG Optimus 2x] TrymHansen:
Clobbered build: 48 mins in a virtual machine with 10GB 1333Mhz1666Mhz RAM, Phenom II X4@3.8Ghz. Virtual HD hosted on a regular (slow) harddrive. Am moving the VDI to an SSD now to see what impact the storage system has on the compile time, I have a feeling it will be significant, but we'll see.
[LG Optimus 2x] fuxmen:
Im reinstalin right now ubuntu 12.10 from scratch.... 4x time doing :D

will se how it gonna go now.

Will do everything from 1st post
[LG Optimus 2x] TrymHansen:
Tada! Clobbered build time with VDI hosted on SSD: 17 minutes. Which for you (Ferrum) would probably help even more, giving the cores some actual work instead of waiting for IO. This being virtual, I guess a bare-metal machine would be ~20% faster, if not more.
[LG Optimus 2x] Raum1807:
Better save than sorry: please add paths as much as you like. But it is not neccessary. /usr/bin is sufficient as path and we all have that preconfigured by installing Ubuntu 12.10.

If you followed the guide to the letter, you executed and linked it. E.g.

$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac 1

What happened?

According to the manpage of update-alternatives

update-alternatives --install <link> <name> <path> <priority>

with <link> and <name> you created the symlink /usr/bin/javac and it is pointing to /etc/alternatives/javac

with <path> you give the location to the target file /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac

With

update-alternatives --config javac

you switch the linking.

I am sure you can see it now or simply follow the trail: /usr/bin/javac is the link to /etc/alternatives/javac is the link to /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac where the real file is.

When you run

which javac

you see that the localion is /usr/bin/javac and so it is pointing correctly to the first symlink. And since this is inside /usr/bin there is no extra path neccessary.
[LG Optimus 2x] Raum1807:
Consider it as your learning phase: we all know it. Try to see it from the bright side: you get more confident every time. Good luck with it and hopefully you will soon report your success. :fingers-crossed:
[LG Optimus 2x] TrymHansen:
@Raum.

Yes, I did everything by the book, erm, OP, and I double checked the steps (I always do), and I get the correct output from checking the symlinks. I would not have made that post without double-checking.

I'm not about to argue with someone who obviously knows a heck of a lot more about this than me. But I have a practical approach: I test. Without the path added I get "java: not found", and with it I get a succesful compilation. Which is good enough for me.

EDIT: I see you mention 12.10 specifically, I'm on 12.04 (because Oracle hasn't updated VirtualBox-additions to work on 12.10 yet). Don't know if it makes a difference, but worth a mention.
[LG Optimus 2x] Raum1807:
Wow! 17 min!! Incredible!!! With or without ccache? Best I got was 24 min without ccache and other tweaks. My findings are that raw CPU power combined with fast RAM is the biggest scaling factor. My CPU is at 100% at all cores most of the time while building. What are the specs of this machine?
[LG Optimus 2x] Raum1807:
In my opinion it's the good kind of arguing we are doing here: if I say it should work and I checked it before posting and you say you tested it and it didn't work for you then we have a situation that makes me doubting my guide and I see room for improvement. Will re-check and get back to you in this matter.

Thank you!
[LG Optimus 2x] TrymHansen:
Ah, you're right, this is WITH ccache. Enabled it yesterday. This is the same machine that built on 48 minutes with VDI on a HD (also with ccache), Phenom II X4@3.8 Ghz, 10GB RAM@1666Mhz(8-9-8-1T) allocated to the VM (of 16GB total). The Machine is nothing special, couple years old.
[LG Optimus 2x] HerrKuk:
Looks like people have some troubles to install Oracle java...

I used this this tutorial

The script was broken when i downloaded it a few weeks ago, if its still broken, try with my modified ( I only fixed download link in the script, all creds to the Author)
[LG Optimus 2x] Raum1807:
Ah, ok. Ccache activated, but nonetheless, nice time.

If I want to time an operation I am using the time command in front of the command/operation I want to time. E.g.:

time brunch p990

Try it some time, if you do not use it already.

Please do me a favor and send me the output of

ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar

so I can compare your linking with mine.
[LG Optimus 2x] TrymHansen:
trym@CMBuilder:~$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
lrwxrwxrwx 1 root root 44 nov. 7 15:37 /etc/alternatives/java -> /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/java
lrwxrwxrwx 1 root root 45 nov. 7 15:37 /etc/alternatives/javac -> /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac
lrwxrwxrwx 1 root root 46 nov. 7 15:37 /etc/alternatives/javaws -> /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javaws
ls: kan ikke åpne /etc/alternatives/jar: Ingen slik fil eller filkatalog

The last error msg is norwegian for "No such file or folder". As I wrote in an edited post I think you may have missed, this is 12.04 (No virtualbox-additions for 12.10 yet). I should also mention that I uninstalled ALL other java-versions, openJdk and the old 1.6.32.
[LG Optimus 2x] Ferrum Master:
My gratitude to you Trym. Yes we have a lot of less than of 4K files that gives a headache to my my old eleventh Barracuda. Will buy a cheap 120GB Sandforce Kingston, those are around 100$ (55LVL) - best bang for buck at the moment I suppose.

It should be faster for my grandfather PC (motherboard is made in 2005). I have eight more same generation cores than you have, but clocked at 2Ghz, I haven't found a way to overclock my Nforce professional 3600 chip from Linux, as server board i doesn't give such options from bios, it is Phoenix, so it ain't modifiable also, it has Volterra voltage VRM, that is military grade IC and also closed source, so I cannot even figure out VID settings from datasheet, but from windows it is possible to give more FSB juice using ntune... (nvidia closed source again? pff... this is a curse really)

I just set up a kubuntu based machine... it really is much more mature than Mint.

But Trym I read up another serious flaw that we might we have, I guess Phenom also has it. It is NUMA. It has to be manually configured at the kernel side to map faster access to memory for each node/core, so it will also boost the data feed. It gives spectacular results at server tasks, I need to dig up a bit, server Linux Hardware setup and management isn't my profile at all. I guess XDA and Android pushes to learn really obscure things sometimes. But it isn't bad at all - getting more alien. :D

The next noobish question for Raum1807? Why are those needed? Ar those VM special? Those disable my nvidia driver, and the recent one is really a great surprise, Linus middle finger did really work out well.

x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev

I compiled without them. No problems met. Other earlier CM compiling guides also didn't include them that I've read previously.
[LG Optimus 2x] TrymHansen:
Deleted, rubbish.
[LG Optimus 2x] Raum1807:
Thank you, very helpful! That's it: Since you uninstalled OpenJDK6, there is no fall-back solution for the Java components besides java, javac and javaws where the version (OpenJDK or SUN) is not relevant. So when the compiling needs jar or javadoc for example, it's lost. And you would have to include them in the path manually.

To solve the case where there is no other JDK installed and the path is missing, please be my guinea-pig:

$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javadoc 1
$ sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javah 1
$ sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javap 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/jar 1

and then choose

$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javah
$ sudo update-alternatives --config javap
$ sudo update-alternatives --config jar

Check it

ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar

Please edit your paths: no direct paths to jdks anymore please. Is /usr/bin sufficient now? Is it building well?

Check and tell please, so I can modify my guide to some extent.... THX A MILLION!
[LG Optimus 2x] Ferrum Master:
I can confirm, you just posted the procedure just as I am doing at other distros (BTW Kubuntu natively didn't have any OpenJDK java at all, so I have a clean environment :angel: )