Ubuntu 20.04
I need to install qt6 including qtwebengine package, but when I run configuration ./configure -opensource -nomake examples -nomake tests -force-debug-info I get a message that some of the required libraries to support qpa-xcb are not found.
WARNING: QtWebEngine won't be built. Could not find all necessary libraries for qpa-xcb support. X11:YES LIBDRM:YES XCOMPOSITE:YES XCURSOR:YES XRANDR:YES XI:YES XPROTO:YES XSHMFENCE:YES XTST:YES
It is a bit confusing because all the libraries are present in both the error list and the qt requirements list.
I have already checked all the dependencies that I found in official docs and on some forums. I also got note warning from qt Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing., I am not sure if this is related to my problem, but in any case d-bus and at-spi are also installed.
Related
I have a QT project that was originally developed for Mac and now we are porting it on Linux.
What I would like to do is to build (and Deploy) the project across both platform (Mac and Linux) using the Mac, possibly from QT Creator.
For this reason I need to configure QT Creator (creating a new Kit) adding a Linux Toolchain. I found the appropriate toolchain here:
Linux tool chain for Mac
Unfortunately that toolchain not contains the QT Framework. So I need to cross compile QT from the Mac using the Linux toolchain above.
To cross compile QT I tried this configure parameters (~/gcc-4.8.1-for-linux64/x86_64-pc-linux/ is the Linux toolchain path):
./configure -prefix ~/gcc-4.8.1-for-linux64/qt5.5.0 -xplatform linux-g++ -device-option CROSS_COMPILE=~/gcc-4.8.1-for-linux64/x86_64-pc-linux/ -opensource -confirm-license -no-opengl -make libs -make tools -nomake examples -nomake tests -sysroot ~/gcc-4.8.1-for-linux64/
Unfortunately the command miserably fails with this error
Note: QtSerialBus: Cannot find linux/can.h and linux/can/raw.h Linux headers for socketCAN support.
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
WARNING: No QPA platform plugin enabled! This will
produce a Qt that cannot run GUI applications.
The dependencies needed for xcb to build are listed in
src/plugins/platforms/xcb/README
ERROR: detected a std::atomic implementation that fails for function pointers.
Please apply the patch corresponding to your Standard Library vendor, found in
qtbase/config.tests/common/atomicfptr
Any thought?
Cheers
Background
Basically I need a Openssl support for my application, preferably through dynamic linking. For this I have complied the Openssl libraries using the following:
perl configure VC-WIN32 no-asm --prefix=C:\Build-OpenSSL-VC-32
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak test
nmake -f ms\ntdll.mak install
using VC 2017 x86 all tests passed. So far so good. Then I compiled qt5 from source using the following configuration:
configure -debug-and-release -opensource -nomake examples -nomake tests -confirm-license --prefix="C:\Work\qt-bin-5.9-VC-17" -skip webengine -platform win32-msvc -openssl -I C:\Build-OpenSSL-VC-32\include -L C:\Build-OpenSSL-VC-32\lib
The build process succeeded with VC 2017. After this I installed the latest version of qt-creator. Then I configured the qt versions/kits and paths to the newly complied version. No other versions are installed on this computer. Next I created a small program to test if everything is working properly. This resulted in QSslSocket::sslLibraryBuildVersionString() returning OpenSSL 1.0.2l 25 May 2017 (version I compiled) and QSslSocket::supportsSsl() returning false. Note I have included:
QT += network
INCLUDEPATH += C:\Build-OpenSSL-VC-32\include
LIBS += C:\Build-OpenSSL-VC-32\lib\libeay32.lib
LIBS += C:\Build-OpenSSL-VC-32\lib\ssleay32.lib
in the .pro file. I've tried adding the .dll instead of the .lib files but I then get the following error.
C:\Build-OpenSSL-VC-32\bin\libeay32.dll:-1: error: LNK1107: invalid or corrupt file: cannot read at 0x2B8
I would really appreciate any help and information about what I did wrong.
It is normal to have an error when you replace the ".lib" by the ".dll", you cannot link directly to a dll. You must link to a ".lib", the ".dll" will be required at execution. But you should not have to link directly to OpenSSL when building your own app, Qt will load them at run-time when they are needed.
QSslSocket::sslLibraryBuildVersionString() returns the version of the SSL library used when you built Qt.
You need to use QSslSocket::sslLibraryVersionString() to get the version number of the run-time SSL library. QSslSocket::supportsSsl() gives info about SSL support at run-time, which may not be available even if SSL support was available when you built Qt itself.
From what you described, it seems that your program fails to find the OpenSSL dll at run-time. Be sure to place libeay32.dll and ssleay32.dll next to your exe file or in your PATH.
I am trying to install OpenCV on my Windows 10 following this guide. In order to install it with my own-build libraries, I need to build qt from the source. I downloaded the latest sources from the qt page (5.6.0, I didn't find any other sources availible), but after typing
configure -release -no-webkit -no-phonon -no-phonon-backend -no-script - no-scripttools
-no-qt3support -no-multimedia -no-ltcg
In VS2013/VS2015 command promt, I got an error:
Unknown option -no-webkit
Unable to detect the platform from environment. Use -platform command line
argument or set the QMAKESPEC environment variable and run configure again.
I have an option just to make everything. But I have to specify the platform. I didn't find how to do it.
Can anyone give me a hint, how to install qt correctly? I have VS 2013 and 2015. I am going to use VS2013, since VS2015 is not supported by CUDA toolkit 7.5.
Thanks,
Mikhail
Update: I was able to begin the installation process by typing configure -platform win32-msvc2013 -mp -release (although I have win64), but after accepting the licence, I got an error: execute: File or path was not found(nmake). Screenshot is attached
have you tried with the MSVC2013 command prompt:
configure -platform win32-msvc2013 -mp -release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-qt3support -no-multimedia -no-ltcg
then type:
nmake
Update:
Also, before that, try adding the path to your Qt source code, with the bin folder, to the PATH variable of windows.
For instance, if your PATH variable is currently set to %SystemRoot%\system32;%SystemRoot%; and your Qt source code is at C:\dev\Qt-5.6\
then set your PATH variable to %SystemRoot%\system32;%SystemRoot%;C:\dev\Qt-5.6;C:\dev\Qt-5.6\bin
This website explains how to change the PATH variable on Windows, in case you're not familiar with it: http://www.computerhope.com/issues/ch000549.htm
Then restart the MSVC2013 Command Prompt, or Windows. I believe that should help the compilation. Let me know if it solves your problem.
What about this:
-skip qtwebkit
Excluding a Qt Submodule
Configure's -skip option allows certain Qt submodules to be excluded from the Qt build. These submodules correspond to the Git submodules in the standard Qt 5 repository. Note that many packages contain multiple Qt modules. For example, to exclude Qt NFC and Qt Bluetooth from the Qt build, provide -skip qtconnectivity as the argument to configure.
There already is a quite related question (rq) here, but it is not specialized enough and my reputation is not high enough to ask for more advice in the comments ... yet, time is running and I've got to get somewhere.
Once the original question is answered, this one can and should be deleted.
What I want: Working in Visual Studio 2015, using the qt-library. That's it.
What I did:
Install vs2015, works
Download the qt5.5.0 source, built it following the (rq) instruction using jom (nmake worked the same, just was slower)
Install the qt package extension for vs2015, also following (rq)
The first error: The building-process didn't create any mkspecs, so i wasn't able to set the directory in the QT-options in visual studio: "This QT version uses an unsupported makefile generator (used:, supported: MSVN.NET, MSBUILD)"
I tried to hack that by replacing it with the mkspec-folder of an installed version to I was able to select the qtbase-folder in the Qt Options.
Played around with the library-directories, the include-directories and the additional-dependencies of the VS-Project. No matter what I did, the include-files where not found.
As this didn't work out, I installed qt 5.5.0 mingw492_32 with the installer. Using that I was able to create a new project with the QTCreator. It compiled in the QTCreator. After that I executed
qmake -platform win32-msvc2015 -tp vs
to convert the project into a Visual-Studio-project, while qmake was the executable from the previously BUILT version, not the installed one, the include-files where still not found in visual studio.
What am I doing wrong? The library-directories, the include-directories and the additional-dependencies look fine to me in the converted project.
EDIT 1:
I followed the walkthrough and everything built successfully. Yet, the mkspecs-folder is still empty. Creating a Qt-Widget-application with the Qt Creator endts up in a crashing app (no changes were made to the default code):
Second Chance Assertion Failed: File minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp, Line 980
Calling
qmake -platform win32-msvc2015 -tp vs
also isn't successfull:
qmake -platform win32-msvc2015 -tp vs
WARNING: Unable to generate output for: D:/_Daten/_Studium/Bachelor-Thesis/Visual-Studio/VISAR-FSA/GuiTest/Makefile.Debug [TEMPLATE vsapp]
WARNING: Unable to generate output for: D:/_Daten/_Studium/Bachelor-Thesis/Visual-Studio/VISAR-FSA/GuiTest/Makefile.Release [TEMPLATE vsapp]
EDIT 2:
Concerning the mkspecs: Turns out I had to call both:
jom -j 8
jom install
Now all mkspecs are created. The official documentation made me think that the second one only was an option for the build when a destination path was set.
Yet, a freshly created Qt Widget Application in Qt Creator, with the built and installed QT-version and the correct compiler, still won't compile. A LNK2019 occures in [qtmain.lib(qtmain_win.obj)], telling me that there is a link to a symbol "__imp__CommandLineToArgvW#8" in function "_WinMain#16", that was not resolved.
Here is a complete walkthrough:
How to compile Qt 5 under Windows or Linux, 32 or 64 bit, static or dynamic on VS2010, VS2012, VS2013 or VS2015 Express or g++.
You might want to uninstall all previous Qt.
I have Qt built for VS2015 as well as VS2013 and for 5.50 onwards it shouldn't need anything particularly special to get it to build successfully. I tend to use a cut down version of the Walkthrough that #jafar's mentions (and also closer to the method in the official docs')
Clone the qt5 repository or unzip the source
Start a command prompt. IMPORTANT: create the correct 'VS2015 x86 or x64' prompt
DON'T edit the msvc-desktop.conf as mentioned in the Walkthrough. (Qt can't be built with the /MT flag)
Run configure:
configure -debug-and-release -opensource -platform win32-msvc2015 -opengl desktop -nomake examples -nomake tests
Build with jom -j 8 (I find you get diminishing returns beyond that) or nmake. If you omit the examples and tests I can build the whole of qtbase in about 10-15 minutes
Run jom install or nmake install
The new Qt 5.1 has (partial) support for iOS as mentioned in the release announcement, but how do I actually build and deploy a Qt project to a iOS device? Or in other words, how do I end up with a iOS XCode project?
This shows how to compile qt5 for the iOS simulator.
Based on qt build instructions for iOS.
If you want to build for an iOS device, you have to check out the qt5 sources a second time to a second directory and use the alternate configure command as shown below.
This uses qt 5.2 beta 1. Check for newer versions with git tag.
git clone git://gitorious.org/qt/qt5.git qt5-ios-simulator.git
cd qt5-ios-simulator.git
git tag
git reset --hard v5.2.0-beta1
Initialize qt but do not use webkit because it takes too long to compile
perl init-repository --no-webkit
Configure qt to use open source version with simulator, skipping examples and test
./configure -xplatform macx-ios-clang -developer-build -opensource -release -nomake examples -nomake tests -sdk iphonesimulator
Alternatively, use this configure command in a separate git checkout to build for iOS devices
./configure -xplatform macx-ios-clang -developer-build -opensource -release -nomake examples -nomake tests
Run make. Uses 4 jobs in parallel for faster compilation.
make -j 4
cd ..
Done.
You may test if everything works by building an example project
git clone https://github.com/msorvig/qt-ios-demo.git
cd qt-ios-demo
../qt5-ios-simulator.git/qtbase/bin/qmake
open qt-ios-demo.xcodeproj
I have not tried it myself yet but I would guess have to install XCode and Qt Creator on your OSX. As I know the Qt guys its probably like the Android version. Just try to install the Qt SDK with the online installer and select the iOS version. The rest should be possible in QtCreator. I would be interested to know if it worked.