AnsweredAssumed Answered

Qt Webassembly issue

Question asked by jr9128 on Mar 17, 2020
Latest reply on Mar 18, 2020 by jballard-esristaff

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

Outcomes