[ISSUE SOLVED]CM9 compiling error - Android Q&A, Help & Troubleshooting

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.
Code:
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.
Code:
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.

Related

How to compile native android code

Hi everyone,
There has been a few questions on how to compile native android code (for exploits and such). Easy enough.
Go to http://source.android.com/download. You will need to be running Linux. Ubuntu is easiest. Follow the directions to get the source code for android downloaded and compiled.
Run this command
export PATH=/path/to/android/source/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin
Run arm-aebi-gcc or arm-aebi-g++ (depending on the language, c or c++) followed by
-o (OUTPUT) (INPUT)
So, for example, test.c would be:
arm-aebi-gcc -o test test.c
And test.cpp would be
arm-aebi-g++ -o test test.cpp
Just a note, this will make STATICALLY linked files. Meaning any headers will be included INSIDE the executable. Simply put, this means the files will be HUGE for large projects. There is a program, named agcc, which fixes this and can be found here:
http://plausible.org/andy/agcc
Put it in /bin by:
Code:
cd /bin
sudo wget http://plausible.org/andy/agcc
chmod 755 agcc
chmod +x agcc
Run agcc -o (OUTFILE) (INPUT) to compile. Be warned though, if a header is in the file that isn't in bionic (android's smaller libc) it won't compile.
Hope this helps!
+1
Awesome
............(stuipid mistake >>was<< here)..............
Thanks man...
now i can break out my bootable 50 meg linux disc and play around.
love that thing used to use it to crack windows passwords
should see the guys face when you crack his 20 char password in 5 mins without ever needing to use it.
well not really cracking but changing it. used to work at the pentagon. this one guys who used to be support for one dept. thought it would be funny to change all the admin passwords in his office. so when one of the pc's was beyond his repair. i showed up and he was like give me 10 min and i'll log you in. well 5 mins later i was fixing the machine while he was screwing off. boy was he pissed.
how big's gcc? cause i'll need to compile it for my linux.
rigamrts said:
how big's gcc? cause i'll need to compile it for my linux.
Click to expand...
Click to collapse
Massive. You're definitely better off using the prebuilt toolchain found in the Android (N|S)DK.
I would like to add something to this.
libc is essentially derived from the kernel. So, if you take agcc, and make changes to use the libc directory (I don't remember it atm) and NOT bionic, the app won't compile. Simple enough, libc is based of the kernel, so bionic is based of the android kernel. Things missing in bionic that are in libc WON"T work simply because certain kernel calls in glibc DON'T exist on the Android platform.
My exploit relied on the fact that I would be able to compile exploits using glibc, instead of using bionic. So it failed. Thats what I've figured out so far anyways.
zifnab06 said:
My exploit relied on the fact that I would be able to compile exploits using glibc, instead of using bionic. So it failed. Thats what I've figured out so far anyways.
Click to expand...
Click to collapse
Would you be willing to share the code for that exploit, even if it doesn't work? (sorry if you already have, I didn't see it anywhere)
I may be able to help.
Look up anything in our old thread, especially when we were talking about "sys/personality.h". The one I was working with exploited a hole that was patched (min_map_addr).
This blog post
honeypod.blogspot.com/2007/12/dynamically-linked-hello-world-for.html
(Sorry, my account isn't allowed to post links yet.)
gives a minimalist approach to using dynamically linked executables. (In particular, see steps #2 and #3 for the sources for hello.c and start.c) I gave it a try, and it seemed to work without agcc, e.g. with a makefile like the following (and with the arm-eabi- executables in the PATH of the user invoking the make) :
Code:
AR = arm-eabi-ar
AS = arm-eabi-as
CC = arm-eabi-gcc
CXX = arm-eabi-c++
LD = arm-eabi-ld
NDK_KIT = /opt/android/android-ndk-1.5_r1
PLATF_KIT = build/platforms/android-1.5
ARM_INC = $(NDK_KIT)/$(PLATF_KIT)/arch-arm/usr/include
ARM_LIB = $(NDK_KIT)/$(PLATF_KIT)/arch-arm/usr/lib
PLATF_INC = $(NDK_KIT)/$(PLATF_KIT)/common/include
OBJS = hello.o start.o
EXES = hello
hello: hello.o start.o
$(LD) \
--entry=_start \
--dynamic-linker /system/bin/linker -nostdlib \
-rpath /system/lib -rpath $(ARM_LIB) \
-L $(ARM_LIB) -lc -o hello hello.o start.o
hello.o: hello.c
$(CC) -I $(ARM_INC) -I $(PLATF_INC) -c hello.c
start.o: start.c
$(CC) -I $(ARM_INC) -I $(PLATF_INC) -c start.c
clean:
rm -f $(OBJS) $(EXES)
HTH
bftb0
Just curious, but I'm trying to get some native code that I've compiled to run on the Incredible. I've followed the instructions to download the the arm gcc, compiled my C code, and adb push'ed the executable over to /sdcard but I get a "permission denied" error when I try running it from my phone and adb shell. Does the phone have to be rooted in order to run native C compiled executables?
Thanks!
zebdor44 said:
Just curious, but I'm trying to get some native code that I've compiled to run on the Incredible. I've followed the instructions to download the the arm gcc, compiled my C code, and adb push'ed the executable over to /sdcard but I get a "permission denied" error when I try running it from my phone and adb shell. Does the phone have to be rooted in order to run native C compiled executables?
Thanks!
Click to expand...
Click to collapse
On an unrooted phone, push your code to /system/local or another place that you can write to and chmod it to be executable. By default the sdcard is mounted no execute. You will either need to add the directory you put it in to the path or execute it implicitly by specifying it is in the local directory.
for example ./myprogram
I hope that helps. I re-read it and it doesn't make much sense unless you have a firm grasp of the things that happen between the lines.
best of luck.
Thanks. Good stuff.
rigamrts said:
now i can break out my bootable 50 meg linux disc and play around.
love that thing used to use it to crack windows passwords
should see the guys face when you crack his 20 char password in 5 mins without ever needing to use it.
well not really cracking but changing it. used to work at the pentagon. this one guys who used to be support for one dept. thought it would be funny to change all the admin passwords in his office. so when one of the pc's was beyond his repair. i showed up and he was like give me 10 min and i'll log you in. well 5 mins later i was fixing the machine while he was screwing off. boy was he pissed.
how big's gcc? cause i'll need to compile it for my linux.
Click to expand...
Click to collapse
This is one of the most unbelievable stories ive read in a while. The fact that the pentagon had an administration department without policies or security in place to prevent such a widely known method, is comical.
btw, such a linux cd is no secret. Its called pnordahl.
Useful information
I'm surprised to see that many of you don't use the Forum's search function and simply start new topics over and over again. What funny is that the info you put here is old and useless.
I've posted an article on how to compile native C code for Android months ago, with several examples and tools:
http://forum.xda-developers.com/showthread.php?t=514803
or direct link herE:
http://www.pocketmagic.net/?p=682
However this technique is now too old.
The best approach is to simply use the NDK and build a custom Makefile for Cygwin's make under windows or easier under linux, see:
http://betelco.blogspot.com/2010/01/buildingdebugging-android-native-c.html
radhoo said:
I'm surprised to see that many of you don't use the Forum's search function and simply start new topics over and over again. What funny is that the info you put here is old and useless.
I've posted an article on how to compile native C code for Android months ago, with several examples and tools:
http://forum.xda-developers.com/showthread.php?t=514803
or direct link herE:
http://www.pocketmagic.net/?p=682
However this technique is now too old.
The best approach is to simply use the NDK and build a custom Makefile for Cygwin's make under windows or easier under linux, see:
http://betelco.blogspot.com/2010/01/buildingdebugging-android-native-c.html
Click to expand...
Click to collapse
Thank you for your very informative links. I'll take a look tonight, since I find this very interesting and would love to compile a few things for Android.
"What funny is that the info you put here is old and useless." - This was posted almost 10 months ago. That's a long time in smart phone years. By the same token, if it were January 2010 and I was looking for this info, I would assume that a post from May 2009 would be dated too.
"I'm surprised to see that many of you don't use the Forum's search function and simply start new topics over and over again." - Maybe zifnab did search and find your post and deemed your technique too old for Jan. 2010, so he created a new post with newer information. Or maybe he wanted to show a different way to do the same thing. Or maybe he figured that many users only have/take the time to look in their phone-specific forum. No one knows other than zifnab.
Personally, I welcome multiple posts by different people on the same topic. Everyone is different and often have different takes on the same thing. I find it easier to understand many techniques/topics if I get multiple perspectives.
Again, thank you for your contribution.
I need to compile the library with some modifications. how to do it as simple as possible? what will it take?
vlad072 said:
I need to compile the <library> with some modifications. how to do it as simple as possible? what will it take?
Click to expand...
Click to collapse
Did you get any thing in this regard ? Even i want to compile a part for library for the Android 5.1.1 device but not able to find any resource. Help will be appreciated.

Question for experienced devs

OK, let me first preface by saying that I have like zero development experience but I'm pretty smart and I'm trying to learn. You have to start somewhere, right?
So I decided to take a crack at it when I came across this thread:
http://forum.xda-developers.com/showthread.php?p=24278953
It's a Linux tutorial but having only a Mac, I decided to see if I could make it work. It didn't but the point is that, in the process, I learned a LOT.
So following a suggestion, I scrapped the whole Mac idea and started all over on an Ubuntu 11.4 VM. Which works great but it's a little less forgiving than the Mac.
Anyway, I have my build environment completely set up with all the necessary packages installed...no problem. I have the device specific proprietary files in place and pre-builts installed as well.
Now its time to build. I do so using this command:
Code:
source build/envsetup.sh
brunch otter -j$(gprep -c processor /proc/cpuinfo)
...runs for a couple minutes before stopping at this error:
Code:
In file included from frameworks/base/media/libmedia/IMediaPlayerService. cpp:25: frameworks/base/include/media/IOMX.h:29:17: error: jni.h: No such file or directory make: *** [out/target/product/otter/obj/SHARED_LIBRARIES/libmedia_ intermediates/IMediaPlayerService.o] Error 1
So basically, the file "IOMX.h" makes a declaration to include "jni.h" which isn't anywhere in my /android tree.
Upon further research I learn that "jni.h" has something to do with Java. I have the required java-sun-jdk 6.1.x installed so I figured it must be a problem with my $PATH. I found the "jni.h" in question in the Java folder and did an export $PATH to that folder. Then I entered echo $PATH to make sure:
Code:
echo $PATH /home/linux/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun-1.6.0.26
Sure enough, the folder where "jni.h" is located is included in my path, but I'm still getting the same errors.
What am I doing wrong?
Sent from my Kindle Fire using xda premium

[A] Jump-Start How-To build CM9 for i717

Build Environment
This is explained in detail on the Android website. I won't repeat it here.
http://source.android.com/source/initializing.html
Setup CyanogenMod Source
Code:
mkdir -p ~/android/cyanogenmod && cd ~/android/cyanogenmod
repo init -u git://github.com/CyanogenMod/android.git -b ics
wget -o .repo/local_manifest.xml http://playground.zaplabs.com/sandbox/android/device/sgh-i717/CyanogenMod/local_manifest.xml
repo sync -j4
Initialize Proprietary Files
Connect your I717 to the USB port. Required for pulling proprietary (closed source) binaries and firmware from your device. You should be running the latest ICS available. Usually a build from one of the ICS ROMS on the dev forum work too.
Code:
pushd device/samsung/quincyatt
sed -i -r -e 's/^(TARGET_OTA_ASSERT_DEVICE) := (.*)/\1 := \2,i717/'
./extract-files.sh
popd
vendor/cm/get-prebuilts
Build CM9
Code:
export USE_CCACHE=1
. build/envsetup.sh
prebuilt/linux-x86/ccache/ccache -M 10G
brunch quincyatt
If all went well you should have a zip file in out/target/product/quincyatt called cm-9-20120617-UNOFFICIAL-quincyatt.zip (or similar). Copy file to your device and flash.
Useful resources
CyanogenMod Gerrit Code Review
CyanogenMod How To Gerrit
CyanogenMod Github
Android Gerrit Code Review
MSM/QSD Android Enablement Project
I did not write this for beginners. It is intended to give experienced developers who are new to android development a jump start.
Mr. H0tw1r3,
I am currently using the hotwire CM9, did you build this? I was curious if it will progress further.
My Evo 4G was on CM7 or something until December when I went with a factory unlock iPhone 4s 64GB (now I hate apple even more) and switched to the Note recently. My expectations were very very high because CM on the Evo was extremely detailed and had literally hundreds of settings that stock OS doesnt have.
Another question... If one made a microSD plug, meaning it is not memory but simply a plug or dongle with a wire coming out of its butt. The wire would connect to a more sizable memory module, maybe SSD size, 256GB. Could it be done? Could this not fit inside the back of an extended battery pack with a regular battery, or for that matter, custom ram module to fill the space left where some of the 5000mah battery covers leave at the top and bottom of their double thick batteries?
Maybe the Note is just 1 fish in the sea, it'd be difficult to get it to a production phase, but not impossible. What do you think? Galaxy Note Super Pack: 256GB memory, 5000mah and do it better than the other battery guys so the thickness isn't as much with so much wasted space, e.g. the battery only grows outwards, not seeping sideways towards the top and bottoms too.
As I slowly put 16GB of music and some music videos (keepvid.com + top 40s and youtube keeps me happy) in a painfully slow process, I recall 1 of the few and not too important reasons I tried the iphone. Music Capacity....
btw, nice OS mod.
Thanks for the info. I'll try running a build tonight and see how it goes. As for the SD card, just wait until 64/128/256GB microSD's are out, they will work with the Note.
CalcProgrammer1 said:
Thanks for the info. I'll try running a build tonight and see how it goes. As for the SD card, just wait until 64/128/256GB microSD's are out, they will work with the Note.
Click to expand...
Click to collapse
64 is already out and it works
49.99 for a class 6 and 99.00 for a class 10
you know in a couple decades they'll be laughing at carbon nanotube electronics while they use molecular structure or something to accomplish 100TB on a microSD size module.
the only reason it is the size it is: because human fingers are too blunt to handle anything smaller. same with phones really, with current "advanced technology", e.g. the crap that humanity is allowed to know.
when it comes down to it, with current "tech", a fully functional telephone can be much much smaller than the size of a hearing aid and last 24 hours with 5 hours talk time. obviously rural areas would require more transmitter power and thus would have dropped calls.
I wont get started about "the space program"...
My build completed and I got a zip file "cm-9-20120618-UNOFFICIAL-quincyatt.zip" which I copied to my phone and am trying to install from ClockworkMod. I selected the zip and am getting the following error:
Code:
-- Installing: /emmc/cm-9-20120618-UNOFFICIAL-quincyatt.zip
Finding update package...
Opening update package...
Installing update...
assert failed: getprop("ro.product.device") == "SGH-I717" || getprop("ro.build.product") == "SGH-I717" || getprop("ro.product.device") == "quincyatt" || getprop("ro.build.product") == "quincyatt"
E:Error in /emmc/cm-9-20120618-UNOFFICIAL-quincyatt.zip
(Status 7)
Installation aborted.
EDIT:
Looked at hotwire's zip and it has a custom updater-script that gets rid of the assert line. I checked the build.prop and everything looks good, so I don't think getting rid of this line will hurt anything. I'm going to flash now and see what happens!
EDIT AGAIN:
Flashed! Booting it up now, it has the new Cyanogenmod boot animation with the new Cid logo (no more skateboarding Android) and is now on the "Android is upgrading..." thing. Seems to be working!
neko_tensai said:
you know in a couple decades they'll be laughing at carbon nanotube electronics while they use molecular structure or something to accomplish 100TB on a microSD size module.
the only reason it is the size it is: because human fingers are too blunt to handle anything smaller. same with phones really, with current "advanced technology", e.g. the crap that humanity is allowed to know.
when it comes down to it, with current "tech", a fully functional telephone can be much much smaller than the size of a hearing aid and last 24 hours with 5 hours talk time. obviously rural areas would require more transmitter power and thus would have dropped calls.
I wont get started about "the space program"...
Click to expand...
Click to collapse
Quite true, and very off-topic lol.
Sent from my SAMSUNG-SGH-I717 using Tapatalk 2
neko_tensai said:
you know in a couple decades they'll be laughing at carbon nanotube electronics while they use molecular structure or something to accomplish 100TB on a microSD size module.
the only reason it is the size it is: because human fingers are too blunt to handle anything smaller. same with phones really, with current "advanced technology", e.g. the crap that humanity is allowed to know.
when it comes down to it, with current "tech", a fully functional telephone can be much much smaller than the size of a hearing aid and last 24 hours with 5 hours talk time. obviously rural areas would require more transmitter power and thus would have dropped calls.
I wont get started about "the space program"...
Click to expand...
Click to collapse
You and me need to stay away from each other lmao! I can tell what page your on, and we are way out from "humanity is allowed to know ;-)
Kernel Build Instructions?
Thanks so much! Any chance you can give us a hint as to how to build the kernel? the latest prebuilt kernel is from May 17 (according to my build anyway).
Again thanks so much!
Phazor said:
Thanks so much! Any chance you can give us a hint as to how to build the kernel? the latest prebuilt kernel is from May 17 (according to my build anyway).
Again thanks so much!
Click to expand...
Click to collapse
No sources released (but I'm working on it).
Sent from my SAMSUNG-SGH-I717 using XDA
Thanks a lot h0tw1r3 for the thread, this is very useful, I was just building a linux vm environment, however I noticed on the link you had posted, that it asks for at least a 16gb Ram/swap, -
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.
Click to expand...
Click to collapse
I hope this doesn't mean having at least 16gb system ram, my desktop has this, but I was hoping I can run a vm on my laptop with 6gb ram, sharing 3gb for linux?
Thanks!
i_max2k2 said:
Thanks a lot h0tw1r3 for the thread, this is very useful, I was just building a linux vm environment, however I noticed on the link you had posted, that it asks for at least a 16gb Ram/swap, -
I hope this doesn't mean having at least 16gb system ram, my desktop has this, but I was hoping I can run a vm on my laptop with 6gb ram, sharing 3gb for linux?
Thanks!
Click to expand...
Click to collapse
I compile on a machine with 8gb ram. Works just fine. Was originally compiling on a VM with 5gb, slow but works.
I've tried following your guide here but I get errors using your local_manifest.xml. However, if I skip the wget of your local_manifest file it goes with no trouble. Would it hurt to skip that step?
Code:
[email protected]:~/android/cyanogenmod$ repo sync -j4
Traceback (most recent call last):
File "/home/william/android/cyanogenmod/.repo/repo/main.py", line 385, in <module>
_Main(sys.argv[1:])
File "/home/william/android/cyanogenmod/.repo/repo/main.py", line 365, in _Main
result = repo._Run(argv) or 0
File "/home/william/android/cyanogenmod/.repo/repo/main.py", line 121, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/william/android/cyanogenmod/.repo/repo/command.py", line 45, in OptionParser
self._Options(self._optparse)
File "/home/william/android/cyanogenmod/.repo/repo/subcmds/sync.py", line 126, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/william/android/cyanogenmod/.repo/repo/manifest_xml.py", line 245, in default
self._Load()
File "/home/william/android/cyanogenmod/.repo/repo/manifest_xml.py", line 291, in _Load
nodes.append(self._ParseManifestXml(local, self.repodir))
File "/home/william/android/cyanogenmod/.repo/repo/manifest_xml.py", line 302, in _ParseManifestXml
root = xml.dom.minidom.parse(path)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1920, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: syntax error: line 1, column 0
I'm building on an Ubuntu 12.04 VM on my Win7-64 Core i7 [email protected] just fine. I think the VM has 4-6GB RAM (12GB in system) and it builds quickly without problems.
CalcProgrammer1 said:
I'm building on an Ubuntu 12.04 VM on my Win7-64 Core i7 [email protected] just fine. I think the VM has 4-6GB RAM (12GB in system) and it builds quickly without problems.
Click to expand...
Click to collapse
Thanks for the confirmation, I'm using my laptop right now, but if it takes too long to build, I'd move the vm to the desktop, which is plenty powerful (2600k @ 5ghz )
Similar Error
BlkSquad said:
I've tried following your guide here but I get errors using your local_manifest.xml. However, if I skip the wget of your local_manifest file it goes with no trouble. Would it hurt to skip that step?
Click to expand...
Click to collapse
I don't know if it would hurt but I had a simliar issue (I just set up my linux environment today). I would run the wget command and it seemed to work fine, but when I ran the sync command I would get the same error you did.
I ended up going directly to the .xml page the it's pointing to and copied the xml code on that page and replaced the text in the .repo/local_manifest.xml file with the copied .xml code.
I'm running the sync now and it appears to be progressing without any trouble.

[Q] CM KitKat build problem - add prebuilt package?

Hi, I'm trying to build CM KitKat for the Optimus S/V (unsupported by CM). The build is crashing out trying to link libwebviewchromium.so.
It gives dozens and dozens of errors like this:
external/chromium_org/content/browser/android/browser_media_player_manager.cc:70: error: relocation overflow in R_ARM_THM_CALL
At the end it prints this:
collect2: error: ld returned 1 exit status
make: *** [/home/dbrown/cm11/out/target/product/thunderc/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1
It may be a problem with insufficient memory on my build machine (Core 2 Duo laptop with 3 gb ram). For the time being, or in case that's not the problem I'm looking for a work-around. I looked in the Android.mk file for external/chromium_org and saw this:
# Don't include anything if the product is using a prebuilt webviewchromium.
ifneq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes)
Is it possible, and if so how can I add a prebuilt webview library so I can get past this error? I just want to get something built for now so I can test it. This would be the first successful build for this device. Thanks!
Open the "external/chromium_org/content/browser/android/browser_media_player_manager.cc"
And go to line Num. 70..
Youd better to see "https://bugs.launchpad.net/binutils-linaro/+bug/641126"
In that case, Loïc Minier was solve the add physical ram.
To try swap memory!
I know this is a bit necro but I thought I'd add.
I got the same error in libchromium. 16Gb ram. Went down to -j1 on make and it compiled. I have a 6-core chip :/
Similar query
For doing the android clean build faster I wanted to avoid building libwebviewchromium. Can someone provide the exact changes needed for this. Is libwebviewchromium.so enough ? or do we have to have related jars as well from first build.
@skinbark @winvinay add the following line to your devices BoardConfig.mk. (I.e. YOURSOURCEFOLDER/device/MANUFACTURER/DEVICE/BoardConfig.mk e.g. ~/AOSP/device/asus/grouper/BoardConfig.mk for me):
Code:
PRODUCT_PREBUILT_WEBVIEWCHROMIUM := yes
Just remember to add libwebviewchromiun.so from another ROM to /system/lib/ afterwards.

Build freezes at building libwebviewchromium.so

Hi all!
I am building cm12 from 100% working sources but my build freezes when building libwebviewchromium.so.
My log is just like this
Code:
Install: /out/target/u8860/system/app/Email/Email.apk
{new line}
If I press ctrl+c I am getting
Code:
Install: /out/target/u8860/system/app/Email/Email.apk
make: Stopping building /out/target/u8860/blablbabla/libwebviewchromium.so
If I start building again, it freezes again. But if I pull this file from the simillar phone, the build is OK.
What is wrong?
for me compiling libwebviewchromium.so takes the longest compiling time. around 20-30minutes just to compile this
Sent from my LG-D410 using XDA Premium 4 mobile app
hadidjapri said:
for me compiling libwebviewchromium.so takes the longest compiling time. around 20-30minutes just to compile this
Sent from my LG-D410 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Sure, maybe I just need to wait more... But my CPU dont think so
UPD: Waited ~2hours and got absolutely freezed system.
After hard reboot I found 1.4gb libwebviewchromium.so file.
Hey mates :crying:
I have exactly same issue. I waited >20 mins but still at
Code:
target SharedLib: libwebviewchromium (/home/henry/cm11/out/target/product/aries/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so)
I recorded the size of the libwebviewchromium.so at one time, it is 1.4GB (1,405,675,432 bytes)
After several minutes, the size (after refresh) is still (1,405,675,432 bytes) !!! But the 'modified time' changes to the current time. But it doesn't freeze.
What should I do? Continue waiting?
Btw, I have already 4GB SWAP:
Code:
$ sudo swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 1998844 1994956 -1
/swapfile file 4194300 353196 -2
Help me!!! I am frustrated!!:crying:
henry0504 said:
Hey mates :crying:
I have exactly same issue. I waited >20 mins but still at
Code:
target SharedLib: libwebviewchromium (/home/henry/cm11/out/target/product/aries/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so)
I recorded the size of the libwebviewchromium.so at one time, it is 1.4GB (1,405,675,432 bytes)
After several minutes, the size (after refresh) is still (1,405,675,432 bytes) !!! But the 'modified time' changes to the current time. But it doesn't freeze.
What should I do? Continue waiting?
Btw, I have already 4GB SWAP:
Code:
$ sudo swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 1998844 1994956 -1
/swapfile file 4194300 353196 -2
Help me!!! I am frustrated!!:crying:
Click to expand...
Click to collapse
One solution I've found is placing another libwebviewchromium.so into the directory out/target/product/aries/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/
I tried one from official sources, everything is ok but it is not usable on phone --> a lot of crashes
Try waiting as much as you can
I was building CM12 from source (in a VM) and when this part came, it took approx. 2 hrs 45 mins.
So try waiting. It will finish (possibly)
Cheers!
-Technohacker
up to 10 post hix,up for everyone
Guys, libwebchromium is a massive library, depending on your CPU it can take 1hr-3hrs.
So eat some crackers and drink some tea. You're in for a long ride
Cheers.
Oh and BTW, if you're building cyanogenmod in a VM like me and can't allocate more RAM, try partitioning your virtual hard disk to make a large swap partition. It can help
Sent from my GT-I9003 using XDA Free mobile app
My build gets successfully compiled but when I boot up the ROM,I get SystemUI FC.Does adding Chromium support will help it out?
PS - I was compiling Candy5 5.1.1 for my msm8226 device.
In AOSP 6.0 sources, libwebviewchromium build is replaced with a prebuilt version supplied by the chromium project. Really is a boon
Cheers!
Technohacker
well u can use Prebuilt Webviewchromiuim to speed up build
Here You Go
Add this flag to Boardconfig.mk
PRODUCT_PREBUILT_WEBVIEWCHROMIUM=yes
You say to wait, however I've been waiting for ages, and the tune on my virtual machine is about an hour behind, bit the time goes up in jumps

Categories

Resources