Forum Replies Created
-
AuthorPosts
-
Whew – finally got emscripten going on macos.
I couldn’t get any of the precompiled sdks to work due to the ‘llvm-ar’ issue above so ended up installing sdk-incoming-64bit, which involves a build from source which takes a while. But if you’ve got xcode installed (and I think you need cmake too) it should ‘just work’.
I have made a few tweaks to bin/env_macos.txt and it all should be going again, although you’ll need to install/build the incoming version as per above.
Sorry about this disaster, you might have been better sticking with your original install after all but I meant well!
Ok, having mixed results with this.
The Pointer_stringify error can be fixed like this:
MX2_LD_OPTS_EMSCRIPTEN=-s USE_SDL=2 -s TOTAL_MEMORY=268435456 -s DISABLE_EXCEPTION_CATCHING=1 -s “EXTRA_EXPORTED_RUNTIME_METHODS=[‘Pointer_stringify’]”
Unfortunately, the precompiled macos emscripten releases appear to be completely knackered due to this issue:
https://github.com/kripken/emscripten/issues/5418
Currently trying to build incoming-64bit from source…sorry I got you to uninstall yours!
…building modules!
Had no problems with ted2go though, dunno what’s up there.
I’ll have another go at installing emscripten on mac tomorrow.
Ok, just pushed a potential fix to develop branch.
I had to change the ‘comment’ system in the env var files a bit. Comment chars must now appear at beginning of a line only, this allows for apostrophes in env vars so =’allow’ should work now.
Have tested it here but only on Windows as I have *never* been able to successfully install emscripten on macos for some reason!
So any problems you may have will probably be in bin/env_macos.txt. I had to change this a bit and remove any ‘inline comments’ (there were a few in there).
Well waddya know, looks like I didn’t even properly test my last little fix as I get the same error here! Probably built the wrong target…huge apologies….there may have been small amounts of beer involved…am running purely on caffeine today, promise!
You are not going to like this.
No problem, we’ll get there!
I think I know what’s up too (and why I originally hardcoded LD WASM opts into mx2cc) – the apostrophe is behaving like a comment in the env.txt file.
Will do some tweaking…
You are not going to like this.
No problem, we’ll get there!
I think I know what’s up to0 (and why I originally hardcoded LDWASM opts into mx2cc) – the apostrophe is behaving like a comment in the env.txt file.
Will do some tweaking…
The ‘allow’ error looks like it was caused by a emscripten linker option hardcoded into mx2cc. I have tweaked mx2cc so this option is now configurable via bin/env_windows.txt etc:
MX2_LD_OPTS_EMSCRIPTEN_WASM=-s BINARYEN=1 -s BINARYEN_TRAP_MODE=’allow’
This is just what used to be hardcoded into mx2cc – all I can say for sure is that it works on MY setup!
To build with 1.37.9 you’ll (probably) need to change this to:
MX2_LD_OPTS_EMSCRIPTEN_WASM=-s BINARYEN=1
Note that this var is appended to MX2_LD_OPTS_EMSCRIPTEN when building wasm (or wasm+asmjs) apps.
Not the prettiest, but I’m gonna stick with emsdk ‘latest’ versions for now as they seem to be easiest to install, and this does at least let you experiment with later versions that may break some stuff. Well, when it comes to LD opts anyway.
You’ll need to grab the latest from develop and updatemx2cc for this to work. Assuming it does work, as I’m running emsdk v1.37.26 and haven’t tested it with any 1.37.9 version yet.
Ok, think I know where the “NameError: name ‘allow’ is not defined” error is coming from.
I would still like to know what version of emscripten people are running and how they are installing it. It does seem like there are numerous issues related to different versions of emscripten, which is understandable I guess.
Another thing to note is that after activating ‘latest’ with emsdk, I have to go through and manually update a bunch of env vars and PATH settings to point to various things inside emsdk dir. The emsdk tries to do this but of course all env vars are lost as soon as you close the console.
I did waste a day+ trying to put together a truly portable emsdk but gave up in the end. I am kind of hpoing some 3rd party will grab the bull by horns and release an emsdk-deluxe that ‘just works’ and sets up paths properly and everything.
Well, I *was* using 1.37.9, but went back to using ‘latest’ as others seemed to be having problems installing 1.37.9 and ‘latest’ was working fine for me – still is! In fact, emscripten has always worked for me, amazingly…
I though it’d be best just to try and use the version installed by ’emsdk install latest’ so everyone was on the same page and it’s probably what we’re supposed to be using?
I am also now a bit unclear on exactly where people are even getting 1.37.9 from too, or are they rebuilding from source?
Using the emsdk-portable-64bit, if I go ’emsdk update’ it says:
Monkey12345678910111213141516Fetching all tags from Emscripten Github repository...Done. 114 tagged releases available, latest is 1.37.27.Fetching all tags from Binaryen Github repository...Done. 41 tagged Binaryen releases available, latest is 1.37.27.Fetching all precompiled Nightly versions..Downloading: D:/devtools/emsdk-portable-64bit/llvm-nightlies-32bit.txt from https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/nightly/win_32bit/index.txtDownloading: D:/devtools/emsdk-portable-64bit/llvm-nightlies-64bit.txt from https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/nightly/win_64bit/index.txt, 19124 BytesDownloading: D:/devtools/emsdk-portable-64bit/emscripten-nightlies.txt from https://s3.amazonaws.com/mozilla-games/emscripten/packages/emscripten/nightly/win/index.txt, 19887 BytesFetching all precompiled tagged releases..Downloading: D:/devtools/emsdk-portable-64bit/llvm-tags-32bit.txt from https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/tag/win_32bit/index.txtDownloading: D:/devtools/emsdk-portable-64bit/llvm-tags-64bit.txt from https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/tag/win_64bit/index.txt, 1035 BytesBut of course, true to form, if I install/activate latest I only get 1.37.26!
If I go ’emsdk list’ I can see some precompiled 1.37.9 versions that look like they’re from April. In fact, here’s my whole emsdk list output:
Monkey12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879The following precompiled tool packages are available for download:clang-nightly-e1.37.9-2017_04_19_23_39-64bitclang-nightly-e1.37.9-2017_04_20_04_06-64bitclang-e1.30.0-64bitclang-e1.34.1-64bitclang-e1.35.0-64bitclang-e1.37.1-64bitclang-e1.37.25-64bitclang-e1.37.26-64bitnode-4.1.1-32bit* node-4.1.1-64bit INSTALLEDpython-2.7.5.3-32bit* python-2.7.5.3-64bit INSTALLEDjava-7.45-32bit* java-7.45-64bit INSTALLEDspidermonkey-37.0.1-64bitspidermonkey-nightly-2015-04-12-64bitgit-1.9.4emscripten-1.30.0emscripten-1.34.1emscripten-1.35.0emscripten-1.37.1emscripten-1.37.25emscripten-1.37.26emscripten-nightly-1.37.9-2017_04_19_23_39emscripten-nightly-1.37.9-2017_04_20_04_06vs-tool-0.9.4 Not available: Visual Studio 2010 was not found!crunch-1.03gnu-2.5.4mingw-7.1.0-64bitThe following tools can be compiled from source:clang-tag-e1.37.26-32bitclang-tag-e1.37.27-32bitclang-tag-e1.37.26-64bitclang-tag-e1.37.27-64bitclang-incoming-32bitclang-incoming-64bitclang-master-32bitclang-master-64bitemscripten-tag-1.37.26-32bitemscripten-tag-1.37.27-32bitemscripten-tag-1.37.26-64bitemscripten-tag-1.37.27-64bitbinaryen-tag-1.37.26-32bitbinaryen-tag-1.37.27-32bitbinaryen-tag-1.37.26-64bitbinaryen-tag-1.37.27-64bitemscripten-incoming-32bitemscripten-master-32bitemscripten-incoming-64bitemscripten-master-64bitbinaryen-master-32bitbinaryen-master-64bitThe following precompiled SDKs are available for download: (Run "./emsdk update" to pull in the latest list)sdk-nightly-1.37.9-2017_04_19_23_39-64bitsdk-nightly-1.37.9-2017_04_20_04_06-64bitsdk-1.30.0-64bitsdk-1.34.1-64bitsdk-1.35.0-64bitsdk-1.37.1-64bitsdk-1.37.25-64bitsdk-1.37.26-64bitThe following SDKs can be compiled from source:sdk-incoming-32bitsdk-incoming-64bitsdk-master-32bitsdk-master-64bitsdk-tag-1.37.26-32bitsdk-tag-1.37.27-32bitsdk-tag-1.37.26-64bitsdk-tag-1.37.27-64bitItems marked with * are activated for the current user.To access the historical archived versions, type 'emsdk list --old'So which 1.37.9 are people actually using, and how are they installing it, and which version do they actually get if they just install/activate ‘latest’?
Ha ha, nice find, happy christmas all!
Please post your env_windows.txt file.
‘Lazy initialization’ can help here:
Monkey123456789101112131415161718Function GetControls:IntMap<Key>()Global controls:IntMap<Key>If Not controlscontrols=New IntMap<Key>controls[Direction.U] = Key.Upcontrols[Direction.D] = Key.Downcontrols[Direction.R] = Key.Rightcontrols[Direction.L] = Key.LeftEndifReturn controlsEndCool!
-
AuthorPosts