-
-
Save kavikumarN/3a58afa9e348da5900c42a9caa363e25 to your computer and use it in GitHub Desktop.
Building Qt for WebAssembly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get dependencies in place (example for Debian based systems) | |
sudo apt-get build-dep --yes qt5-default | |
sudo apt-get install --yes libxcb-xinerama0-dev git python cmake default-jre | |
# Install Emscripten | |
git clone https://github.com/juj/emsdk.git | |
cd emsdk | |
./emsdk install latest | |
./emsdk activate latest | |
source emsdk_env.sh | |
cd .. | |
# Build Qt | |
git clone -b 5.12.0 https://code.qt.io/qt/qt5.git | |
cd qt5 | |
./init-repository -f --module-subset=qtbase,qtdeclarative,qtwebsockets,qtsvg,qtquickcontrols,qtquickcontrols2,qtgraphicaleffects | |
./configure -opensource -confirm-license -xplatform wasm-emscripten -release -static -no-feature-thread -nomake examples -no-dbus -no-ssl | |
make | |
cd .. | |
# Build your project | |
git clone https://github.com/msorvig/qt-webassembly-examples.git | |
cd qt-webassembly-examples/quick_controls2_gallery | |
../../../qt5/qtbase/bin/qmake | |
make | |
# Serve it and browse to http://localhost:8000/gallery.html | |
python -mSimpleHTTPServer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
`d_p.h:196:14: fatal error:
'x86intrin.h' file not found
include <x86intrin.h>
1 error generated.
shared:ERROR: compiler frontend failed to generate LLVM bitcode, halting
make[3]: *** [Makefile:10591: .obj/qendian.o] Error 1
make[3]: Leaving directory '/home/ubuntu/qt5/qtbase/src/corelib'
make[2]: *** [Makefile:223: sub-corelib-make_first] Error 2
make[2]: Leaving directory '/home/ubuntu/qt5/qtbase/src'
make[1]: *** [Makefile:51: sub-src-make_first] Error 2
make[1]: Leaving directory '/home/ubuntu/qt5/qtbase'
make: *** [Makefile:53: module-qtbase-make_first] Error 2
`
error while running make