Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Issue building qt 5.12 from latest git repo

Issue building qt 5.12 from latest git repo

Scheduled Pinned Locked Moved Solved General and Desktop
38 Posts 3 Posters 8.4k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    What if you remove the -no-pch option ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    1
    • C Offline
      C Offline
      code_fodder
      wrote on last edited by code_fodder
      #3

      thanks for your suggestion SGaist

      So I ran:

      • configure ... without -no-pch (pre-compiled headers I think?)
      • ming32-make -j8

      It started to recompile, but hit the same issue. Two questions for you:

      1. Do I need to clean the old configuration first?
      2. Do I need to do a make clean?
      3. Why do you suspect that -no-pch is a problem (just for my understanding)?

      I read somewhere that QVector is there, and if you replace the #include <QVector> with #include "qvector.h" that file then compiles - I tired this an it worked - but it just fails further on. <QDebug> is the next one - again if I lower-case it then that file compiles.

      kshegunovK 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4
        1. Yes
        2. Better would be to use an out of source build
        3. Such an idee, since the header is missing I was wondering whether the generated headers were properly created and if that option could be responsible.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        C 1 Reply Last reply
        1
        • SGaistS SGaist
          1. Yes
          2. Better would be to use an out of source build
          3. Such an idee, since the header is missing I was wondering whether the generated headers were properly created and if that option could be responsible.
          C Offline
          C Offline
          code_fodder
          wrote on last edited by
          #5

          @SGaist Ok - I am doing a git clean (at least for the top level) then a reconfigure.

          Weirdly ...-make clean seems to go on forever! stopped eventually.

          Sorry, what do you mean by out of source build - how do I do that (or link to how to do that)?

          Thanks :)

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            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 ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            C 1 Reply Last reply
            1
            • C code_fodder

              thanks for your suggestion SGaist

              So I ran:

              • configure ... without -no-pch (pre-compiled headers I think?)
              • ming32-make -j8

              It started to recompile, but hit the same issue. Two questions for you:

              1. Do I need to clean the old configuration first?
              2. Do I need to do a make clean?
              3. Why do you suspect that -no-pch is a problem (just for my understanding)?

              I read somewhere that QVector is there, and if you replace the #include <QVector> with #include "qvector.h" that file then compiles - I tired this an it worked - but it just fails further on. <QDebug> is the next one - again if I lower-case it then that file compiles.

              kshegunovK Offline
              kshegunovK Offline
              kshegunov
              Moderators
              wrote on last edited by kshegunov
              #7

              As it happens I was building 5.12.2 from source today. Long story short I hit the same problem you had, but in another module and another header. It was caused by a stale configuration cache file. So, run the "really clean tree" command from the wiki and it should fix itself. I do second @SGaist's advice to build out of the source tree, however!

              Read and abide by the Qt Code of Conduct

              C 1 Reply Last reply
              2
              • kshegunovK kshegunov

                As it happens I was building 5.12.2 from source today. Long story short I hit the same problem you had, but in another module and another header. It was caused by a stale configuration cache file. So, run the "really clean tree" command from the wiki and it should fix itself. I do second @SGaist's advice to build out of the source tree, however!

                C Offline
                C Offline
                code_fodder
                wrote on last edited by
                #8

                @kshegunov Thanks for that, I was literally just trying to phrase a git command to clean everything - so that's a very timely reply : ))

                I am not sure why I would have a stale config file though, since I checked out fresh, but I will definitely try this! - Also by using a "not in the source" build folder as @SGaist also mentioned then the stale config file issue should disappear anyway (I think) since its a fresh folder.

                Anyway... trying now..

                1 Reply Last reply
                0
                • SGaistS SGaist

                  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 ?

                  C Offline
                  C Offline
                  code_fodder
                  wrote on last edited by
                  #9

                  @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.

                  kshegunovK 1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    code_fodder
                    wrote on last edited by
                    #10

                    @SGaist @kshegunov hummm.... after a complete clean and build in a different folder and removed -no-pch, I still get the same error : (

                    kshegunovK 1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      It's provided through the installer but right now I can't tell exactly where you can get it from outside of said installer.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • C code_fodder

                        @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.

                        kshegunovK Offline
                        kshegunovK Offline
                        kshegunov
                        Moderators
                        wrote on last edited by
                        #12

                        @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.

                        Read and abide by the Qt Code of Conduct

                        1 Reply Last reply
                        1
                        • C code_fodder

                          @SGaist @kshegunov hummm.... after a complete clean and build in a different folder and removed -no-pch, I still get the same error : (

                          kshegunovK Offline
                          kshegunovK Offline
                          kshegunov
                          Moderators
                          wrote on last edited by
                          #13

                          Could you post the configure summary as well, so we know what we're dealing with?

                          Read and abide by the Qt Code of Conduct

                          1 Reply Last reply
                          1
                          • C Offline
                            C Offline
                            code_fodder
                            wrote on last edited by
                            #14

                            @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)

                            kshegunovK 1 Reply Last reply
                            0
                            • C code_fodder

                              @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)

                              kshegunovK Offline
                              kshegunovK Offline
                              kshegunov
                              Moderators
                              wrote on last edited by kshegunov
                              #15

                              @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>

                              Read and abide by the Qt Code of Conduct

                              1 Reply Last reply
                              1
                              • C Offline
                                C Offline
                                code_fodder
                                wrote on last edited by
                                #16

                                @kshegunov I have printed the config summary at the end of my question after where it says: update

                                kshegunovK 1 Reply Last reply
                                1
                                • C Offline
                                  C Offline
                                  code_fodder
                                  wrote on last edited by
                                  #17

                                  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                                                                        
                                  
                                  1 Reply Last reply
                                  0
                                  • C code_fodder

                                    @kshegunov I have printed the config summary at the end of my question after where it says: update

                                    kshegunovK Offline
                                    kshegunovK Offline
                                    kshegunov
                                    Moderators
                                    wrote on last edited by kshegunov
                                    #18

                                    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

                                    Read and abide by the Qt Code of Conduct

                                    1 Reply Last reply
                                    1
                                    • C Offline
                                      C Offline
                                      code_fodder
                                      wrote on last edited by
                                      #19

                                      @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...

                                      kshegunovK 1 Reply Last reply
                                      0
                                      • C code_fodder

                                        @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...

                                        kshegunovK Offline
                                        kshegunovK Offline
                                        kshegunov
                                        Moderators
                                        wrote on last edited by
                                        #20

                                        Just be sure to run git submodule foreach --recursive "git clean -dfx" && git clean -dfx before each configure, to be completely certain there's no *.cache files left over from the previous attempt.

                                        Read and abide by the Qt Code of Conduct

                                        C 1 Reply Last reply
                                        2
                                        • kshegunovK kshegunov

                                          Just be sure to run git submodule foreach --recursive "git clean -dfx" && git clean -dfx before each configure, to be completely certain there's no *.cache files left over from the previous attempt.

                                          C Offline
                                          C Offline
                                          code_fodder
                                          wrote on last edited by
                                          #21

                                          @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...

                                          kshegunovK 1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved