Android build Error

Source: Internet
Author: User

The 4.0 project that has been compiled and updated recently has been compiled well before. The following error occurs today:

Target sharedlib: libwebcore (Out/Target/product/xxxx/obj/shared_libraries/libwebcore_intermediates/linked/Libwebcore. So) collect2: LD to signal9[Killed] Quit.

It seems that all files have been compiled, but an error occurs when you go to the link library,Collect2: LD exits with signal 9 [killed]Such as insufficient memory;

Let's take a look at the recent modifications to WebCore, But it's common.CodeModification, no changes related to MK files, so there is a low probability of problems;

Later, I suspected it was a problem with the GCC compiler. I checked the GCC version that I used. The version was 4.3. I changed it to a later version and tried it. Both versions of 4.5 and 4.4 still had the same compilation error;

So I finally suspected that it was my ubutu system problem,Collect2: LDSignal 9 [Killed] Quit, Here signal 9 I don't know what it means. I checked it online, it seems that the array is too large, not specific; I know that the signal 7 error means that the memory is too small, so I tried to check the memory;

Free-m

 
Root @ desktop-Ubuntu :~ # Free-M total used free shared buffers cachedmem:19761916600718523-/+ Buffers/cache:6741302Swap:2560256

 

 

Khan, my swap partition is only 256 m, the system is installed with wubi, And the swap partition is automatically set. I have been using it well, and I have never taken care of any problems, it seems that the swap space needs to be changed after Ubuntu is installed.

My memory is 2 GB, so after the swap space is increased to 2 GB, libwebcore compilation passes smoothly;

 

Step for improving the swap space:

 

1. CD/host/Ubuntu/disks/
2. sudoSwapoffSwap. Disk
3. sudo RM swap. Disk
4. sudo dd If =/dev/Zero of = swap. Disk BS = 1 m COUNT = 2 k (create 2G swap, this step is slow)
5. sudoMkswap-F swap. Disk
6. sudoSwapon/Host/Ubuntu/disks/swap. Disk (this step is slower, probably less than 1 minute)
Now, run the free command, and we can see that swap is as large as memory.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.