I've also noticed the same that 32-bit Linux is now unable to build LLVM - this occurred sometime after January in LLVM 3.8 -> 3.9 merge. Like you mention, it's not a question of having tons of swap space, or doing a single core build, but the process address space gets exhausted during the link. Successful workarounds for reducing memory usage have been:
- rebuild after the first link, i.e. just reissue "./emsdk install sdk-incoming-64bit" command, it will incrementally pick up from the previous failed build attempt. Not sure why this exactly helps, but it seems to. - if building the incoming tag (and not e.g. a tag or master), build the Release CMake configuration instead of the default RelWithDebInfo by issuing "./emsdk install --build=Release sdk-incoming-64bit". This omits debugging info, which cuts down memory usage at link time a bit. I don't know how much of swapfile space is needed, I guess that depends on the amount of RAM that is available. I'm quite positive that with 8GB of RAM, on a 4-core machine, the whole build process should stay within the RAM limits and not swap. It is common to have as much swap as there is RAM, so having 8GB of swap on 8GB of RAM should be plenty for this. (I think on 64-bit, 4GB of swap + 4GB of RAM should also work, although it might momentarily swap) Latest Emscripten incoming branch and the newest tags no longer support building with Visual Studio 2013. This is because upstream LLVM has migrated to requiring VS2015 for the build. Also, the latest update, VS2015 Update 3 is required iirc, or otherwise there's some lambda expressions that will fail to parse with a compiler error. If you do want to build with MinGW instead of VS2015, that should work. Install MingW64 and add it to PATH, and then issue "emsdk install --mingw sdk-incoming-64bit' (or a tag name if you want to build a tagged version). Note that when choosing to activate the configuration, you'll need to remember to reissue --mingw there as well, so run "emsdk activate --mingw sdk-incoming-64bit". 2016-08-19 6:31 GMT+03:00 <[email protected]>: > For 2 years, I have been building emsdk on a 32bit Linux VM(VirtualBox > only supports 32bit guest). A few months ago I hit a roadblock that the > emsdk linking fails due to insufficient memory. I increased my swapfile to > 8GB but 32bit OS can only access up to 3.5GB I believe. So my emsdk stuck > to the one released in Dec 2015. > > Today, I had a new Windows PC with hyper-v. I am going to create a 64bit > Linux VM on hyper-v. Please advise minimum Linux swapfile size should I use > in order for the emsdk linking to be successful? > > I had built latest emsdk successfully before on Windows but it crashed my > Visual Studio 2013 when building my Emscripten project. Is it possible to > build my Emscripten project with latest emsdk on Windows without using > Visual Studio? > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
