Reputation: 39
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" -o out/soong/build.ninja --bazel-mode --globListDir build --globFile out/soong/globs-build.ninja -t -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available -- used_env out/soong/soong.environment.used.build Android.bp Killed 11:34:29 soong bootstrap failed with: exit status 1 This is the error im facing can someone help me out...
Cant understand the error to try anything.
Upvotes: 1
Views: 5122
Reputation: 476
I had the same issue building Android 15. "dmesg" showed the android 15 build process getting killed due to out of memory. I followed instructions here https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04 and increased the swapsize to 8GB and that resolved the issue.
Upvotes: 0
Reputation: 1453
If you are struggling to build with less than recommended RAM, a couple of things I noticed while fixing the build in my hexacore CPU with 16Gb RAM,
Make sure the RAM + SWAP is greater than 32GB, I recommend ~34GB. Based on other processes running in the Machine, increase it.
Increase the swappiness to closer to 100. I recommend ~80. This will more frequently empty RAM for processing.
Run the build with half of the capability of your machine. If you have a machine capable of 12 threads, try to reduce the threads for build to 6. This will provide room for any additional running processes including the swap process. If it works, try increasing the threads to reduce build time, or else try reducing threads.
make -j6
Upvotes: 0
Reputation: 450
Refer below blog to increase swap memory
[https://www.linode.com/docs/guides/how-to-increase-swap-space-in-ubuntu/][1]
grep Swap /proc/meminfo
Resize Swap to 8GB
# Turn swap off
# This moves stuff in swap to the main memory and might take several minutes
sudo swapoff -a
# Create an empty swapfile
# Note that "1G" is basically just the unit and count is an integer.
# Together, they define the size. In this case 8GB.
sudo dd if=/dev/zero of=/swapfile bs=1G count=8
# Set the correct permissions
sudo chmod 0600 /swapfile
sudo mkswap /swapfile # Set up a Linux swap area
sudo swapon /swapfile # Turn the swap on
Check if it worked
grep Swap /proc/meminfo
Make it permanent (persist on restarts)
Add this line to the end of your /etc/fstab:
/swapfile swap swap sw 0 0
Upvotes: -1
Reputation: 21
I had the same problem today. After increasing the swap file size to 32gb, it's now working.
Upvotes: 2