openframeworks / ofSite

openFrameworks web site
http://openframeworks.cc
159 stars 577 forks source link

Update emscripten guide #722

Closed ofTheo closed 4 years ago

ofTheo commented 4 years ago

This is based on what worked via the forum discussion thread for macOS and linux. I am not able to test the 32bit steps, but they should be valid.

@arturoc if this makes sense to you feel free to merge. Thanks!

closes #716

arturoc commented 4 years ago

is there any problem with the official instructions? i feel this will change at some point and leave this instructions outdated

ofTheo commented 4 years ago

yeah - I followed the current instructions and got a whole bunch of errors. I think relating to 32bit code needing to be 64bit if I remember.

There is a bunch of discussion about it here ( and further down ): https://forum.openframeworks.cc/t/latest-emscripten-doesnt-work-on-examples/30463/9

The above was based on the minimal commands needed to get it building/running. ( there might be another way? )

My thought was that probably fairly soon we could go back to the old instructions once incoming becomes stable.

ofTheo commented 4 years ago

Just tested with the current setup instructions on the site and I get a bunch of errors relating to 32bit wasm code.

wasm-ld: error: Conversion8.o: machine type must be wasm32
wasm-ld: error: ConversionType.o: machine type must be wasm32
wasm-ld: error: Flip.o: machine type must be wasm32
wasm-ld: error: Rescale.o: machine type must be wasm32
wasm-ld: error: error_code.o: machine type must be wasm32
wasm-ld: error: operations.o: machine type must be wasm32
wasm-ld: error: path.o: machine type must be wasm32
wasm-ld: error: /Users/theo/Downloads/of_v0.11.0_osx_release/libs/freetype/lib/emscripten/libfreetype.bc: machine type must be wasm32
wasm-ld: error: /Users/theo/Downloads/of_v0.11.0_osx_release/libs/pugixml/lib/emscripten/libpugixml.bc: machine type must be wasm32

using the site instructions but changing it to this:

./emsdk install latest-fastcomp
./emsdk activate latest-fastcomp

Works for me and doesn't require a 20 minute recompile of incoming-64bit I think the issue is that emsdk install latest they recently switched to llvm as the compiler but it isn't quite working.

So going back to the latest of the non llvm compiler works, or using the incoming-64bit works too.

So either newer or older. :)