[Android Q&A, Help & Troubleshooting] skyhigh2004:
Hi guys I am kind of a noob when it comes to linux and compiling and have hit a brick wall. I posted this question here in Q&A and in Chef central so hopefully someone has an idea. I have been trying to compile CM9 for about three days now and no matter what I do I get this output. It is 95% of the time after the "install libwebcore.so" line.

install: out/target/product/maguro/system/lib/libwebcore.so

UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.android.dx.util.IntList.(IntList.java:87)
at com.android.dx.rop.code.RopMethod.calcPredecessors(RopMethod.java:154)
at com.android.dx.rop.code.RopMethod.labelToPredecessors(RopMethod.java:95)
at com.android.dx.dex.code.RopTranslator.pickOrder(RopTranslator.java:352)
at com.android.dx.dex.code.RopTranslator.translateAndGetResult(RopTranslator.java:212)
at com.android.dx.dex.code.RopTranslator.translate(RopTranslator.java:106)
at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:293)
at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:134)
at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:87)
at com.android.dx.command.dexer.Main.processClass(Main.java:483)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)
at com.android.dx.command.dexer.Main.access$400(Main.java:67)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
at com.android.dx.command.dexer.Main.processOne(Main.java:418)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329)
at com.android.dx.command.dexer.Main.run(Main.java:206)
at com.android.dx.command.dexer.Main.main(Main.java:174)
at com.android.dx.command.Main.main(Main.java:95)
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/noproguard.classes-with-local.dex] Error 3

Before I tried to compile CM I did successfully compile AOSP for my Gnex. I have searched and tried everything I could find. I've tried these values in the common.py file and just about every combo I could think of per recommendations I found online.

check = (sys.maxsize > 2**32)
if check is True:
cmd = ["java", "Xmx2048m", "-jar",
os.path.join(OPTIONS.search_path, "framework", "signapk.jar")]
else:
cmd = ["java", "-Xmx1024m", "-jar",
os.path.join(OPTIONS.search_path, "framework", "signapk.jar")]

I have also checked my swap and as far as I can tell its there and working but it seams to never be used. I have tried all the commands I could find online to make sure it was enabled but Idk what else to try or check.

Also I am using a quad core AMD with 6GB of RAM if anyone is curious. Any and all advice/ideas would be very much appreciated at this point I am at a complete loss. Thanks for looking and helping guys.

EDIT:I just finished a successful build of AOSP for my galaxy nexus so I am really confused as to why I run out of memory for CM9.

Sky-

A fresh install of Ubuntu 12.04 on a freshly formatted partition seemed to fix my memory issue.