Building Qt5.14.2 for WebAssembly shared returns error.
-
When I tried to configure the wasm build with the
shared
flag.Full command:
../qt5/configure -opensource -release -shared -confirm-license -xplatform wasm-emscripten -feature-thread -nomake examples -no-dbus -no-ssl -prefix $PWD/../qt5_wasm_binaries
The output gave this error:
ERROR: Feature 'shared' was enabled, but the pre-condition '!config.integrity && !config.wasm && !config.rtems' failed.
Q: Why do you have the necessity to build wasm as
shared
and notstatic
?A: I'm trying to use a 3rd party library (MITK), which requires
qtwebengine
module, more specificWebEngineWidgets
. QtWebEngine's wiki clearly states that it can't be build statically.Right now, my only alternative seems to be finding a way to build wasm as
shared
. There is any way?I'm only asking because I couldn't find a definitive statement like: "Qt for WebAssembly can't be built as shared!".
-
Hi,
Static is mentioned in the limitation on the Qt for webassembly introduction page.
As for QtWebEngine, unless chromium can be built for webassembly, it's not going to be feasible.
-
Hi @SGaist ,
One thing that made me skeptical about the info on the introduction page, was the affirmative that webassembly doesn't support threads, which is not an absolute true, in fact is relatively simple to enable thread support with the correct emscripten version.
But everything so far is telling me that is not possible, or at least it will be very hard to compile wasm as shared.