WSL: Can't compile Android Open Source Project with Bash On Windows

When trying to follow the AOSP build instructions for Sony devices under the “Build AOSP Nougat 7.1” section here https://developer.sonymobile.com/open-devices/aosp-build-instructions/how-to-build-aosp-nougat-for-unlocked-xperia-devices/#build-aosp-nougat-7-1 almost immediately after running make I am given

Running kati to generate build-aosp_e6853.ninja...
make: *** [out/build-aosp_e6853.ninja] Segmentation fault (core dumped)

I’ve stored what I believe to be the dump file output here https://gist.github.com/anonymous/18492035989c5761d596f1c39b26fffd, but it really doesn’t seem like it contains anything useful.

I am on Windows Home, Version 1607 (OS Build 14393.693) and I can confirm that on a linux virtual machine the Android Open Source Project produces flash-able android system images without error.

I really wish I had more info about this problem, but I do not. I am however open to people’s suggestions on how to collect and provide more information about the problem with instructions.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

I’m not on the WSL team personally (I’m just another user), but I bet it’s an “enhancement” because it’s a major and mostly standalone piece of functionality that many applications and frameworks don’t require. And it’s probably a real pain to implement 😃

WSL is effectively, as far as I can tell, reimplementing a kernel with the CONFIG_IA32_EMULATION kernel compile-time config flag disabled. This is a perfectly valid configuration for a Linux kernel, it substantially simplifies the kernel, and it works quite well with a large fraction of existing software and workflows. But it doesn’t work with everything and it’s not what Ubuntu does.

The Linux kernel has a lot of features. Some are used very frequently, some very rarely; some are easy to implement, others are much more work. I expect it will be many years, if ever, before the WSL team has finished providing an exact bug-for-bug-compatible reimplementation of all interfaces to the Linux kernel. So if your definition of a bug is any incompatibility, then basically everything in this ticket-tracker is a bug 😃 If everything is a bug, then it’s not really useful to say whether something is a bug or not, because the answer is “yes, it is a bug” 😃 So the WSL team sometimes uses terms other than “bug” to convey information about where something currently resides in their priority queue.

strace -ff make 2> build.strace. Omit the -j <n>. Just looking at the build instructions though, g+±multilib and zlib1g-dev:i386 are probably going to bite you. If that turns out to be the problem (as with #1687) the User Voice is here.

I have success build LineageOS from WSL. https://github.com/kxzxxx/android_build Then, use flex, bison, python 64bit instead But sometimes jack will hang. Just kill it then make again

Why would 32 bit binaries be an “enhancement”? This would be necessary to compile Android ROMs, which is a workflow typically requiring Ubuntu. Isn’t that part of the Bash project?