Solved QT5 for WebAssembly unknown module: qt quick quickcontrol2
-
Hello,
I follwed this : https://gist.github.com/cajus/689eca85be257997019065979799e2f6
Works fine for few examples but I wanted to run quick_control2_gallary but it says : unknown module quick quickcontrol2
i double checked and installed qtdeclarative but no luck.
I am on windows bash: 16.04 Ubuntu
using qt5.12.2 -
Hi and welcome to devnet,
Are you sure these tow modules got build ?
How did you install them ? -
I used the following to install them :
./init-repository -f --module-subset=qtbase,qtdeclarative,qtwebsockets,qtsvg,qtquickcontrols,qtquickcontrols2,qtgraphicaleffects,qt3d,qtmultimediato configure:
./configure -opensource -confirm-license -xplatform wasm-emscripten -release -static -no-feature-thread -nomake examples -no-dbus -no-sslmake
make install -
Looks good
Do you have all the modules built before calling make install ?
-
@SGaist how to check that. I might sound dumb but i am new to qt and web assembly .
-
-
Look at the content of your build folder and check the qtbase/lib folder.
-
Here are the contents o my lib folder.
One thing, do i need some more modules to build it, i mean there might be some modules depending on some other modules i might have skipped. -
I don't see there any of the modules that are missing.
One thing you can do is build them by hand using the classic
qmake, make, make install
. Do it out of source, it would be best. -
/home/izza/qt/build/qtbase/lib/libQt5Bootstrap.a(qtextcodec.o): In function
setup() [clone .part.17]': qtextcodec.cpp:(.text._ZL5setupv.part.17+0x11c): undefined reference to
vtable for QLatin15Codec'
qtextcodec.cpp:(.text._ZL5setupv.part.17+0x13f): undefined reference to `vtable for QLatin1Codec'
collect2: error: ld returned 1 exit status
Makefile:131: recipe for target '../../../bin/moc' failed
make[3]: *** [../../../bin/moc] Error 1
make[3]: Leaving directory '/home/izza/qt/build/qtbase/src/tools/moc'
Makefile:119: recipe for target 'sub-moc-make_first' failed
make[2]: *** [sub-moc-make_first] Error 2
make[2]: Leaving directory '/home/izza/qt/build/qtbase/src'
Makefile:50: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/home/izza/qt/build/qtbase'
Makefile:82: recipe for target 'module-qtbase' failed====================================
upon "make module-qtbase' this is the outcome.
i did clean installation again, and build in seperate folder not in src folder -
configure -opensource -confirm-license -xplatform wasm-emscripten -release -static -no-feature-thread -nomake examples -no-dbus -no-ssl
below is my configuration summary
Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
Building for: wasm-emscripten (wasm, CPU features: <none>)
Target compiler: clang 6.0.1
Configuration: cross_compile largefile release c++11 c++14 c++1z no-pkg-config reduce_exports static stl
Build options:
Mode ................................... release
Optimize release build for size ........ no
Building shared libraries .............. no
Using C standard ....................... C11
Using C++ standard ..................... C++1z
Using ccache ........................... no
Using gold linker ...................... no
Using precompiled headers .............. no
Using LTCG ............................. no
Target compiler supports:
Build parts ............................ libs
Qt modules and options:
Qt Concurrent .......................... no
Qt D-Bus ............................... no
Qt D-Bus directly linked to libdbus .... no
Qt Gui ................................. yes
Qt Network ............................. yes
Qt Sql ................................. no
Qt Testlib ............................. yes
Qt Widgets ............................. yes
Qt Xml ................................. yes
Support enabled for:
Using pkg-config ....................... no
udev ................................... no
Using system zlib ...................... no
Qt Core:
DoubleConversion ....................... yes
Using system DoubleConversion ........ no
GLib ................................... no
iconv .................................. yes
ICU .................................... no
Tracing backend ........................ <none>
Logging backends:
journald ............................. no
syslog ............................... no
slog2 ................................ no
Using system PCRE2 ..................... no
Qt Network:
getifaddrs() ........................... no
IPv6 ifname ............................ no
libproxy ............................... no
OpenSSL ................................ no
Qt directly linked to OpenSSL ........ no
OpenSSL 1.1 ............................ no
DTLS ................................... no
SCTP ................................... no
Use system proxies ..................... yes
Qt Gui:
Accessibility .......................... yes
FreeType ............................... yes
Using system FreeType ................ no
HarfBuzz ............................... yes
Using system HarfBuzz ................ no
Fontconfig ............................. no
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... no
PNG .................................. yes
Using system libpng ................ no
EGL .................................... yes
OpenVG ................................. no
OpenGL:
Desktop OpenGL ....................... no
OpenGL ES 2.0 ........................ yes
OpenGL ES 3.0 ........................ no
OpenGL ES 3.1 ........................ no
OpenGL ES 3.2 ........................ no
Vulkan ................................. no
Session Management ..................... yes
Features used by QPA backends:
evdev .................................. no
libinput ............................... no
INTEGRITY HID .......................... no
mtdev .................................. no
tslib .................................. no
xkbcommon .............................. no
X11 specific:
XLib ................................. no
XCB Xlib ............................. no
EGL on X11 ........................... no
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... no
EGLFS GBM ............................ no
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ no
LinuxFB ................................ no
VNC .................................... yes
Mir client ............................. no
Qt Sql:
SQL item models ........................ yes
Qt Widgets:
GTK+ ................................... no
Styles ................................. Fusion Windows
Qt PrintSupport:
CUPS ................................... no
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. no
OCI (Oracle) ........................... no
ODBC ................................... no
PostgreSQL ............................. no
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt Testlib:
Tester for item models ................. yes
Qt SerialBus:
Socket CAN ............................. no
Socket CAN FD .......................... no
Qt QML:
QML network support .................... yes
QML debugging and profiling support .... yes
QML sequence object .................... yes
QML list model ......................... yes
QML XML http request ................... yes
QML Locale ............................. yes
QML delegate model ..................... yes
Qt Quick:
Direct3D 12 ............................ no
AnimatedImage item ..................... yes
Canvas item ............................ yes
Support for Qt Quick Designer .......... yes
Flipable item .......................... yes
GridView item .......................... yes
ListView item .......................... yes
TableView item ......................... yes
Path support ........................... yes
PathView item .......................... yes
Positioner items ....................... yes
Repeater item .......................... yes
ShaderEffect item ...................... yes
Sprite item ............................ yes
Qt Scxml:
ECMAScript data model for QtScxml ...... yes
Qt Gamepad:
SDL2 ................................... no
Qt 3D:
Assimp ................................. yes
System Assimp .......................... no
Output Qt3D Job traces ................. no
Output Qt3D GL traces .................. no
Use SSE2 instructions .................. no
Use AVX2 instructions .................. no
Aspects:
Render aspect ........................ yes
Input aspect ......................... yes
Logic aspect ......................... yes
Animation aspect ..................... yes
Extras aspect ........................ yes
Qt 3D Renderers:
OpenGL Renderer ........................ yes
Qt 3D GeometryLoaders:
Autodesk FBX ........................... no
Qt Wayland Client ........................ no
Qt Wayland Compositor .................... no
Qt Bluetooth:
BlueZ .................................. no
BlueZ Low Energy ....................... no
Linux Crypto API ....................... no
WinRT Bluetooth API (desktop & UWP) .... no
Qt Sensors:
sensorfw ............................... no
Qt Quick Controls 2:
Styles ................................. Default Fusion Imagine Material Universal
Qt Quick Templates 2:
Hover support .......................... yes
Multi-touch support .................... yes
Qt Positioning:
Gypsy GPS Daemon ....................... no
WinRT Geolocation API .................. no
Qt Location:
Qt.labs.location experimental QML plugin . yes
Geoservice plugins:
OpenStreetMap ........................ no
HERE ................................. yes
Esri ................................. yes
Mapbox ............................... yes
MapboxGL ............................. yes
Itemsoverlay ......................... yes
QtXmlPatterns:
XML schema support ..................... yes
Qt Multimedia:
ALSA ................................... no
GStreamer 1.0 .......................... no
GStreamer 0.10 ......................... no
Video for Linux ........................ no
OpenAL ................................. no
PulseAudio ............................. no
Resource Policy (libresourceqt5) ....... no
Windows Audio Services ................. no
DirectShow ............................. no
Windows Media Foundation ............... no
Qt Tools:
QDoc ................................... yes
Qt WebEngine:
Embedded build ......................... yes
Pepper Plugins ......................... no
Printing and PDF ....................... no
Proprietary Codecs ..................... no
Spellchecker ........................... yes
Native Spellchecker .................... no
WebRTC ................................. no
Use System Ninja ....................... no
Geolocation ............................ yes
WebChannel support ..................... yes
Use v8 snapshot ........................ yes
Kerberos Authentication ................ no
Building v8 snapshot supported ......... yes
Use ALSA ............................... no
Use PulseAudio ......................... no
Optional system libraries used:
re2 .................................. no
icu .................................. no
libwebp, libwebpmux and libwebpdemux . no
opus ................................. no
ffmpeg ............................... no
libvpx ............................... no
snappy ............................... no
glib ................................. no
zlib ................................. no
minizip .............................. no
libevent ............................. no
jsoncpp .............................. no
protobuf ............................. no
libxml2 and libxslt .................. no
lcms2 ................................ no
png .................................. no
JPEG ................................. no
harfbuzz ............................. no
freetype ............................. no
x11 .................................. no
Required system libraries:
fontconfig ........................... no
dbus ................................. no
nss .................................. no
khr .................................. no
glibc ................................ no
Required system libraries for qpa-xcb:
libdrm ............................... no
xcomposite ........................... no
xcursor .............................. no
xi ................................... no
xtst ................................. noNote: Also available for Linux: linux-clang linux-icc
Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
WARNING: Cross compiling without sysroot. Disabling pkg-config
-
Did you run the script from the gist or just one line after the other yourself ?
Did you call configure several times ? If so, did you do it from a clean state ?
-
I run it myself , one line after another.
I run on current qt , config only once.
-
I can see all modules built already. Can you please suggest what could I do now.
-
Just to be sure, you have all modules built and installed now ?
If so, new your project build folder and re-run qmake.
-
Project ERROR: Unknown module(s) in QT: qml quick
this is the error now
-
@Izza Try to install the compiled Qt framework then run qmake from the installation folder. For me the instructions found here:
https://blog.qt.io/blog/2019/03/05/using-docker-test-qt-webassembly/
worked, but I needed to run
/usr/local/Qt-5.13.0/bin/qmake
i.e. from the install folder
-
This post is deleted! -
@cristeab Thanks alot It worked now.
It was just i needed to run from /usr/local/...
not from build folder
thanks alot