Joined: 27 Dec 2005
Location: Santa Cruz, CA
|Posted: Sun Nov 29, 2015 11:53 am Post subject: Previous.js
|I've been poking around, trying to get Previous to build using Emscripten and clang.
I am able to build the SDL2 tests, and I'm able to get Previous to compile using the emscripten/cmake chain. The resulting Mac OS X build runs (and really flies).
I'm hitting my head with Emscripten's linking phase.
It seems necessary to build Previous with the '-shared' flag to get around the challenge of linking objects (without duplicates). These pop out as archives (.a) files, and I'm able to unpack them, but emscripten won't link:
"WARNING:root:dlgAbout.c.o is not valid LLVM bitcode"
- Get the Emscripten SDK https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
- Extract, cd into the SDK
- Run ". emsdk_env.sh"
- Run "emsdk install latest"
- Run "emsdk activate --embedded"
- svn checkout svn://svn.code.sf.net/p/previous/code/trunk previous-code
You should then be able to enter previous-code and 'mkdir build ; cd build ; emconfigure ../configure ; emmake cmake ../ ; emmake make'
Emscripten has it's own 'port' of SDL2, which I am able to build and test. 'emcc --clear-ports --clear-cache' and then './tests/runner.py browser.test_sdl2_image'
Unfortunately, I now find myself at the limit of my grasp and haven't been able to track down a build log for builds of Hatari under Emscripten.
Changes have been made to Hatari to allow builds with Emscripten, but I'm not having any luck with the Hatari build process, either.