Qt Webassembly issue

343
3
03-17-2020 02:05 PM
JeremyRoberts2
New Contributor III

I'm trying to run a web assembly build on a basic hello world arcgis Qt Quick project.  Non-ArcGIS projects in Qt Creator build into web assembly fine.  It is only when I use the ArcGIS template that I run into issues.  I am on macOS (10.14.6) running runtime 100.5 and Qt 5.14.1.

  • I create the hello world project in Qt.  When I do so I select Desktop and iOS kits, as the "Qt WebAssembly" kit is grayed out.
  • Then I go to its project folder on my laptop and create a build sub-directory such as wasm_build.
    -em++ --version returns: emcc (Emscripten gcc/clang-like replacement) 1.38.27 (commit 1458145cf4f3db0fb548343e6acab267eef8e4ef)
  • From within the build directory (wasm_build) I run /{PathToQtInstall}/5.14.1/wasm_32/bin/qmake ..
  • This outputs the following...
    --Project MESSAGE: ArcGIS Runtime for Linux (wasm)
    --Project MESSAGE: Version  100.5
  • Then I run "make" and get the following...
    sed -e s/@APPNAME@/wasmarcgis2/g /Users/jr9128/Qt/5.14.1/wasm_32/plugins/platforms/wasm_shell.html > /Users/jr9128/QtProjects/wasmarcgis2/wasm_build/wasmarcgis2.html
    cp -f /Users/jr9128/Qt/5.14.1/wasm_32/plugins/platforms/qtloader.js /Users/jr9128/QtProjects/wasmarcgis2/wasm_build
    cp -f /Users/jr9128/Qt/5.14.1/wasm_32/plugins/platforms/qtlogo.svg /Users/jr9128/QtProjects/wasmarcgis2/wasm_build
    em++ -s "BINARYEN_TRAP_MODE='clamp'" -s WASM=1 -s FULL_ES2=1 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 --bind -O3 -s ALLOW_MEMORY_GROWTH=1 -o ./wasmarcgis2.js main.o wasmarcgis2.js_plugin_import.o wasmarcgis2.js_qml_plugin_import.o qrc_qml.o qrc_Resources.o   -L/Users/jr9128/ArcGIS_SDKs/Qt100.5/sdk/macOS/x64/lib -L/usr/lib64 -lEsriCommonQt -lruntimecore /Users/jr9128/Qt/5.14.1/wasm_32/plugins/platforms/libqwasm.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5EventDispatcherSupport.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5FontDatabaseSupport.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libqtfreetype.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5EglSupport.a /Users/jr9128/Qt/5.14.1/wasm_32/plugins/imageformats/libqgif.a /Users/jr9128/Qt/5.14.1/wasm_32/plugins/imageformats/libqicns.a /Users/jr9128/Qt/5.14.1/wasm_32/plugins/imageformats/libqico.a /Users/jr9128/Qt/5.14.1/wasm_32/plugins/imageformats/libqjpeg.a /Users/jr9128/Qt/5.14.1/wasm_32/plugins/imageformats/libqtga.a /Users/jr9128/Qt/5.14.1/wasm_32/plugins/imageformats/libqtiff.a /Users/jr9128/Qt/5.14.1/wasm_32/plugins/imageformats/libqwbmp.a /Users/jr9128/Qt/5.14.1/wasm_32/plugins/imageformats/libqwebp.a /Users/jr9128/Qt/5.14.1/wasm_32/plugins/sensors/libqtsensors_generic.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5OpenGL.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5Widgets.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5Sensors.a /Users/jr9128/ArcGIS_SDKs/Qt100.5/sdk/macOS/x64/qml/Esri/ArcGISRuntime/libArcGISRuntimePlugin.a /Users/jr9128/Qt/5.14.1/wasm_32/qml/QtQuick.2/libqtquick2plugin.a /Users/jr9128/Qt/5.14.1/wasm_32/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.a /Users/jr9128/Qt/5.14.1/wasm_32/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.a /Users/jr9128/Qt/5.14.1/wasm_32/qml/QtQuick/Controls.2/Fusion/libqtquickcontrols2fusionstyleplugin.a /Users/jr9128/Qt/5.14.1/wasm_32/qml/QtQuick/Controls.2/Universal/libqtquickcontrols2universalstyleplugin.a /Users/jr9128/Qt/5.14.1/wasm_32/qml/QtQuick/Controls.2/Material/libqtquickcontrols2materialstyleplugin.a /Users/jr9128/Qt/5.14.1/wasm_32/qml/QtGraphicalEffects/private/libqtgraphicaleffectsprivate.a /Users/jr9128/Qt/5.14.1/wasm_32/qml/QtQuick/Window.2/libwindowplugin.a /Users/jr9128/Qt/5.14.1/wasm_32/qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.a /Users/jr9128/Qt/5.14.1/wasm_32/qml/QtQuick/Controls.2/Imagine/libqtquickcontrols2imaginestyleplugin.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5QuickControls2.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5QuickTemplates2.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5Quick.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5Gui.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libqtlibpng.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libqtharfbuzz.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5QmlModels.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5Qml.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5Network.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libQt5Core.a /Users/jr9128/Qt/5.14.1/wasm_32/lib/libqtpcre2.a   
    shared:ERROR: /Users/jr9128/ArcGIS_SDKs/Qt100.5/sdk/macOS/x64/qml/Esri/ArcGISRuntime/libArcGISRuntimePlugin.a: No such file or directory ("/Users/jr9128/ArcGIS_SDKs/Qt100.5/sdk/macOS/x64/qml/Esri/ArcGISRuntime/libArcGISRuntimePlugin.a" was expected to be an input file, based on the commandline arguments provided)
    make: *** [wasmarcgis2.js] Error 1

When I look on my PC, the above is true, /Users/jr9128/ArcGIS_SDKs/Qt100.5/sdk/macOS/x64/qml/Esri/ArcGISRuntime/libArcGISRuntimePlugin.a does not exist.  Any idea why it is looking there?

The only two places I find that file is...

/Users/jr9128/ArcGIS_SDKs/Qt100.5/sdk/iOS/universal/qml/Esri/ArcGISRuntime/libArcGISRuntimePlugin.a

/Users/jr9128/Applications/ArcGIS/AppStudio/sdk/iOS/arm64/qml/Esri/ArcGISRuntime/libArcGISRuntimePlugin.a

I tried manually editing the Makefile to point to the iOS/universal location but received an error...

/Users/jr9128/ArcGIS_SDKs/Qt100.5/sdk/iOS/universal/qml/Esri/ArcGISRuntime/libArcGISRuntimePlugin.a: Unknown format, not a static library!

I'm guessing I was barking up the wrong tree when trying that.

Any ideas?

Thanks!

Jeremy

0 Kudos
3 Replies
JamesBallard1
Esri Contributor

Hi Jeremy Roberts‌,

   The ArcGIS Runtime SDK for Qt doesn't support the WebAssmebly target.  May I ask what workflow you want to support? We'd like to better understand your workflow so we can evaluate this target for consideration into our SDK.

Thanks.

0 Kudos
JeremyRoberts2
New Contributor III

In our case, we have a highly user-factored Qt Quick based app being used today internally at our org.  We chose runtime because eventually we need to support offline.  Our client has expressed interest in exposing some version of the same application, possibly read-only and of course not offline, to contractors or others external to our org.  We have been asked to do a feasibility experiment with WebAssembly to see if our existing app could be made web based for ease of distribution to folks outside our org.  This might have possibly saved us from creating a completely new web app and the look and feel would be identical to what they are already used to.  An alternative is to enhance our Qt Quick based app to be distributed to folks outside our org which would mean Apple app store and some sort of Windows download site for the installs, and whatever modifications we'd have to make to the app to satisfy corporate security requirements.   Which we can do, but I think our team was curious on if WebAssembly was possible too.

So based on your response and Qt runtime not supporting WebAssembly, I think I have my answer to our feasibility experiment.  "Not supported", correct?

Thanks!

Jeremy

0 Kudos
JamesBallard1
Esri Contributor

Jeremy Roberts‌,

Yes, WebAssembly is not supported by the ArcGIS Runtime SDK for Qt.

Thank you for detailing your use case to us. It's valuable to us to know what types of workflows our users want to support so we can evaluate future enhancements.

0 Kudos