# Compile error with OMFGB



## c0dege3k (Jun 9, 2011)

First, I wanna say hey, because this is my first post here. I came from the t3hh4xx0r site and have been working on a mod of omfgb.

Now for my problem (I think this is the right section to be posting):

I can compile the regular omfgb fine, but when I add my own bits and pieces (can be found here), it gives me the error that I've pasted over here: http://pastebin.com/Q3PnXG1b.

If anyone can help me figure this one out, it would be extremely appreciated.


----------



## linuxmotion (Jun 12, 2011)

What exactly have you done. Im is the project setup or pacakge access error

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

It's a launcher modification, and I also added an option in God Mode for the change.


----------



## linuxmotion (Jun 12, 2011)

Try a make clean. Then make again. The error you have received is unrelated to the launcher. Weird.

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

How do I do the "clean"


----------



## linuxmotion (Jun 12, 2011)

Literally
'Make clean'

Sent from my Incredible using Tapatalk


----------



## linuxmotion (Jun 12, 2011)

The next 'make' will be from scratch and may take a while

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

Ok, that worked- I think. I didn't get the same error & it did take a while, but I still got a "Waiting for unfinished jobs" message. Right before it was:


```
<br />
make: *** [out/host/common/obj/JAVA_LIBRARIES/core-hostdex_intermediates/classes.jar] Error 41<br />
```


----------



## linuxmotion (Jun 12, 2011)

If you used more than one thread to compile you may have to look upwards a decent amount. The error should be above those lines.

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

I recompiled today and put up the entire piece that starts getting weird over here: http://pastebin.com/fyM03rK1.

Not expecting anyone to go through that junk, I took out the sections that had the word "error" in them.


```
<br />
echo out/host/linux-x86/obj/STATIC_LIBRARIES/libpng_intermediates/png.o out/host/linux-x86/obj/STATIC_LIBRARIES/libpng_intermediates/pngerror.o<br />
```


```
<br />
out/host/linux-x86/obj/STATIC_LIBRARIES/libtinyxml_intermediates/tinyxmlerror.o out/host/linux-x86/obj/STATIC_LIBRARIES/libtinyxml_intermediates/tinystr.o | xargs ar crsP  out/host/linux-x86/obj/STATIC_LIBRARIES/libtinyxml_intermediates/libtinyxml.a<br />
```


```
<br />
out/host/linux-x86/obj/STATIC_LIBRARIES/libelf_intermediates/libelf/elf_error.o<br />
```


```
<br />
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1<br />
```
I personally can't find anything that make sense, but if you have ideas...


----------



## c0dege3k (Jun 9, 2011)

Oh- I just found this almost at the top of the output: http://pastebin.com/Evnp45eM

Don't know if it means anything


----------



## linuxmotion (Jun 12, 2011)

Have you fallowd this guide http://source.android.com/source/initializing.html upto installing pacakges. You might not have all required packages.

Oh have you done. '. Build/envsetup.sh' and 'lunch'?

If all else fails you can put what youve done in a dir that is not part of your android build system. Delete the whole build system folder and start again. Repo sync. Etc.. I had something kind of like the same error. It was the only thing that fixed it for me

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

I have followed the guide, and done the build and lunch. So I guess I'll have to re-sync......


----------



## c0dege3k (Jun 9, 2011)

I'm wondering something: I did redownload it last night, and I tried compiling today, but I'm still getting errors.However, my laptop has been randomly rebooting (complete different problem), and it has during compiling. So would stopping it mid-compile screw something up?


----------



## linuxmotion (Jun 12, 2011)

Not useually. It will recognize that you didnt finish and compile whats needs to be compiled.

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

Alright- I'm lost and outta ideas


----------



## r2doesinc (Jun 8, 2011)

Can you link to your mods?


----------



## c0dege3k (Jun 9, 2011)

github.com/c0dege3k/StarkOMFGB <-- Should be it.


----------



## c0dege3k (Jun 9, 2011)

Just installed EVERY SINGLE PACKAGE in the http://source.android.com/source/initializing.html site- even the ones for the older versions and 32 bit computers. Reran the compile and now get THIS error:


```
<br />
arm-eabi-g++: Internal error: Killed (program cc1plus)<br />
Please submit a full bug report.<br />
See <http://gcc.gnu.org/bugs.html> for instructions.<br />
make: *** [out/target/product/inc/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/editing/DeleteFromTextNodeCommand.o] Error 1<br />
make: *** Waiting for unfinished jobs....<br />
target thumb C++: libwebcore <= external/webkit/WebCore/editing/DeleteSelectionCommand.cpp<br />
Killed<br />
```


----------



## linuxmotion (Jun 12, 2011)

Do you post some more of the make output somewhere. Ill take a look again

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

Here's everything:
https://github.com/c0dege3k/StarkOMFGB/blob/master/compiler_output.txt


----------



## linuxmotion (Jun 12, 2011)

That is a very weird error. It seems gcc has failed on you. Try reinstalling gcc. And if that fails resync the pre built folder. This does not have to be done with repo you can use git to do that.

Sent from my Incredible using Tapatalk


----------



## r2doesinc (Jun 8, 2011)

hmm, what you should try doing is applying the mods directly to our source. checkout our frameworks/base or launcher or whatever, and start applying your mods to that. that should make the compiling process easier. might not solve your issue, but it would make it easier for us to test it ourselves and see if its isolated to your machine.


----------



## c0dege3k (Jun 9, 2011)

r2doesinc said:


> hmm, what you should try doing is applying the mods directly to our source. checkout our frameworks/base or launcher or whatever, and start applying your mods to that. that should make the compiling process easier. might not solve your issue, but it would make it easier for us to test it ourselves and see if its isolated to your machine.


I'm not totally sure what you mean- for a while, I was just trying to compile the normal source, but I've since included my mods.

And @linuxmotion- I reinstalled the gcc thing, and it still didn't work, so it's currently compiling after I redownloaded the build repo


----------



## c0dege3k (Jun 9, 2011)

Ok, just finished compiling after redownloading the build repo. Didn't work, but got a NEW error:


```
<br />
<br />
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.so when searching for -lstdc++<br />
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.a when searching for -lstdc++<br />
/usr/bin/ld: cannot find -lstdc++<br />
collect2: ld returned 1 exit status<br />
make: *** [out/host/linux-x86/obj/lib/libfst.so] Error 1<br />
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.so when searching for -lstdc++<br />
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.a when searching for -lstdc++<br />
/usr/bin/ld: cannot find -lstdc++<br />
collect2: ld returned 1 exit status<br />
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1<br />
packages/apps/Nfc/jni/com_android_nfc_NativeNfcManager.cpp: In function 'int [URL=android::nfc_jni_download(nfc_jni_native_data*)']android::nfc_jni_download(nfc_jni_native_data*)'[/URL]:<br />
packages/apps/Nfc/jni/com_android_nfc_NativeNfcManager.cpp:307: warning: 'status' may be used uninitialized in this function<br />
```


----------



## IRONMatt (Jun 6, 2011)

c0dege3k said:


> Ok, just finished compiling after redownloading the build repo. Didn't work, but got a NEW error:
> 
> 
> ```
> ...


Sorry to but in here. Have you ever successfully built a clean build of omfgb without your own mods? Something tells me you are missing some lib for your computer. But anyways, just my guess

Sent from my Droid X on CM7


----------



## c0dege3k (Jun 9, 2011)

I'm pretty sure that I was successfully compiling before I redownloaded the source, but thinking about it now, I might have missed something. But I guess no, I've never done a build of just omfgb.


----------



## linuxmotion (Jun 12, 2011)

Are you on a 32 bit or 64 bit OS. The android build aystem ia now designed for 64 bits. Just a thought.

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

linuxmotion said:


> Are you on a 32 bit or 64 bit OS. The android build aystem ia now designed for 64 bits. Just a thought.
> 
> Sent from my Incredible using Tapatalk


64 bit. Found that one out the hard way


----------



## linuxmotion (Jun 12, 2011)

It mihht be a linking issue where a synbolic link was not set. Go to /usr/lib and check to see if libstdc++.so is there. If is but the ending is different symbolicly link that libstdc++.so.~~~ to libstdc++.so

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

The file is not in existence in my computer.


----------



## linuxmotion (Jun 12, 2011)

Well thats a problem. Im not sure the command to grab lib stdc++. Try apt-cache search libstd to find the lib. But it should have been installed along with the other libs. Try doing the initialize the android build enviroment again from there webpage and make sure that all the libs get installed. When copt pasting it has a tendancy to split it and not install all the libs.

Edit: check /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/ for the .so

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

Alright- the .so is in /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/ .

And I did go back to the source page just in case, but Google's been nice and formatted it to be copy/paste friendly, so they were all installed fine.

I ran the compile after all this- still getting the "arm-eabi-g++" / gnu error.


----------



## linuxmotion (Jun 12, 2011)

Tell you what. If i we both can get some time. We can meet in the irc or gchat and ill shh(if thats ok) to try and figure out the problem. Hows that sound.

Sent from my Incredible using Tapatalk


----------



## c0dege3k (Jun 9, 2011)

That's great. I'm open at 12:30 for a bit, and then not until tonight


----------



## c0dege3k (Jun 9, 2011)

I figured this out yesterday, but I'll post the solution here. The omfgb wiki told me to run "make -j99 ", so I did. Which created a memory overflow because of running 99 instances of gcc. So instead, I ran make -j2 which works fine for me

Sent from my Incredible


----------



## linuxmotion (Jun 12, 2011)

Omg i never even thought of that. Use the j switch with the number of cores you have or if its hyper threaded use the number of threads the cores can handle(ex a dule core hyper threaded cpu can handle 4 threads.)

Sent from my Incredible using Tapatalk


----------

