Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Cannot build from source (v5.5.0 tag) - method "setSourceRect" in class "QSGSimpleTextureNode" not found
i`ve prepared and checked out the Qt Sources following this guide: https://wiki.qt.io/Building_Qt_5_from_Git.
I`ve checked out the 5.5 branch first and then the v5.5.0 tag as described.
Everytime when trying to build i get an error shortly before all files have been compiled (seems to come from qtwebengine/chromium package).
On the same system I have already built Qt 5.4.2 succesfully (also from sources).
It didnt work with the 5.5 branch only either.
Here is the error/make output:
/opt/qt5-src/qt5/qtwebengine/src/core/delegated_frame_node.cpp: In member function ‘void QtWebEngineCore::DelegatedFrameNode::commit(QtWebEngineCore::ChromiumCompositorData*, cc::ReturnedResourceArray*, QtWebEngineCore::RenderWidgetHostViewQtDelegate*)’: /opt/qt5-src/qt5/qtwebengine/src/core/delegated_frame_node.cpp:612:30: error: ‘class QSGSimpleTextureNode’ has no member named ‘setSourceRect’ textureNode->setSourceRect(toQt(tquad->tex_coord_rect)); ^ [10603/10614] CXX obj/src/core/QtWebEngineCore.download_manager_delegate_qt.o ninja: build stopped: subcommand failed. Makefile.gyp_run:366: recipe for target 'invoke_ninja' failed make: *** [invoke_ninja] Error 1
I do not have any idea why it complains about that missing method as I have checked out only the complete 5.5 sources in a clean directory.
Please, can you help me ?
Finally got rid of that error by setting up a new Ubuntu system. But now I am stuck at another point of compilation.
If I try to build the qtwebengine submodule only the following error came up:
ninja: error: 'gen/webkit/devtools_resources.pak', needed by 'gen/repack/qtwebengine_resources.pak', missing and no known rule to make it make: *** [invoke_ninja] Fehler 1
I checked out from git as described in https://wiki.qt.io/Building_Qt_5_from_Git, inited the repository and then switched to v5.5.1 tag and updated submodules.
Then I ran configure as follows:
- sudo ./configure -confirm-license -opensource -prefix "build-55" -nomake examples -nomake tests
And after that:
- sudo make module-qtwebengine -j4
I am now really stuck. Why does Webengine need resources from (old?) webkit ?
I do not know why the webengine isnt`t built at all (it never worked yet also not if I make a full compilation).
Any ideas please ?
Thank you !
I haven't checked for qtwebengine but sometimes doing a threaded build can trigger some problems. Try again without the -j4. The rest of Qt though has no problem with parallel builds.
Hope it helps
thank you gaist. Have tried it without multicore processing also but even the same error came up.
In the meantime I managed it - on the same system - to compile the webengine part only (from v5.5.1 tag and seperate webengine repo) follwing the guide from here: https://wiki.qt.io/How_to_Try_QtWebEngine
However, I do not know how to integrate a custom build of the webengine in an existing 5.5.1 installation so maybe someone can help me (this would solve my problem) ?
I tried to copy the librarys which were generated (libQtWebengine.so and all others from the "lib" folder) over the existing ones but now when I start an qt application I get the message "library QtPositions.so not found" or so.
It worked with standard 5.5.1 installation before copying over the custom libs.
FINALLY got that thing compiling without any errors or compilation stops. I found out that compiling webengine is only possible with the dev branch not with the tags. There was a post somewhere where this was mentioned but I just discovered lately.
However, if I take a look into the sources folder "qtwebengine/lib" I can find all webengine libraries which were built in there.
But if I run "make -install" and look into the output/installation directory and then into the "lib" folder the other libraries are there except the webengine one`s.
I think they were built successfully but are not copied over to the final library output/installation dir, maybe due to my configure-Command ?
This is what i`ve used:
- sudo ./configure -confirm-license -opensource -prefix "build-55" -nomake examples -nomake tests
Looking into /opt/qt/qt5/qtbase/lib (output for "make -install" setup with -prefix in .configure) --> WebEngine.so not there
Looking into /opt/qt/qt5/qtwebengine/lib --> WebEngine.so and others there (built)
Why sudo ? That's not a good idea.
Did you call configure in qtbase or in Qt's sources root directory ?
@SGaist sudo just to get sure (is a local machine for build purposes only so no security concerns).
I ran the configure from qt`s main directory.
I just realized, since you used a prefix, you should look there after calling make install
@SGaist Ah sorry my fault, but when i look into the libs in the prefix-dir ("/opt/qt-build/lib") there are also all qtwebengine specific libs missing others are there?
But from your configure line, the prefix is
i've changed the path to "/opt/qt-build/" in my configure call in the meantime. Other things did not change.
I have now copied my qt built over to the target machine to finally test it out. I`ve also copied the libs for the webengine manually to the outputs "lib" directory (as a workaround for this time).
However, when I try to run my Qt app on the target machine, the following comes up:
This application failed to start because it could not find or load the Qt platform plugin "xcb". Available platform plugins are: xcb. Reinstalling the application may fix this problem. Abgebrochen (Speicherabzug geschrieben)
I have read that this can be due to specific Qt libs not found. This is the output from ldd for libxcb:
ldd libqxcb.so linux-vdso.so.1 => (0x00007ffd54980000) libQt5XcbQpa.so.5 => not found libQt5Gui.so.5 => not found libQt5Core.so.5 => not found libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f58dafd5000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f58dac0b000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f58da902000) /lib64/ld-linux-x86-64.so.2 (0x000056487be63000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f58da6eb000)
If I ran ldd on my app executable all dependencies are resolved fine.
With the standard 5.5 installation on the same machine the app runs fine.
Whats the difference between my compiled version and the standard one? Does standard one not use xcb?
Btw. i am using LUbuntu 15.10 64-bit. I compiled it also in an LUbuntu 15.10 64-bit system.
UPDATE: Could it be that qt was compiled with 32-Bit if i dont specify -platform in configure even when on a 64-Bit sys ?
Were did you copy the compiled libs on your target exactly ? Does it match were you installed it on your main computer ?
@SGaist First of all thank you very much for your very persistent try to help. It drives me crazy that I cant get it so I really need it! Thank you!
So this are the steps on the compilation machine (Lubuntu 15.10 64Bit):
- Compiled 5.5 checkout and ran "make install"
- Copied alle files from "/opt/qt5-src/qt5/qtwebengine/lib" to "/opt/qt-build/lib"
- Created a tar from "/opt/qt5-build"
On the target machine (tried on Lubuntu 14.10 64Bit and Lubuntu 15.10 64Bit):
- Installed official Qt 5.5(.1) to standard installation path ("/opt/Qt")
- App runs fine
- Copied all files from the tar created on developer machine over to "/opt/Qt/5.5/gcc_64/" and overwrite existing ones
- --> XCB Error
If I copy the compiled qt over to my developer machine (also LUbuntu 15.10 64Bit, not the same as compilation or target machine) to a new directory and add them to Qt versions with QtCreator it complains that the qt version has errors and does not accept it. Is it possible to find out which errors are there (it doesn`t show me the error in detail) ?
I will post a screenshot if you need it ?
Btw in the meantime I made another approach (maybe this is an alternative?):
On my compilation machine I built the qtwebengine again like here: https://wiki.qt.io/How_to_Try_QtWebEngine (checked out from 5.5 branch).
Then I copied the created libs for webengine over to the existing installation (Qt 5.5.1 default) on my developer machine to the "lib" directory and overwrite the existing ones (QtWebEnigineCore.so.5 and so on).
Before this, I could compile my app without problems.
After this step, QtCreator complains about "undefined reference to dbus_connection_unref @LIBDBUS_1_3" when compiling/linking.
I only want to run my app with a custom build of webengine so I do not really need a complete custom build of Qt at all.
Is there any way to compile the webengine so that it is compatible to qt 5.5 standard installation or do I need some specific flags when building to make compatible libraries which I can copy over then ?
Thank you !
i am maybe coming closer to what is causing the problem for the full build which i have described two posts ahead (not the webengine-only build from prior post).
On the developer machine where I also copied the built over to, Qt Creator says the build is not installed correctly when referencing it`s path. However, I found out the error message for this is: "No mkspec could be found for this version".
The directory "mkspecs" is existing and has sub-directories in the installation path.
What does that message with mkspec mean ?? I have no clue!
One thing: you can't just move Qt around like that. If you copy your build to anther machine, you have to put it in the same place in that new machine.
Yeah thanks just got that about an hour ago. Thats real learning by doing :-(
I`ve read so many posts and wikis now but nowhere I could find that information or I have just overread it, sorry.
However, I have now managed it to get the installation into QtCreator so that it has been accepted and the mkspec error has gone away.
Now the next problem is that when I try to compile it on the developer machine using my custom build i get the following compilation error:
Unknown modules in QT: webenginewidgets
I guess this is because - as described earlier - all libs of the webengine and so on were NOT copied to the output directory (sort of build without webengine even if it was definitley built).
I copied the libs then over manually from the source dir but I fear this isn`t the only thing to do. But why were they not copied automatically when webengine was built ??
If you run your Qt built qmake just to configure the build of the QtWebEngine module, what do you get on the console ?
you mean when I start qmake in the "qtwebengine" directory after I run configure ?
Btw does it have any effect when I run qmake in the "qtwebengine" directory after the "configure" and before the "make" commands (for example to modify a GYP variable) ?
Pah, that`s it...
If I run qmake in the "qtwebengine" dir after configure it doesn`t copy the webengine libs to installation path.
If I build it without running qmake before, the webengine libraries are also copied :-)
But this is my problem:
I need to build chromium/webengine with support for system ffmpeg, how can I archive this without using qmake as it makes those big problems ?
The only solution i`ve found out is that you can pass it to qt by running qmake with "qmake -r WEBENGINE_CONFIG += use_system_ffmpeg" in the webengine dir is there another way to modify the Gyp variables ?
You can edit the linux.pri file and remove the test from the ffmpeg line
@SGaist Hi! Where is the file located exactly? I can only find a "desktop_linux.pri" file in the config-dir but there is no line with ffmpeg and test ?
Finally managed it to get a build with webengine. You have just to execute the "qmake -r WEBENGINE_CONFIG+=use_system_ffmpeg" BEFORE ".configure" then it works :-p
I`ve deployed the build over to development machine without problems.
There are now just two compiler errors left which I think can be solved:
- libicu18n.so.55 not found (I think i can solve it by installing a icu18n-5 package if there are any?)
- Undefined references to dbus: "dbus connection unref" and so on, much more errors referencing to dbus (this is actually coming from webengine)
How can I make a build which does not use libicu and dbus or at least uses system ones (if that helps in my case) ?