Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Compiling QT on ubuntu/ARM for WASM
dreamlax last edited by
I am trying to compile QT for Webassembly. I cloned the QT source code from code.qt.io/qt/qt5.git and checked out version 5.15. I am using emcc/em++ version 2.0.13 with clang version 13.0.0.
In build directory I ran configure as follows:
../qt5/configure -opensource -confirm-license -xplatform wasm-emscripten -feature-thread -nomake examples -no-dbus -no-ssl -prefix $PWD/../qt5_wasm_binaries
followed by make.
There are two issues: One, I see a lot of files being compiled with gcc instead of emcc. Second the build fails with the error:
make: *** No rule to make target 'qt5widgets_metatypes.json', needed by '../../lib/libQt5Widgets.a'.
I feel I am missing some steps. Would be great to get some help on this.
Hi and welcome to devnet,
By default when you clone the Qt repo, it's on the dev branch that means it's for Qt 6. Did you explicitly checkout Qt 5.15 ?
One, I see a lot of files being compiled with gcc instead of emcc.
this is ok, since the host binaries (moc, rcc, etc.) are compiled with gcc.
lorn.potter last edited by
Emscripten does not run on native arm on any OS. On Mac M1, it requires the Rosetta 2 emulation to work.
"emsdk only officially supports x86_64 today."