Trying to build qt5 with buildroot. I need to download the source so that everything is compiled through the cross-compiler.
One of my project relies on the 'Config-file Packages' (CMake helper config file) provided by Qt5 in the binary tarball at this location Qt5.8.0/5.8/gcc_64/lib/cmake.
Problem: I can't find that folder anywhere in the source. When I take one example file (e.g. Qt5Config.cmake), I can't find any git repo hosting it.
Had a look at Ubuntu packages and it is being distributed in qtbase5-dev. When I look at this package documentation, it says it is using qtbase-opensource-src 5.5.1+dfsg-16ubuntu7.4 as the source package. Had a look at the source package for 5.8 but the cmake files are not there.
I could upload those files in an ad-hoc git repo, but that just seems weird that those files are not hosted by the qt repo.
What am I missing?
The cmake files are generated while build. On Linux the results are installed to qt/lib/cmake.
Related
The Qt download page (http://download.qt.io/official_releases/qt/5.12/5.12.2/) offers multiple source archives that can be used to build Qt5 from source. One contains all sources, which I managed to build successfully, but it takes rather long and contains a lot of stuff that I do not use.
They also offer submodule source packages that can be used to only build a subset of what Qt offers. Howerver I could not find a manual on how to properly build these. I need the QtBase and the QtXmlPatterns packages. I manged to build the QtBase package on its own, but I would like to know how to build multiple of the submodules.
The QtXmlPatterns package can not be build on its own, so I tried to simply copy the sources from the QtXmlPatterns submodule into the QtBase submodule. But that gives me errors when I execute the configure step.
So what is the correct procedure for combining multiple of the submodule source packages into one setup that can be build?
Thank you for your time.
Edit:
Not sure if it is relevant, but I am building Qt5.12.2 on Windows with Visual Studio 2019.
The build flow is a bit different from building the full source package.
configure and build qtbase stand-alone as you have already done it. Use a PREFIX so that you can call make install and install the build results to some location in your file system.
you may want to add the resulting bin folder to your PATH environment variable
extract the other submodule you want to build into a separate folder
run qmake, make and make install on your submodule as if it was a "normal" Qt project. This will install the submodule to the PREFIX location of qtbase.
I'm attempting to install OpenSSL on Windows 10 for use with Qt development. I've tried installing from multiple sources, adding lines to my .pro file, and adding DLL files next to the built application, yet nothing works.
I've tried building and running the Qt HTTP request example, and that can't use HTTPS either, so it's not an issue with my code or configuration.
So, where should I get OpenSSL for Windows, and what do I do after installing it?
I've done this before.
For starters, you need to build OpenSSL 1.0.2 source code - available here. You'll need to follow the build instructions in the INSTALL.W32 file. And there are some amended instructions in the INSTALL.W64 file for 64-bit builds.
The two primary DLLs you will wind up building are libeay32.dll and ssleay32.dll. (Also copy off the libeay32.lib and ssleay32.lib stub files and corresponding .pdb files).
If your Qt sources are already built for OpenSSL, you can just drop these two DLLs into your Qt Bin folder (or wherever Qt5Networking.dll is loaded for your application).
If your Qt distribution is built from source, you might need to build Qt again with the openssl-linked option. This will enable Qt to be loaded via implicit DLL loading.
LIB=%LIB%;%c:\openssl\out32dll
configure -commercial release -opengl dynamic openssl-linked -force-debug-info -nomake examples -llibeay32 -lssleay32
jom
For a debug build to correspond to debug Qt5 binaries, you'll need to repeat the above steps, except follow the OpenSSL instructions for building debug binaries to the out32dll.dbg folder.
If your qt distribution was built with dynamic openssl loading, you just need to make sure ssleay32.dll and libeay32.dll are in a folder that is in your PATH environment variable.
I am referring to the files I need to point to in QTC_SOURCE variable.
I don't have admin access so I can't install the -dev packages as many pages suggest. I would prefer files I can directly download.
You need the Qt Creator source code. Download a tarball (.tar.gz or .zip) from here or clone the git repository.
MMMMMM#unbuntu:~/QT/test4Qml$ qmlscene main.qml
qmlscene: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmlscene': No such file or directory
My Qt Development Environment does not have qmlscene. I googled it, and I only found *.deb. How should I do it?
As far as I know, Qt is not installed by default in /usr/lib/x86_64-linux-gnu/qt4. That directory is the default path when linux detects a dependency which requires Qt.
Where did you installed Qt? How did you installed it? Did you set the PATH environment variable to where Qt binaries are installed?
Usually, you have to follow the next steps:
1.- Install the the basic requirements for building Qt applications.
2.- Download Qt. I recommend Qt 5 using an offline installer. Otherwise, you'd need to compile from the source. Here you have a list of older versions of Qt.
3.- Set the environment variable PATH to the directory where you Qt bin directory is installed.
I was searching a lot through Qt forums and Google for the last few days, but I could not find any obvious answer to this question.
I found the -prefix option (not even documented on Windows) that can be supplied to configure to specify different install directory, but this is not clear separation of the sources and binaries at all, since the build is still done in the source directory and then the files needed for installation are copied to the install directoy. I tried this -prefix option, and came to some problems. (i.e It doesn't copy the .pdb files to the install directory.)
Then I found this link about doing shadow builds but it has the big limitation that the build dir must be at the same level as the source dir.
I'm guessing you didn't try make
install? So try that. It should
install Qt to a separate directory
away from the sources.
Are you saying that after I do configure, I should do nmake install instead just nmake? I know that nmake will process the generated makefiles from qmake and will place them in the source Qt dir, but what nmake install will exactly do i.e in which directory will install the files and how to specify the directory where the files will be installed.
Note that I already do this:
configure -prefix builddir -platform win32-msvc2005
nmake install
The effect of the above two lines was that qt was compiled in the source dir and not directly to my builddir specified with prefix. Then the compiled files were copied in my builddir. I was hoping for something that will build my Qt files directly to the build dir, cause this way I stil need 4 Gb space for my source dir during the compilation. Also the pdb files were not copied to my buildir which is another issue.
Basically, you just have to run configure.exe from your build directory. For example:
mkdir \qt\4.5.2-build
cd \qt\4.5.2-build
set PATH=%cd%\bin;%PATH%
\qt\4.5.2-sources\configure.exe -platform win32-msvc2005
Where sources are in \qt\4.5.2-sources, that would cause the build to go into \qt\4.5.2-build on the current drive.
Also, you must have perl in your PATH, ActiveState Perl is suggested.
I had not previously heard of this limitation where the build and source directories must be at the same level. If you hit this problem you could try working around it by creating a symbolic link (see mklink command).
IIRC on Windows, you have to do a sandbox install, you can't do the UNIX-typical "make install".
There are two options usually for building Qt, -prefix-install and -prefix /foo
You pick one, so if -prefix doesn't allow you to type make install, then I guess on Windows you have to use the -prefix-install route, which is a sandboxed install to the directory you extract Qt to.
I'm guessing you didn't try make install? So try that. It should install Qt to a separate directory away from the sources.
At least the problem with the missing include files (e.g. qscriptengine.h) may by solved by temporary adding \qt\4.5.2-sources\include\Qt to the include path.
I moved the shadow build out of my home folder to a folder in C: and it worked. I know it's weird, but that's what happened. I suspect it must be a bug in syncqt.