[Android Software/Hacking General [Developers Only]] SaberShip:
Thanks [MENTION=7350242]Uldiniad[/MENTION] for your work here, it has been very helpful so far!

Using your instructions in the OP I've been able to make it further along in the Lineage 15.1 build process on WSL (build 17618 RS5) than before.

I'm currently running into some odd consistency issues, for example I can run a build and it might not be able to find file X (that I can verify exists) then I can "make clean" and start again from the "source build/envsetup.sh" without doing a "repo sync" or making any other changes and the problem will be completely different. The build might fail Immediately, or it might run awhile before hitting a snag with something seemingly simple (for example after 10 mins or so of building a "touch" command failed on me once).

Here's a silly one:

[ 10% 10372/96279] //external/libopus:libopus clang src/opus_multistream_encoder.c [arm]
FAILED: /mnt/s/Projects/Android/Clark-Lineage-Oreo/out/soong/.intermediates/external/libopus/libopus/android_arm_armv7-a-neon_cortex-a53.a57_shared_core/obj/external/libopus/src/opus_multistream_encoder.o
PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-4053586/bin/clang -c -Iexternal/libopus/include -Iexternal/libopus/src -Iexternal/libopus/silk -Iexternal/libopus/celt -Iexternal/libopus/silk/fixed -Iexternal/libopus -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -DNDEBUG -g -Wstrict-aliasing=2 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=$PWD/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1 -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Isystem/core/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Ilibnativehelper/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Ilibnativehelper/include_deprecated -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -Drestrict= -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -O2 -fno-math-errno -DOPUS_ARM_ASM -DOPUS_ARM_INLINE_ASM -DOPUS_ARM_MAY_HAVE_EDSP -DOPUS_ARM_INLINE_EDSP -DOPUS_ARM_MAY_HAVE_MEDIA -DOPUS_ARM_INLINE_MEDIA -DOPUS_HAVE_RTCD -DOPUS_ARM_MAY_HAVE_NEON -DOPUS_ARM_MAY_HAVE_NEON_INTR -DOPUS_ARM_PRESUME_NEON -DOPUS_ARM_INLINE_NEON -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -fPIC -D_USING_LIBCXX -std=gnu99 -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF /mnt/s/Projects/Android/Clark-Lineage-Oreo/out/soong/.intermediates/external/libopus/libopus/android_arm_armv7-a-neon_cortex-a53.a57_shared_core/obj/external/libopus/src/opus_multistream_encoder.o.d -o /mnt/s/Projects/Android/Clark-Lineage-Oreo/out/soong/.intermediates/external/libopus/libopus/android_arm_armv7-a-neon_cortex-a53.a57_shared_core/obj/external/libopus/src/opus_multistream_encoder.o external/libopus/src/opus_multistream_encoder.c
Can't read /proc/cpuinfo: No such file or directory
clang.real: error: unable to execute command: Segmentation fault (core dumped)
clang.real: error: clang frontend command failed due to signal (use -v to see invocation)
Android clang version 5.0.300080 (based on LLVM 5.0.300080)
Target: arm--linux-android
Thread model: posix
InstalledDir: prebuilts/clang/host/linux-x86/clang-4053586/bin
clang.real: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang.real: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang.real: note: diagnostic msg: /tmp/opus_multistream_encoder-2d41d9.c
clang.real: note: diagnostic msg: /tmp/opus_multistream_encoder-2d41d9.sh
clang.real: note: diagnostic msg:

********************
[ 10% 10381/96279] //frameworks/wilhelm/src:libopensles_helper clang handlers.c
ninja: build stopped: subcommand failed.
22:40:04 ninja failed with: exit status 1

#### failed to build some targets (25:59 (mm:ss)) ####

/proc/cpuinfo is an interesting choice... :eek:

My understanding is that the random nature of the errors is probably a WSL thing? I use WSL quite a bit for things other than building android and havn't run into any behavior like this yet. Do you have any suggestions or would I be better off going back to native Ubuntu for this?

Thanks.