Problems compiling Qt 5.13.0-alpha for Webassembly
-
Hi all,
I'm pretty much a noob on Qt5, but circumstances seem to force me to trying 5.13.0-alpha with Webassembly. I followed the instructions from https://wiki.qt.io/Qt_for_WebAssembly , installed emscripten (1.38.27), downloaded the Qt5 source from git (into /git/qt5 on a Fedora FC29 system), and set the branch to 5.13.0 (the current alpha release).Where I run into problems is in the step "Build required modules" (after "./configure ..."), when executing the command "make module-qtbase module-qtdeclarative", which produces the following error:
shared:WARNING: emcc: cannot find library "EGL.so.1.1" shared:ERROR: /git/qt5/qtbase/plugins/imageformats/libqico.a: Unknown file suffix when compiling to LLVM bitcode! make[3]: *** [Makefile:130: /git/qt5/qtbase/bin/qml.js] Error 1 make[3]: Leaving directory '/git/qt5/qtdeclarative/tools/qml' make[2]: *** [Makefile:155: sub-qml-make_first] Error 2 make[2]: Leaving directory '/git/qt5/qtdeclarative/tools' make[1]: *** [Makefile:75: sub-tools-make_first] Error 2 make[1]: Leaving directory '/git/qt5/qtdeclarative' make: *** [Makefile:336: module-qtdeclarative] Error 2
The file name "libqico.a" exists, but the file is empty (with a size of 0 bytes).
If I skip the step for build the required modules, and run a plain "make -j4" right away, the error above repeats, plus I get an additional error:
shared:ERROR: /git/qt5/qtbase/lib/libQt5Network.a: Unknown file suffix when compiling to LLVM bitcode! make[3]: *** [Makefile:135: /git/qt5/qtbase/bin/qmlpreview.js] Error 1 make[3]: Leaving directory '/git/qt5/qtdeclarative/tools/qmlpreview' make[2]: *** [Makefile:205: sub-qmlpreview-make_first] Error 2 make[2]: Leaving directory '/git/qt5/qtdeclarative/tools' make[1]: *** [Makefile:75: sub-tools-make_first] Error 2 make[1]: Leaving directory '/git/qt5/qtdeclarative' make: *** [Makefile:339: module-qtdeclarative-make_first] Error 2
The file name "libQt5Network.a" exists also, again as an empty file (with a size of 0 bytes).
The relevant lines (130ff and 135ff) in the Makefile are:
Makefile line 130ff:
module-qtmacextras-qmake_all: module-qtbase-qmake_all FORCE @test -d qtmacextras/ || mkdir -p qtmacextras/ cd qtmacextras/ && $(QMAKE) -o Makefile /git/qt5/qtmacextras/qtmacextras.pro cd qtmacextras/ && $(MAKE) -f Makefile qmake_all
Makefile, line 135ff:
module-qtmacextras-make_first: module-qtbase-make_first FORCE @test -d qtmacextras/ || mkdir -p qtmacextras/ cd qtmacextras/ && ( test -e Makefile || $(QMAKE) -o Makefile /git/qt5/qtmacextras/qtmacextras.pro ) && $(MAKE) -f Makefile
So, there seems to be an issue with these "*.a" files. I don't know whether these problems arise from the fragility of an alpha release, or something else. Does somebody know what these files are supposed to do, why they're empty, why the compile fails, and/or could anyone please point me in the a direction so I can find out what's happening?
Also, when I look at the output of the "./configure ..." statement and the contents of the Makefile, I see no explicit confirmation (or evidence) that the "-xplatform wasm-emscripten" directive was actually accepted. How can I verify that before calling qmake and/or make?
-
Hi and welcome to devnet,
Based on this answer on the interest mailing list, you should rather clone the latest Qt 5.13.
-
Thank you for your reply, @SGaist
I already was on 5.13 when I encountered the error.
Then, when I tried to reproduce the error by doing a complete, fresh install on a Ubuntu 18.04 system (I'm on FC29), I noticed that the version of emscripten was not the same (1.38.28 instead of 1.38.27). Trying to update emscripten on the FC29 (with git pull, etc) went astray -- emscripten was not updated to 1.38.28, but told me it was running the latest version. So, I canned it and did a fresh install of emscripten (that is, just emscripten, not Qt) on the FC29 system.
Now, the "make module-qtbase module-qtdeclarative" command that created the error in my original post has been running for minutes without errors (while I write this update).
So, I would suggest anyone running into similar problem should double check if emscripten tells them they are on the latest version when, in fact, they might not be.
Anyway, thanks for your help!
BTW, when I did more research this morning, I noticed that I may have posted in the wrong forum ("General Talk/The Lounge") when maybe the question would have been better asked in "Qt Development/Installation and Development" at https://forum.qt.io/category/14/installation-and-deployment . If so, I'd be happy if admins or moderators could move my thread to that forum.
-
Indeed you already were but between Alpha and the current git version, there were some updates.
Your post has been moved.
-
@SGaist: Thank you for moving the thread!
Unfortunately, my problems have not gone away completely -- just shifted, appearing later in "make module-qtbase module-qtdeclarative".
First a side note: When I tracked down the warning about "/usr/lib64/libEGL.so.1.1" not existing listed in the first post above , I found some stale symlinks I had to update, so that "/opt/google/chrome/swiftshader/libEGL.so" appears as "/usr/lib64/libEGL.so".
Then, the errors I encounter did shift from what seems to be attempts of moving data between incompatible data types (that is, trying to stuff the contents of a NaN string with a hex value into a double precision number, presumably without converting the string to a number). Grepping some info from the error report shown further below indicates the error occurs in processing the files from 3 directories:
./qtdeclarative/tools/qml/ ./qtdeclarative/tools/qmlpreview/ ./qtdeclarative/tools/qmltestrunner/
I have a hunch this error may relate to the linking of object code, but I really don't know enough about it (or how to make devs aware of it and help with debugging). Is there site or forum or dev environment where I should report this?
Here the actual error output:
emcc: warning: cannot represent a NaN literal '0x6054ed0' with custom bit pattern in NaN-canonicalizing JS engines (e.g. Firefox and Safari) without erasing bits! in ret double 0x7FF4000000000000 in _ZL7qt_snanv() error: undefined symbol: _Z37qt_static_plugin_QConnmanEnginePluginv warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0` error: undefined symbol: _Z37qt_static_plugin_QGenericEnginePluginv error: undefined symbol: _Z44qt_static_plugin_QNetworkManagerEnginePluginv Error: Aborting compilation due to previous errors shared:ERROR: '/git/emsdk/node/8.9.1_64bit/bin/node /git/emsdk/emscripten/1.38.28/src/compiler.js /tmp/tmpYY4KCV.txt /git/emsdk/emscripten/1.38.28/src/embind/emval.js /git/emsdk/emscripten/1.38.28/src/embind/embind.js /git/emsdk/emscripten/1.38.28/src/library_pthread.js' failed (1) make[3]: *** [Makefile:135: /git/qt5/qtbase/bin/qmlpreview.js] Error 1 make[3]: Leaving directory '/git/qt5/qtdeclarative/tools/qmlpreview' make[2]: *** [Makefile:205: sub-qmlpreview-make_first] Error 2 make[2]: *** Waiting for unfinished jobs.... emcc: warning: cannot represent a NaN literal '0x1f081e80' with custom bit pattern in NaN-canonicalizing JS engines (e.g. Firefox and Safari) without erasing bits! in ret double 0x7FF4000000000000 in _ZL7qt_snanv() emcc: warning: cannot represent a NaN literal '0x1f081e80' with custom bit pattern in NaN-canonicalizing JS engines (e.g. Firefox and Safari) without erasing bits! in ret double 0x7FF4000000000000 in _ZL7qt_snanv.27608() error: undefined symbol: _Z37qt_static_plugin_QConnmanEnginePluginv warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0` error: undefined symbol: _Z37qt_static_plugin_QGenericEnginePluginv error: undefined symbol: _Z39qt_static_plugin_QQmlDebugServerFactoryv error: undefined symbol: _Z42qt_static_plugin_QQmlPreviewServiceFactoryv error: undefined symbol: _Z43qt_static_plugin_QEglFSX11IntegrationPluginv error: undefined symbol: _Z43qt_static_plugin_QQmlDebuggerServiceFactoryv error: undefined symbol: _Z43qt_static_plugin_QQmlProfilerServiceFactoryv error: undefined symbol: _Z44qt_static_plugin_QDebugMessageServiceFactoryv error: undefined symbol: _Z44qt_static_plugin_QNetworkManagerEnginePluginv error: undefined symbol: _Z44qt_static_plugin_QQmlInspectorServiceFactoryv error: undefined symbol: _Z44qt_static_plugin_QTcpServerConnectionFactoryv error: undefined symbol: _Z45qt_static_plugin_QQuickProfilerAdapterFactoryv error: undefined symbol: _Z46qt_static_plugin_QLocalClientConnectionFactoryv error: undefined symbol: _Z46qt_static_plugin_QQmlNativeDebugServiceFactoryv error: undefined symbol: _Z48qt_static_plugin_QEglFSEmulatorIntegrationPluginv error: undefined symbol: _Z48qt_static_plugin_QQmlNativeDebugConnectorFactoryv error: undefined symbol: _Z52qt_static_plugin_QEglFSKmsEglDeviceIntegrationPluginv Error: Aborting compilation due to previous errors shared:ERROR: '/git/emsdk/node/8.9.1_64bit/bin/node /git/emsdk/emscripten/1.38.28/src/compiler.js /tmp/tmp00XN8T.txt /git/emsdk/emscripten/1.38.28/src/embind/emval.js /git/emsdk/emscripten/1.38.28/src/embind/embind.js /git/emsdk/emscripten/1.38.28/src/library_pthread.js' failed (1) make[3]: *** [Makefile:124: /git/qt5/qtbase/bin/qmltestrunner.js] Error 1 make[3]: Leaving directory '/git/qt5/qtdeclarative/tools/qmltestrunner' make[2]: *** [Makefile:255: sub-qmltestrunner-make_first] Error 2 emcc: warning: cannot represent a NaN literal '0x2438ef10' with custom bit pattern in NaN-canonicalizing JS engines (e.g. Firefox and Safari) without erasing bits! in ret double 0x7FF4000000000000 in _ZL7qt_snanv() emcc: warning: cannot represent a NaN literal '0x2438ef10' with custom bit pattern in NaN-canonicalizing JS engines (e.g. Firefox and Safari) without erasing bits! in ret double 0x7FF4000000000000 in _ZL7qt_snanv.31466() error: undefined symbol: _Z37qt_static_plugin_QConnmanEnginePluginv warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0` error: undefined symbol: _Z37qt_static_plugin_QGenericEnginePluginv error: undefined symbol: _Z39qt_static_plugin_QQmlDebugServerFactoryv error: undefined symbol: _Z42qt_static_plugin_QQmlPreviewServiceFactoryv error: undefined symbol: _Z43qt_static_plugin_QEglFSX11IntegrationPluginv error: undefined symbol: _Z43qt_static_plugin_QQmlDebuggerServiceFactoryv error: undefined symbol: _Z43qt_static_plugin_QQmlProfilerServiceFactoryv error: undefined symbol: _Z44qt_static_plugin_QDebugMessageServiceFactoryv error: undefined symbol: _Z44qt_static_plugin_QNetworkManagerEnginePluginv error: undefined symbol: _Z44qt_static_plugin_QQmlInspectorServiceFactoryv error: undefined symbol: _Z44qt_static_plugin_QTcpServerConnectionFactoryv error: undefined symbol: _Z45qt_static_plugin_QQuickProfilerAdapterFactoryv error: undefined symbol: _Z46qt_static_plugin_QLocalClientConnectionFactoryv error: undefined symbol: _Z46qt_static_plugin_QQmlNativeDebugServiceFactoryv error: undefined symbol: _Z48qt_static_plugin_QEglFSEmulatorIntegrationPluginv error: undefined symbol: _Z48qt_static_plugin_QQmlNativeDebugConnectorFactoryv error: undefined symbol: _Z52qt_static_plugin_QEglFSKmsEglDeviceIntegrationPluginv Error: Aborting compilation due to previous errors shared:ERROR: '/git/emsdk/node/8.9.1_64bit/bin/node /git/emsdk/emscripten/1.38.28/src/compiler.js /tmp/tmpaOEfC_.txt /git/emsdk/emscripten/1.38.28/src/embind/emval.js /git/emsdk/emscripten/1.38.28/src/embind/embind.js /git/emsdk/emscripten/1.38.28/src/library_pthread.js' failed (1) make[3]: *** [Makefile:130: /git/qt5/qtbase/bin/qml.js] Error 1 make[3]: Leaving directory '/git/qt5/qtdeclarative/tools/qml' make[2]: *** [Makefile:155: sub-qml-make_first] Error 2 make[2]: Leaving directory '/git/qt5/qtdeclarative/tools' make[1]: *** [Makefile:75: sub-tools-make_first] Error 2 make[1]: Leaving directory '/git/qt5/qtdeclarative' make: *** [Makefile:336: module-qtdeclarative] Error 2 [root@localhost qt5]#
And some grep results:
[root@localhost qt5]# pwd /git/qt5 [root@localhost qt5]# grep -r "QConnmanEnginePluginv" . Binary file ./qtdeclarative/tools/qml/.obj/qml.js_plugin_import.o matches Binary file ./qtdeclarative/tools/qmlpreview/.obj/qmlpreview.js_plugin_import.o matches Binary file ./qtdeclarative/tools/qmltestrunner/.obj/qmltestrunner.js_plugin_import.o matches [root@localhost qt5]# grep -r "QGenericEnginePluginv" . Binary file ./qtdeclarative/tools/qml/.obj/qml.js_plugin_import.o matches Binary file ./qtdeclarative/tools/qmlpreview/.obj/qmlpreview.js_plugin_import.o matches Binary file ./qtdeclarative/tools/qmltestrunner/.obj/qmltestrunner.js_plugin_import.o matches [root@localhost qt5]# grep -r "QNetworkManagerEnginePluginv" . Binary file ./qtdeclarative/tools/qml/.obj/qml.js_plugin_import.o matches Binary file ./qtdeclarative/tools/qmlpreview/.obj/qmlpreview.js_plugin_import.o matches Binary file ./qtdeclarative/tools/qmltestrunner/.obj/qmltestrunner.js_plugin_import.o matches [root@localhost qt5]# grep -r "_Z37qt_static_plugin_QConnmanEnginePluginv" . Binary file ./qtdeclarative/tools/qml/.obj/qml.js_plugin_import.o matches Binary file ./qtdeclarative/tools/qmlpreview/.obj/qmlpreview.js_plugin_import.o matches Binary file ./qtdeclarative/tools/qmltestrunner/.obj/qmltestrunner.js_plugin_import.o matches [root@localhost qt5]#
-
Might be a silly question, but did you clone all the modules to their latest 5.13 branch ?
Also, you shouldn't link libraries that are part of of an optional application like chrome as one of your system library. You should rather search it using the package manager of your distribution.
-
@nugai said in Problems compiling Qt 5.13.0-alpha for Webassembly:
_Z37qt_static_plugin_QConnmanEnginePluginv
Not sure how this is getting built, but it is not part of Qt for WebAssembly.
The 5.13 Alpha WebAssembly was in a bad state, as we were still getting fixes committed, and emscripten was changing things on us as well, which we also had to compensate.
-
@SGaist and @lorn.potter: Thank you both for your input and feedback!
First, let me respond briefly to what @lorn.potter (thanks for chiming in!) wrote in Problems compiling Qt 5.13.0-alpha for Webassembly:
The 5.13 Alpha WebAssembly was in a bad state, as we were still getting fixes committed, and emscripten was changing things on us as well, which we also had to compensate.
I fully understand its alpha -- and pushing the limits, in a first attempt at building an integrated system that can be universally deployed. Alpha is usually a very difficult and exceptionally frustrating stage where both software and people can break and will break. I hope devs will see my feedback to an alpha release not as complaint of "this [expletive] shouldn't happen" and "you [expletive] go fix it" but rather as an attempt to help the devs and the process by sharing my observations.
Now, on to the technical issues:
@SGaist said in Problems compiling Qt 5.13.0-alpha for Webassembly:
Might be a silly question, but did you clone all the modules to their latest 5.13 branch ?
Thank you, @SGaist, this was a really helpful hint. Never before have I dealt with a project as big as Qt5 (with submodules). Your question prompted me to learn that "git pull" was insufficient and had to be changed to "git pull && git submodule update --recursive" . Building the modules made a difference (1 error instead of 3) but the problem at the core remained, namely that the build fails because it could not find "libEGL.so".
@SGaist said in Problems compiling Qt 5.13.0-alpha for Webassembly:
Also, you shouldn't link libraries that are part of of an optional application like chrome as one of your system library. You should rather search it using the package manager of your distribution.
I generally agree (I didn’t like what I proposed, and only considered it a dirty hack until better solutions come forward). As the build failed due to the absence of "libEGL.so", I tried tracking down if/where/how this library would be installed on my system, either as part of, or as an add-on to the distribution, or as a component and/or add-on to another piece of software that creates this dependency.
So, first I switched distros by installing Ubuntu 18.10 on a separate disk on the same system (i.e. same hardware) I used for Fedora fc29, with identical driver versions, etc. (but some minor differences in gdm and desktop Gui), then dual-booting either into fc29 or Ubuntu as needed. When booting into Ubuntu, I auto-mounted the fc29 disk so that I could access the exact same git clone copy (git files and build tree) from both distros, therefore eliminating any potential discrepancies or differences of having the git repository cloned twice (possibly at different times). Both distros created the same error: "libEGL.so" could not be found.
I found no packages in either distro (Ubuntu 18.10 and fc29) that would allow to install this "libEGL.so" library.
Digging through the log files, I came across error reports like the one below (an example of an early build attempt on Ubuntu), which gave me a better idea where the build fails, namely while trying to build the prerequisite module "qtdeclarative":
em++ -s WASM=1 -s FULL_ES2=1 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 --bind -s "BINARYEN_TRAP_MODE='clamp'" -O3 -s USE_PTHREADS=1 -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=4 -s USE_ZLIB=1 -s USE_FREETYPE=1 -s USE_LIBPNG=1 -o /git/qt5/qtbase/bin/qml.js .obj/main.o .obj/qml.js_plugin_import.o .obj/qml.js_qml_plugin_import.o .obj/qrc_qml.o .obj/moc_conf.o -L/git/qt5/qtdeclarative/plugins/qmltooling -lqmldbg_debugger -lqmldbg_inspector -lqmldbg_local -lqmldbg_messages -lqmldbg_native -lqmldbg_nativedebugger -lqmldbg_preview -lqmldbg_profiler -lqmldbg_quickprofiler -lqmldbg_server -lqmldbg_tcp -L/git/qt5/qtbase/plugins/bearer -lqconnmanbearer -lqgenericbearer -lqnmbearer -L/git/qt5/qtbase/plugins/platforms -lqwasm -L/git/qt5/qtbase/lib -lQt5EventDispatcherSupport -s USE_ZLIB=1 -s USE_LIBPNG=1 -s -s -lQt5FontDatabaseSupport -s -s -s -s -s USE_FREETYPE=1 -s -lQt5EglSupport -s -s -s -s -s -s -s -s /usr/lib64/libEGL.so -L/git/qt5/qtimageformats/plugins/imageformats -lqicns -lqtga -lqtiff -lqwbmp -lqwebp -L/git/qt5/qtbase/plugins/imageformats -lqgif -s -s -s -s -lqico -s -s -s -s -lqjpeg -s -s -s -s -L/git/qt5/qtbase/plugins/egldeviceintegrations -lqeglfs-emu-integration -lqeglfs-kms-egldevice-integration -lqeglfs-x11-integration -s -s -s -s -s -lQt5Widgets -s -s -s -s -s -s -s -s -L/git/qt5/qtbase/qml/QtQuick/Window.2 -lwindowplugin -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -L/git/qt5/qtbase/qml/QtQuick.2 -lqtquick2plugin -lQt5Quick -s -s -s -s -s -s -s -s -s -s -s -s -lQt5Qml -s -s -s -lQt5Gui -s -s -s /git/qt5/qtbase/lib/libqtharfbuzz.a -lQt5Network -s -s -lQt5Core -s /git/qt5/qtbase/lib/libqtpcre2.a shared:INFO: (Emscripten: Running sanity checks) shared:ERROR: /usr/lib64/libEGL.so: No such file or directory ("/usr/lib64/libEGL.so" was expected to be an input file, based on the commandline arguments provided) make[3]: *** [Makefile:130: /git/qt5/qtbase/bin/qml.js] Error 1 make[3]: Leaving directory '/fc29/git/qt5/qtdeclarative/tools/qml' make[2]: *** [Makefile:155: sub-qml-make_first] Error 2 make[2]: Leaving directory '/fc29/git/qt5/qtdeclarative/tools' make[1]: *** [Makefile:75: sub-tools-make_first] Error 2 make[1]: Leaving directory '/fc29/git/qt5/qtdeclarative' make: *** [Makefile:341: module-qtdeclarative] Error 2 root@kvm1-ubuntu:/git/qt5#
So, I had a trail to follow. Buried in the "em++" command line shown above are references to "Qt5EglSupport" and "/usr/lib64/libEGL.so", the library that cannot be found.
Being at the root directory of the git clone (that is, in the "qt5" directory, not the "qt5/build" directory), I used "grep -r 'libEGL.so' ." (and some other terms) for digging deeper. The result was must have been several hundert lines of output (more than my console buffer handled) – in other words, just noise. I tried using "make confclean" and "make clean" to get rid of the noise, but eventually I ended up cloning the qt5 git repo once more (as a duplicate) in a separate directory, which allowed me to run the grep search incrementally, after each step of the instructions at https://wiki.qt.io/Qt_for_WebAssembly. Nothing happened until after the step "./init-repository", when "grep -r 'libEGL.so' ." produced the following output:
root@kvm1-ubuntu:/git/qt5-test/qt5# grep -r 'libEGL.so' . ./qtbase/mkspecs/devices/linux-imx53qsb-g++/qmake.conf:# with libEGL.so from Freescale without the X11 dependency. ./qtwebengine/src/3rdparty/chromium/chrome/BUILD.gn: binary = "$root_out_dir/swiftshader/libEGL.so" ./qtwebengine/src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc:static const char kLibEglPath[] = "/usr/lib64/libEGL.so.1"; ./qtwebengine/src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc:static const char kLibEglPath[] = "/usr/lib/libEGL.so.1"; ./qtwebengine/src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc: "/usr/lib64/libEGL.so.1", ./qtwebengine/src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc: "libEGL.so.1"}; ./qtwebengine/src/3rdparty/chromium/extensions/shell/installer/linux/common/installer.include: install -m 644 "${BUILDDIR}/libEGL.so" "${STAGEDIR}/${INSTALLDIR}/" ./qtwebengine/src/3rdparty/chromium/extensions/shell/installer/linux/common/installer.include: if [ -f "${BUILDDIR}/swiftshader/libEGL.so" ]; then ./qtwebengine/src/3rdparty/chromium/extensions/shell/installer/linux/common/installer.include: install -m 644 "${BUILDDIR}/swiftshader/libEGL.so" "${STAGEDIR}/${INSTALLDIR}/swiftshader/" ./qtwebengine/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/android/DisplayAndroid.cpp: return "/system/lib64/libEGL.so"; ./qtwebengine/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/android/DisplayAndroid.cpp: return "/system/lib/libEGL.so"; ./qtwebengine/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/ozone/DisplayOzone.cpp: // with a .1 suffix) while Angle only installs libEGL.so. ./qtwebengine/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/ozone/DisplayOzone.cpp: ANGLE_TRY(egl->initialize(display->getNativeDisplayId(), "libEGL.so.1", nullptr)); ./qtwebengine/src/3rdparty/chromium/third_party/angle/src/tests/BUILD.gn: # Set rpath to find libEGL.so and libGLESv2.so even in a non-component build. ./qtwebengine/src/3rdparty/chromium/third_party/angle/src/tests/BUILD.gn: # Set rpath to find libEGL.so and libGLESv2.so even in a non-component build. ./qtwebengine/src/3rdparty/chromium/third_party/skia/docker/skia-release/Dockerfile:ADD --chown=skia:skia https://storage.googleapis.com/swiftshader-binaries/OpenGL_ES/Latest/Linux/libEGL.so /usr/local/lib/libEGL.so ./qtwebengine/src/3rdparty/chromium/third_party/skia/docker/skia-with-swift-shader-base/Dockerfile:ADD https://storage.googleapis.com/swiftshader-binaries/OpenGL_ES/Latest/Linux/libEGL.so /usr/local/lib/libEGL.so ./qtwebengine/src/3rdparty/chromium/third_party/skia/docker/skia-with-swift-shader-base/build-with-swift-shader-and-run:# to use Swiftshade w/o having to over-write /usr/local/lib/libEGL.so and related on the ./qtwebengine/src/3rdparty/chromium/third_party/skia/platform_tools/android/bin/android_gdbserver: libEGL.so \ ./qtwebengine/src/3rdparty/chromium/third_party/skia/tools/gpu/gl/angle/GLTestContext_angle.cpp: gLibs.fEGLLib = DynamicLoadLibrary("libEGL.so"); ./qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libEGL/libEGL.hpp: const char *libEGL_lib[] = {"lib64EGL_translator.so", "libEGL.so.1", "libEGL.so"}; ./qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libEGL/libEGL.hpp: const char *libEGL_lib[] = {"libEGL_translator.so", "libEGL.so.1", "libEGL.so"}; ./qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libEGL/libEGL.hpp: const char *libEGL_lib[] = {"libswiftshader_libEGL.dylib", "lib64EGL_translator.dylib", "libEGL.so", "libEGL.dylib"}; ./qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libEGL/libEGL.hpp: const char *libEGL_lib[] = {"libswiftshader_libEGL.dylib", "libEGL_translator.dylib", "libEGL.so", "libEGL.dylib"}; ./qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libEGL/libEGL.hpp: const char *libEGL_lib[] = {"libswiftshader_libEGL.so", "libEGL.so"}; ./qtwebengine/src/3rdparty/chromium/ui/gl/init/gl_initializer_android.cc: base::NativeLibrary egl_library = LoadLibraryAndPrintError("libEGL.so"); ./qtwebengine/src/3rdparty/chromium/ui/gl/init/gl_initializer_x11.cc:const char kEGLLibraryName[] = "libEGL.so.1"; ./qtwebengine/src/3rdparty/chromium/ui/gl/init/gl_initializer_x11.cc:const char kEGLANGLELibraryName[] = "libEGL.so"; ./qtwebengine/src/3rdparty/chromium/ui/gl/init/gl_initializer_x11.cc:const char kEGLSwiftShaderLibraryName[] = "libEGL.so"; ./qtwebengine/src/3rdparty/chromium/ui/ozone/common/egl_util.cc: FILE_PATH_LITERAL("libEGL.so.1"); ./qtwebengine/src/3rdparty/chromium/ui/ozone/common/egl_util.cc: FILE_PATH_LITERAL("libswiftshader_libEGL.so"); ./qtwebengine/src/3rdparty/chromium/ui/ozone/common/egl_util.cc: FILE_PATH_LITERAL("libEGL.so");
Aside from the very first line, which points to the "qtbase" module, all other search results point to the "qtwebengine" evironment, more precisely several components in the "./qtwebengine/src/3rdparty/chromium/" tree.
So, from that output we can derive two things:
-
References to "/usr/lib64/libEGL.so" (and variants like "/usr/lib/libEGL.so") that lead to the "libEGL.so library not found" error happen to be hard-coded in several files. Moreover, they are hard-coded in relation to whatever system the source code was created on, not the system that runs the Webassembly build.
-
Resolving the issue may require the input of "qtbase" and "qtwebengine" devs.
And so we arrive at what @lorn.potter said in Problems compiling Qt 5.13.0-alpha for Webassembly:
@nugai said in Problems compiling Qt 5.13.0-alpha for Webassembly:
_Z37qt_static_plugin_QConnmanEnginePluginvNot sure how this is getting built, but it is not part of Qt for WebAssembly.
The whole Webassembly (WASM) environment (with its dependencies) seems to be far more complex than initially meets the eye. On the surface, Qt Webassembly seems to depend only on a 3rd party component like emscripten, but certainly the pre-requisite modules "qtbase" and "qtwebengine" also have separate, unrelated 3rd party dependencies that play a role in the Webassembly build failing.
Device-dependent video subsystem components (like cards, GPUs, various proprietary and non-proprietary drivers, abstraction layers, rendering engines, graphics display managers (gdm), and GUI desktops) seem to be at the heart of the matter. Replacing end-user device technology with server-based, headless technologies (that can run translated Qt/Qml code running on a web server), and/or a combination where headless technologies can tap into device-dependent capabilities (like fast GPU rendering) via a web browser -- on any device and/or distro -- is no easy feat.
A sensible goal (my goal) might be to work towards an intermediate step, where Qt Webassembly could be built successfully inside a Docker container, independently of the developer’s or builder’s system and/or system configuration, and the resulting build output then being moved/deployed to a developer machine (for building apps in Qt Creator) and/or onto a web server for testing/deployment.
That being said, developers, please keep you heads high, -- It’s hard and frustrating work, but I for one appreciate your work very much!
-
-
Perhaps you have read this?
https://blog.qt.io/blog/2019/03/05/using-docker-test-qt-webassembly/ -
@lorn.potter said in Problems compiling Qt 5.13.0-alpha for Webassembly:
Perhaps you have read this?
https://blog.qt.io/blog/2019/03/05/using-docker-test-qt-webassembly/No, I haven't seen that one (yet). It may provide a good starting point -- thanks for sharing the link!