Skip to content
  • 1 Votes
    3 Posts
    2k Views
    8Observer88

    pro:

    wasm: INCLUDEPATH += "C:\emsdk\upstream\emscripten\cache\sysroot\include"

    Settings for Qt 6.6.3:

    image.png

  • 1 Votes
    2 Posts
    1k Views
    J

    Short answer... you can't get the full file path of a file.

    Your question is more related to safety/security standards regarding major browsers and the decisions related to them made by owner companies/foundations.

    That is, javascript is not allowed to know the full path of a file shared by the user. So, fileContentReady or in general any webassembly function will end up being a javascript function, limited to the security standards imposed on js implementation by the browser.

    (You can always ask the user to install a java applet :P )

  • Qt wabassembly cache

    Unsolved Qt for WebAssembly
    3
    0 Votes
    3 Posts
    561 Views
    N

    @lorn-potter you mean if I update part of my application I should download all application in my browser?

  • 0 Votes
    7 Posts
    890 Views
    N

    @lorn-potter I have checked it in qt 5.15 with em 1.39.16. but still I have same problem.

  • 0 Votes
    9 Posts
    2k Views
    T

    @lorn-potter thanks for your command.
    I love working with QT. If WASM would be working, a complete new world would open for us. The main thing what annoys me is that I can not find a good manual/guide to get wasm running on linux. I hope somebody can point me in the good direction. I'm probably just missing the needed information/knowledge, but I really want to learn!

  • 0 Votes
    2 Posts
    387 Views
    sierdzioS

    You can, it works with QtQuick.

  • 0 Votes
    5 Posts
    2k Views
    hskoglundH

    Well WebAssembly is pretty strict, if you want to make https requests you need to use a proxy/bridge program that translates from websockets to http, it's installed on a PC on the same LAN as the WebAssembly PC (or on the same PC). For example you could use this one: https://github.com/novnc/websockify

  • 0 Votes
    6 Posts
    3k Views
    K

    @lorn-potter
    I have installed emsdk using

    ./emsdk install sdk-fastcomp-1.38.27-64bit ./emsdk activate sdk-fastcomp-1.38.27-64bit

    bcz installation fails(Error : No such tool/sdk) with

    ./emsdk install sdk-1.38.16-64bit

    and using online installer as well as offline static build
    am getting same error for simple Qt Application build
    error log

    kmb@ubuntu:~/Work/FEB2020/TestApp/build$ /home/kmb/Qt/5.14.0/wasm_32/bin/qmake .. Info: creating stash file /home/kmb/Work/FEB2020/TestApp/build/.qmake.stash kmb@ubuntu:~/Work/FEB2020/TestApp/build$ make em++ -c -pipe -O3 -std=gnu++11 -s ALLOW_MEMORY_GROWTH=1 -Wall -Wextra -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../TestApp -I. -I../../../../Qt/5.14.0/wasm_32/include -I../../../../Qt/5.14.0/wasm_32/include/QtQuick -I../../../../Qt/5.14.0/wasm_32/include/QtGui -I../../../../Qt/5.14.0/wasm_32/include/QtQmlModels -I../../../../Qt/5.14.0/wasm_32/include/QtQml -I../../../../Qt/5.14.0/wasm_32/include/QtNetwork -I../../../../Qt/5.14.0/wasm_32/include/QtCore -I. -I/home/kmb/.emscripten_ports/openssl/include -I../../../../Qt/5.14.0/wasm_32/mkspecs/wasm-emscripten -o main.o ../main.cpp em++ -c -pipe -O3 -std=gnu++11 -s ALLOW_MEMORY_GROWTH=1 -Wall -Wextra -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../TestApp -I. -I../../../../Qt/5.14.0/wasm_32/include -I../../../../Qt/5.14.0/wasm_32/include/QtQuick -I../../../../Qt/5.14.0/wasm_32/include/QtGui -I../../../../Qt/5.14.0/wasm_32/include/QtQmlModels -I../../../../Qt/5.14.0/wasm_32/include/QtQml -I../../../../Qt/5.14.0/wasm_32/include/QtNetwork -I../../../../Qt/5.14.0/wasm_32/include/QtCore -I. -I/home/kmb/.emscripten_ports/openssl/include -I../../../../Qt/5.14.0/wasm_32/mkspecs/wasm-emscripten -o testapp.js_plugin_import.o /home/kmb/Work/FEB2020/TestApp/build/testapp.js_plugin_import.cpp em++ -c -pipe -O3 -std=gnu++11 -s ALLOW_MEMORY_GROWTH=1 -Wall -Wextra -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../TestApp -I. -I../../../../Qt/5.14.0/wasm_32/include -I../../../../Qt/5.14.0/wasm_32/include/QtQuick -I../../../../Qt/5.14.0/wasm_32/include/QtGui -I../../../../Qt/5.14.0/wasm_32/include/QtQmlModels -I../../../../Qt/5.14.0/wasm_32/include/QtQml -I../../../../Qt/5.14.0/wasm_32/include/QtNetwork -I../../../../Qt/5.14.0/wasm_32/include/QtCore -I. -I/home/kmb/.emscripten_ports/openssl/include -I../../../../Qt/5.14.0/wasm_32/mkspecs/wasm-emscripten -o testapp.js_qml_plugin_import.o /home/kmb/Work/FEB2020/TestApp/build/testapp.js_qml_plugin_import.cpp /home/kmb/Qt/5.14.0/wasm_32/bin/rcc -name qml ../qml.qrc -o qrc_qml.cpp em++ -c -pipe -O3 -std=gnu++11 -s ALLOW_MEMORY_GROWTH=1 -Wall -Wextra -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../TestApp -I. -I../../../../Qt/5.14.0/wasm_32/include -I../../../../Qt/5.14.0/wasm_32/include/QtQuick -I../../../../Qt/5.14.0/wasm_32/include/QtGui -I../../../../Qt/5.14.0/wasm_32/include/QtQmlModels -I../../../../Qt/5.14.0/wasm_32/include/QtQml -I../../../../Qt/5.14.0/wasm_32/include/QtNetwork -I../../../../Qt/5.14.0/wasm_32/include/QtCore -I. -I/home/kmb/.emscripten_ports/openssl/include -I../../../../Qt/5.14.0/wasm_32/mkspecs/wasm-emscripten -o qrc_qml.o qrc_qml.cpp sed -e s/@APPNAME@/TestApp/g /home/kmb/Qt/5.14.0/wasm_32/plugins/platforms/wasm_shell.html > /home/kmb/Work/FEB2020/TestApp/build/TestApp.html cp -f /home/kmb/Qt/5.14.0/wasm_32/plugins/platforms/qtloader.js /home/kmb/Work/FEB2020/TestApp/build cp -f /home/kmb/Qt/5.14.0/wasm_32/plugins/platforms/qtlogo.svg /home/kmb/Work/FEB2020/TestApp/build em++ -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 ./TestApp.js main.o testapp.js_plugin_import.o testapp.js_qml_plugin_import.o qrc_qml.o /home/kmb/Qt/5.14.0/wasm_32/plugins/platforms/libqwasm.a /home/kmb/Qt/5.14.0/wasm_32/lib/libQt5EventDispatcherSupport.a /home/kmb/Qt/5.14.0/wasm_32/lib/libQt5FontDatabaseSupport.a /home/kmb/Qt/5.14.0/wasm_32/lib/libqtfreetype.a /home/kmb/Qt/5.14.0/wasm_32/lib/libQt5EglSupport.a /home/kmb/Qt/5.14.0/wasm_32/plugins/imageformats/libqgif.a /home/kmb/Qt/5.14.0/wasm_32/plugins/imageformats/libqicns.a /home/kmb/Qt/5.14.0/wasm_32/plugins/imageformats/libqico.a /home/kmb/Qt/5.14.0/wasm_32/plugins/imageformats/libqjpeg.a /home/kmb/Qt/5.14.0/wasm_32/plugins/imageformats/libqtga.a /home/kmb/Qt/5.14.0/wasm_32/plugins/imageformats/libqtiff.a /home/kmb/Qt/5.14.0/wasm_32/plugins/imageformats/libqwbmp.a /home/kmb/Qt/5.14.0/wasm_32/plugins/imageformats/libqwebp.a /home/kmb/Qt/5.14.0/wasm_32/qml/QtQuick.2/libqtquick2plugin.a /home/kmb/Qt/5.14.0/wasm_32/qml/QtQuick/Window.2/libwindowplugin.a /home/kmb/Qt/5.14.0/wasm_32/lib/libQt5Quick.a /home/kmb/Qt/5.14.0/wasm_32/lib/libQt5QmlModels.a /home/kmb/Qt/5.14.0/wasm_32/lib/libQt5Qml.a /home/kmb/Qt/5.14.0/wasm_32/lib/libQt5Gui.a /home/kmb/Qt/5.14.0/wasm_32/lib/libqtlibpng.a /home/kmb/Qt/5.14.0/wasm_32/lib/libqtharfbuzz.a /home/kmb/Qt/5.14.0/wasm_32/lib/libQt5Network.a /home/kmb/Qt/5.14.0/wasm_32/lib/libQt5Core.a /home/kmb/Qt/5.14.0/wasm_32/lib/libqtpcre2.a shared:ERROR: '/home/kmb/Qtwasm/emsdk/fastcomp-clang/e1.38.27_64bit/binaryen/bin/asm2wasm ./TestApp.temp.asm.js --total-memory=16777216 --trap-mode=allow -O3 --mem-init=./TestApp.js.mem --mem-base=1024 --wasm-only -o ./TestApp.wasm --mvp-features' failed (-9) Makefile:215: recipe for target 'TestApp.js' failed make: *** [TestApp.js] Error 1

    so what is cuase here and i am using Ubuntu 18.04 VM
    kindly let me root cause

  • 0 Votes
    5 Posts
    2k Views
    F

    Hi Patrick. I'm in the same situation. Installation on archlinux using the official qt5.13 online installer. Android and desktop kits are well configured on qtcreator just by using their respectif qmake. However when I choose the one.of webassembly (wasm_32) distributed by qt, qtcreator warns about the ABI, saying that it is not defined. Its value is unknown-unknown-unknown-.....

    I compiled a simple qt project using wasm_32 kit but link fails with the following error main.o: architecture machine must be wasm32.

    Any help?

  • 0 Votes
    1 Posts
    317 Views
    No one has replied
  • 0 Votes
    6 Posts
    2k Views
    I

    Oops! It worked in my last attempt, although it look a long time. So, my problem was Emscripten's version after all. Here is the version that worked:

    emscripten-1.37.1

    Note: I've used emsdk to install Emscripten and I had to install a matching LLVM/CLang version:

    clang-e1.37.1-64bit
  • 1 Votes
    1 Posts
    587 Views
    No one has replied