QuestionHello friends.Last night I lost my mind.A long time ago I wrote a really crude and primitive shell in C++, and I onlyjust recently discovered asm.js, so I thought it'd be neat to try to compile and run it in a browser, but I can't because the apt-packages are incompatible. I installed the llvm, clang, and emscripten packages and they're all up-to-date with what's in the repos. Here's my test file, hello.c:#include <stdio.h>int main(){    printf(Hello World!\n);    return 0;}This compiles and runs just fine with clang hello.c && ./a.out, but when I run emcc hello.c I get the error /usr/bin/lli: error creating EE: No available targets are compatible with this triple, see -version for the available targets.FAIL: Running the generated program failed!which does generate a.out.js, but it only contains the first line reference to a.out.js.map as it's SourceMap (the map itself only contains the line: {version:3,file:a.out.js,sources:[],names:[],mappings:}. Now I THINK this means that the llvm wasn't compiled with -targets=all, or at least without the js target, so I tried building it from source. I fetched the latest packages, meticulously following the steps outlined here and here, and both packages built successfully. However, when run like this, emiscript complained that it 'expected 3.4' but got '(tags/RELEASE_380/final)' for the version information, and subsequently fails. Just to be safe, I had apt-purged emscripten, llvm and clang before starting the source build, and I would hope that 3.4 is the minimum version, not the only supported version, because the latest build is 3.9 I believe, and the docs didn't say to take any special consideration. Anyway, I tried building the 3.4 from source, but apparently it doesn't recognize 'js' as a valid target (I tried building without that and running it anyway: no dice). It's bizarre to me that the emscripten apt-package doesn't pull in the properly-compiled clang/llvm as a dependency, so am I maybe doing the invocation wrong? The docs say I should just be able to do what I'm doing, but I'm new to clang/emscripten, so maybe I have to set up the clang environment first, or alternatively explicitly link something? Please help, I haven't slept in 48 hours, this is running on Windows (but my shell depends on gnu's readline, so I don't want to just give up and do it on windows) and not Linux, which is as unforgivable as it is maddening.SYSINFOclang/clang++ version and info (from clang --version):clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)Target: i686-pc-linux-gnuThread model: posixInstalledDir: /usr/binllvm version and info (from lli --version):LLVM version 3.8.0Optimized build.Built Jul  9 2016 (11:22:59).Default target: i686-pc-linux-gnuHost CPU: broadwellemscripten version (from emcc --version): 1.22.1contents of most recently-generated ~/.emscripten_sanity: 1.22.1|le32-unknown-nacl|/usr/bin|(tags/RELEASE_380/final)paste of most recently-generated ~/.emscsriptenkernel info (from uname -srpmio): Linux 4.4.0-21-generic i686 i686 i686 GNU/LinuxSystem is a VirtualBox VM with extensions installed, running Linux Mint 18 Sarah Cinnamon as a 32-bit machine with 2 CPU cores, 4GB RAM, 512mb Video Memory, and ~50GB virtual disk image. No other OS's are present, basically a vanilla install. Currently has the default versions of clang, llvm and emscripten made available by the apt repositories.
Emscripten fundamentally incompatable with clang on linux
javascript;c;linux;clang