title: Android Opensource Project build error `FAILED: out/soong/build.ninja`
body: <p>I became interested in the Android's source code. I precisely repeated all the steps from the official guide <a href="https://source.android.com" rel="nofollow noreferrer">source.android.com</a> to compile it.</p>
  
  <p><strong>I tried to compile it and I got:</strong>  </p>
  
  <pre><code>... error while loading shared libraries: libncurses.so.5: cannot open shared
  object file: No such file or directory
  </code></pre>
  
  <p><strong>To fix it:</strong>  </p>
  
  <p>Arch: <a href="https://wiki.archlinux.org/index.php/Official_repositories#multilib" rel="nofollow noreferrer">Enable multilib</a>,<code>sudo pacman -S lib32-ncurses</code>  </p>
  
  <p>Ubuntu: <code>sudo apt install libncurses5:i386</code></p>
  
  <hr>
  
  <p><strong>Then i tried to compile again</strong>  </p>
  
  <p>Next time i got no errors messages except exit status 1</p>
  
  <pre><code>[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
  FAILED: out/soong/build.ninja
  out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b 
  out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build
  -globs.ninja -o out/soong/build.ninja Android.bp
  21:03:08 soong bootstrap failed with: exit status 1
  
  #### failed to build some targets (24:14 (mm:ss)) ####
  </code></pre>
  
  <p>When there are no error messages, I can't guess what's the matter</p>
  
  <p><strong>But i know, what:</strong></p>
  
  <ul>
  <li>This error is independent of linux distribution</li>
  <li>Deleting and downloading all sources again cannot fix this error</li>
  <li>Before I get this error, my computer freezes</li>
  </ul>