Issue building qt 5.12 from latest git repo
-
As the name suggest, you build from a folder that is not in the sources.
Unix style:
cd /tmp mkdir build_qt cd build_qt /path/to/configure make make install
It's easy to adapt to Windows.
By the way, why not use the MinGW version provided with Qt ?
@SGaist With regard to the mingw that comes with qt - I did not see that in the repo? There is a folder called
gnuwin32
but that just contains a few other tools - no gcc/make tools. -
@SGaist @kshegunov hummm.... after a complete clean and build in a different folder and removed
-no-pch
, I still get the same error : ( -
It's provided through the installer but right now I can't tell exactly where you can get it from outside of said installer.
-
@SGaist With regard to the mingw that comes with qt - I did not see that in the repo? There is a folder called
gnuwin32
but that just contains a few other tools - no gcc/make tools.@code_fodder said in Issue building qt 5.12 from latest git repo:
I did not see that in the repo?
There's no compiler in the repo. When building from git it's your responsibility to have to toolchain set up beforehand. @SGaist is thinking about the online installer for Qt, which indeed comes with a
mingw
distribution that can be used directly. -
@SGaist @kshegunov hummm.... after a complete clean and build in a different folder and removed
-no-pch
, I still get the same error : (Could you post the configure summary as well, so we know what we're dealing with?
-
@SGaist @kshegunov Ah, ok, yes I have used that one in the past, but for re-compiling the whole project, I wanted to create a list of steps to be able to reproducibly compile qt statically. I fugured getting mingw tool chain from source forge to be the "cleanest" option (https://sourceforge.net/projects/mingw-w64/ - v7.3.0)
Otherwise I have to install qt AND download the source from git!? ... do you think that would make a difference?
@kshegunov out of curiosity how did your static configure/build for 5.12.2 differ from what I was doing? (just looking for other ideas)
-
@SGaist @kshegunov Ah, ok, yes I have used that one in the past, but for re-compiling the whole project, I wanted to create a list of steps to be able to reproducibly compile qt statically. I fugured getting mingw tool chain from source forge to be the "cleanest" option (https://sourceforge.net/projects/mingw-w64/ - v7.3.0)
Otherwise I have to install qt AND download the source from git!? ... do you think that would make a difference?
@kshegunov out of curiosity how did your static configure/build for 5.12.2 differ from what I was doing? (just looking for other ideas)
@code_fodder said in Issue building qt 5.12 from latest git repo:
Otherwise I have to install qt AND download the source from git!? ... do you think that would make a difference?
You can install the source from the installer as well. But I doubt it'd make much of a difference.
@kshegunov out of curiosity how did your static configure/build for 5.12.2 differ from what I was doing? (just looking for other ideas)
I don't build statically. It was not much different, though, I stick to minimalistic builds:
$> git clone git://code.qt.io/qt/qt5.git 5.12 $> cd 5.12 $> git checkout 5.12 $> perl init-repository --module-subset=essential $> ./configure -developer-build -no-optimize-debug -opensource -confirm-license -nomake examples -nomake tests $> make -j12
from history. I didn't provide a prefix and did a
-developer-build
because I wanted to debug a module inside Qt itself. If you want this for application development the appropriate flags for configure are-debug -prefix <some-dir>
-
@kshegunov I have printed the config summary at the end of my question after where it says: update
-
Just tried a config like this
configure -debug -opensource -confirm-license -nomake examples -nomake tests -static -static-runtime -skip webengine -prefix "C:\install\Qt\5.12.1-static"
which more closley matches what @kshegunov mentioned - but I got the same error : (Note: git log yields (so I am also on 5.12 branch):
* 1c6f272 (HEAD -> 5.12, origin/HEAD, origin/5.12) Update submodules on '5.12' in qt5 * 391ba3a Update submodules on '5.12' in qt5 | * ce91433 (origin/dev) Fix failing to disable windows update service | * ab43850 Update submodules on 'dev' in qt5 | * d926dbe Update submodules on 'dev' in qt5 | * 99b46f7 Update submodules on 'dev' in qt5 | * 80339a1 Build MIPS64 with b2qt toolchain | * 5cfa563 Provision docker test servers based on Ubuntu 18.04 | * b4b2152 Start the docker machine and update with new TLS certificates | * 177df80 Docker Provisioning: Install docker test servers on Windows 10 (x86_64) | * ab3e348 Display the provisioned version of docker tool kits | * b97e448 Move and merge the provisioning scripts of docker to a shared folder | | * b0afdd4 (origin/5.13) Update submodules on '5.13' in qt5 | | * 2471d6d (tag: v5.13.0-alpha1) Update qtwebengine | | * 7bd38a4 Update submodules on '5.13' in qt5 | | * 26ff9bd Update submodules on '5.13' in qt5 | | * 9b84c71 Build MIPS64 with b2qt toolchain | | * 84aa9b7 Merge remote-tracking branch 'origin/dev' into 5.13 | | |\ | | |/ | |/| | * | 1830cca Update submodules on 'dev' in qt5
-
@kshegunov I have printed the config summary at the end of my question after where it says: update
The configure seems okay to me. Very odd. Do you get the same if you don't do a static build?
PS. Also try with forward slashes to exclude some path escaping nonsense.
C:/install/Qt/5.12.1-static
-
@kshegunov I just did this:
rm * -r
(I have the linux like commands installed because I prefer them - but its still just a dos prompt)configure -debug -opensource -confirm-license -nomake examples -nomake tests -skip webengine -prefix "C:/install/Qt/5.12.1-sharedlibs
mingw32-make -j8
Same issue :((
I am going to try exactly what you did! and see...
-
@kshegunov I just did this:
rm * -r
(I have the linux like commands installed because I prefer them - but its still just a dos prompt)configure -debug -opensource -confirm-license -nomake examples -nomake tests -skip webengine -prefix "C:/install/Qt/5.12.1-sharedlibs
mingw32-make -j8
Same issue :((
I am going to try exactly what you did! and see...
Just be sure to run
git submodule foreach --recursive "git clean -dfx" && git clean -dfx
before eachconfigure
, to be completely certain there's no *.cache files left over from the previous attempt. -
Just be sure to run
git submodule foreach --recursive "git clean -dfx" && git clean -dfx
before eachconfigure
, to be completely certain there's no *.cache files left over from the previous attempt.@kshegunov good idea - I will do that.
While I am doing that, did you see this before: https://forum.qt.io/topic/95040/build-qt5-from-git-with-msys2-fails-on-wrong-includes
I just wander if its relevant. But I am not using msys or anything... just wanted to get your thoughts...
-
@kshegunov good idea - I will do that.
While I am doing that, did you see this before: https://forum.qt.io/topic/95040/build-qt5-from-git-with-msys2-fails-on-wrong-includes
I just wander if its relevant. But I am not using msys or anything... just wanted to get your thoughts...
I don't know, it may be. I too use strawberry pearl when I do my windows testing (I develop and use Linux principally). You could try it if anything else doesn't work. It'd also allow you to run the repo's perl init script.
-
@kshegunov well, i just did the super squeaky clean, I even opened using dos cmd.exe just in case conemu was causing an issue (using mingw-w64.bat to set the tool chain path) ... it was a thoroughly horrid experience, I don't recommend it! (why Microsoft, oh why is your command prompt the same one from the 1980's?!?)
but alas, I got the same result (I was following what you did this time - i.e. exactly the same config. As mentioned in that other post (if I change
#include <QVector>
to#include "qvector.h"
that file does compile - but then I just hit another issue later...I am sort of out of ideas - I have had this all working on linux many times, but I just can't seem to get to grips with the windows builds of late : (
btw guys your support / ideas are much appreciated (and @SGaist)
-
Did you check whether the QXXXX files were generated ?
Also, can you test if you have the same problem with 5.12.1 ? -
Did you check whether the QXXXX files were generated ?
Also, can you test if you have the same problem with 5.12.1 ?@SGaist Where would these be? (I mean where should I look)
I am about to do somthing a bit crazy - and install windows 10!... juuuuust in case... that might take me a little while, but I should still be able to check these QXXX files...
Once I do that, yes I will try to build 5.12.1 (I assume that is a git branch)
-
In my build directory I did this (in the qtbase sub folder):
D:\install\Qt\qt5_static_build\qtbase>find -name "QVector*"
D:\install\Qt\qt5_static_build\qtbase>find -name "qvector*" ./include/QtCore/qvector.h
so I found qvector.h, but not QVector
-
So this means that the forward headers are not generated.
Do you have perl installed ?
-
@SGaist yes:
D:\install\Qt\qt5_static_build\qtbase>perl --version This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-msys-thread-multi Copyright 1987-2015, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.