Emscripten: machine type must be wasm32 or wasm64

If I build for emscripten (using the latest version), I get the below errors.

It seems like we need to rebuild these libraries (according to https://github.com/emscripten-core/emscripten/issues/10342)

I wonder if there’s any Makefile or script to rebuild these libraries.

wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(BitmapAccess.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(GetType.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(MemoryIO.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(Plugin.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(Conversion.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(Conversion24.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(Conversion32.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(Conversion8.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(ConversionType.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(Flip.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/FreeImage/lib/emscripten/libfreeimage.a(Rescale.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/boost/lib/emscripten/libboost_system.a(error_code.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/boost/lib/emscripten/libboost_filesystem.a(operations.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/boost/lib/emscripten/libboost_filesystem.a(path.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/freetype/lib/emscripten/libfreetype.bc: machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/pugixml/lib/emscripten/libpugixml.bc: machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/tess2/lib/emscripten/libtess2.a(tess.c.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/uriparser/lib/emscripten/liburiparser.a(UriFile.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/uriparser/lib/emscripten/liburiparser.a(UriNormalize.o): machine type must be wasm32 or wasm64
wasm-ld: error: /Users/cuinjune/Downloads/openFrameworks-patch-release/libs/uriparser/lib/emscripten/liburiparser.a(UriParse.o): machine type must be wasm32 or wasm64