Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. error building 6.5.1
Forum Updated to NodeBB v4.3 + New Features

error building 6.5.1

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 3 Posters 1.8k Views 2 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    Hi all -

    I'm (still) trying to build a static version of Qt for Windows. I want to use version 6.5.1. When I checked out remotes/origin/6.5.1, it gave me a detached HEAD warning.
    When I tried to run init-repository, I got an error:

    C:\qt6_repo>perl init-repository --module-subset=default,-qtwebengine
    Use of uninitialized value $url in scalar chomp at init-repository line 667.
    Have no origin remote.
    

    I suspect this has something to do with the way I checked out 6.5.1...can anyone shed some light on this for me?

    Thanks...

    SGaistS 1 Reply Last reply
    0
    • mzimmersM mzimmers

      @James-Gallegos

      CC:\qt6_repo>git remote -v
      origin  https://code.qt.io/qt/qt5.git (fetch)
      origin  https://code.qt.io/qt/qt5.git (push)
      
      C:\qt6_repo>git fetch origin
      
      C:\qt6_repo>git checkout remotes/origin/6.5.1
      Note: switching to 'remotes/origin/6.5.1'.
      
      You are in 'detached HEAD' state.
      ...
      C:\qt6_repo>perl init-repository
      Use of uninitialized value $url in scalar chomp at init-repository line 667.
      Have no origin remote.
      
      C:\qt6_repo>git --version
      git version 2.40.0.windows.1
      
      C:\qt6_repo>
      

      This is on Windows 10. I'm not sure what you're referring to regarding configuration settings, but I don't think I have anything unusual. In all other regards, Qt works fine for me.

      mzimmersM Offline
      mzimmersM Offline
      mzimmers
      wrote on last edited by mzimmers
      #10

      https://bugreports.qt.io/browse/QTBUG-114478

      Got this fixed - turns out the problem was that my installation of Perl put the perl paths above my Qt toolchain...general hilarity ensued. See the bug report for details.

      1 Reply Last reply
      0
      • mzimmersM mzimmers

        Hi all -

        I'm (still) trying to build a static version of Qt for Windows. I want to use version 6.5.1. When I checked out remotes/origin/6.5.1, it gave me a detached HEAD warning.
        When I tried to run init-repository, I got an error:

        C:\qt6_repo>perl init-repository --module-subset=default,-qtwebengine
        Use of uninitialized value $url in scalar chomp at init-repository line 667.
        Have no origin remote.
        

        I suspect this has something to do with the way I checked out 6.5.1...can anyone shed some light on this for me?

        Thanks...

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        Do you have a fresh clone of the super module or one that was already initialized once ?

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

        mzimmersM 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Do you have a fresh clone of the super module or one that was already initialized once ?

          mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by
          #3

          @SGaist not sure I understand the question. This operation was attempted immediately after I checked out the repo using:

          git clone https://code.qt.io/qt/qt5.git
          
          SGaistS 1 Reply Last reply
          0
          • mzimmersM mzimmers

            @SGaist not sure I understand the question. This operation was attempted immediately after I checked out the repo using:

            git clone https://code.qt.io/qt/qt5.git
            
            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            You understood correctly.

            So you did:

            git clone https://code.qt.io/qt/qt5.git qt6_repo
            cd qt6_repo
            git switch v6.5.1
            perl init-repository --module-subset=default,-qtwebengine
            

            ?

            One thing, I am unsure about is your subset. I think it needs the list of modules you want not the ones you don't. It might be the culprit so try removing your webengine entry. If cloned, you can disable it at configure time or even delete the folder content.

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

            mzimmersM 1 Reply Last reply
            0
            • SGaistS SGaist

              You understood correctly.

              So you did:

              git clone https://code.qt.io/qt/qt5.git qt6_repo
              cd qt6_repo
              git switch v6.5.1
              perl init-repository --module-subset=default,-qtwebengine
              

              ?

              One thing, I am unsure about is your subset. I think it needs the list of modules you want not the ones you don't. It might be the culprit so try removing your webengine entry. If cloned, you can disable it at configure time or even delete the folder content.

              mzimmersM Offline
              mzimmersM Offline
              mzimmers
              wrote on last edited by
              #5

              @SGaist yes I took the steps you listed, except I did a git checkout instead of a git switch (and got a detached HEAD message).

              Just tried your suggestion (on a fresh download) -- got the same error.

              Time for a bug report?

              Thanks...

              SGaistS 1 Reply Last reply
              0
              • mzimmersM mzimmers

                @SGaist yes I took the steps you listed, except I did a git checkout instead of a git switch (and got a detached HEAD message).

                Just tried your suggestion (on a fresh download) -- got the same error.

                Time for a bug report?

                Thanks...

                SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #6

                Can you also check with the dev branch ? Just so you have more information to give on the report ?

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

                mzimmersM 1 Reply Last reply
                1
                • SGaistS SGaist

                  Can you also check with the dev branch ? Just so you have more information to give on the report ?

                  mzimmersM Offline
                  mzimmersM Offline
                  mzimmers
                  wrote on last edited by
                  #7

                  @SGaist just tried that -- same error (different line number).

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    James Gallegos
                    wrote on last edited by
                    #8

                    The "detached HEAD" warning typically occurs when you check out a specific commit instead of a branch in a Git repository. It means that you're not currently on any branch, but rather on a specific commit. In your case, checking out the remotes/origin/6.5.1 branch should have automatically put you on the branch instead of leaving you with a detached HEAD.

                    Regarding the error you encountered when running init-repository, it seems to be unrelated to the detached HEAD warning. The error message suggests that the init-repository script couldn't determine the URL of the origin remote for the repository. This might indicate an issue with the Git configuration or the repository itself.

                    To shed some light on the issue, let's go through a few troubleshooting steps:

                    Verify that Git is properly installed and configured on your system. Ensure that you have the latest version of Git installed and that it is accessible from the command line.

                    Check your Git configuration by running the following command in the repository directory:

                    git remote -v
                    
                    

                    git remote -v
                    This should display the remote URL(s) associated with the repository. Make sure you have an origin remote configured and that it points to the correct URL.

                    If you don't have an origin remote set up, or if the URL is incorrect, you can add it manually using the following command:

                    git remote add origin <repository_url>
                    

                    Replace <repository_url> with the URL of the repository you're working with.

                    If the remote URL is correct but you're still experiencing issues, try updating your local repository with the latest changes from the remote repository by running the following commands:

                    git fetch origin
                    git checkout remotes/origin/6.5.1
                    

                    This will fetch the latest changes from the origin remote and switch to the remotes/origin/6.5.1 branch.

                    Finally, attempt to run init-repository again and see if the error persists.

                    If you still encounter issues after following these steps, it might be helpful to provide more details about your environment, such as the version of Git you're using, the operating system, and any relevant Qt or repository configuration settings.

                    mzimmersM 1 Reply Last reply
                    0
                    • J James Gallegos

                      The "detached HEAD" warning typically occurs when you check out a specific commit instead of a branch in a Git repository. It means that you're not currently on any branch, but rather on a specific commit. In your case, checking out the remotes/origin/6.5.1 branch should have automatically put you on the branch instead of leaving you with a detached HEAD.

                      Regarding the error you encountered when running init-repository, it seems to be unrelated to the detached HEAD warning. The error message suggests that the init-repository script couldn't determine the URL of the origin remote for the repository. This might indicate an issue with the Git configuration or the repository itself.

                      To shed some light on the issue, let's go through a few troubleshooting steps:

                      Verify that Git is properly installed and configured on your system. Ensure that you have the latest version of Git installed and that it is accessible from the command line.

                      Check your Git configuration by running the following command in the repository directory:

                      git remote -v
                      
                      

                      git remote -v
                      This should display the remote URL(s) associated with the repository. Make sure you have an origin remote configured and that it points to the correct URL.

                      If you don't have an origin remote set up, or if the URL is incorrect, you can add it manually using the following command:

                      git remote add origin <repository_url>
                      

                      Replace <repository_url> with the URL of the repository you're working with.

                      If the remote URL is correct but you're still experiencing issues, try updating your local repository with the latest changes from the remote repository by running the following commands:

                      git fetch origin
                      git checkout remotes/origin/6.5.1
                      

                      This will fetch the latest changes from the origin remote and switch to the remotes/origin/6.5.1 branch.

                      Finally, attempt to run init-repository again and see if the error persists.

                      If you still encounter issues after following these steps, it might be helpful to provide more details about your environment, such as the version of Git you're using, the operating system, and any relevant Qt or repository configuration settings.

                      mzimmersM Offline
                      mzimmersM Offline
                      mzimmers
                      wrote on last edited by
                      #9

                      @James-Gallegos

                      CC:\qt6_repo>git remote -v
                      origin  https://code.qt.io/qt/qt5.git (fetch)
                      origin  https://code.qt.io/qt/qt5.git (push)
                      
                      C:\qt6_repo>git fetch origin
                      
                      C:\qt6_repo>git checkout remotes/origin/6.5.1
                      Note: switching to 'remotes/origin/6.5.1'.
                      
                      You are in 'detached HEAD' state.
                      ...
                      C:\qt6_repo>perl init-repository
                      Use of uninitialized value $url in scalar chomp at init-repository line 667.
                      Have no origin remote.
                      
                      C:\qt6_repo>git --version
                      git version 2.40.0.windows.1
                      
                      C:\qt6_repo>
                      

                      This is on Windows 10. I'm not sure what you're referring to regarding configuration settings, but I don't think I have anything unusual. In all other regards, Qt works fine for me.

                      mzimmersM 1 Reply Last reply
                      0
                      • mzimmersM mzimmers

                        @James-Gallegos

                        CC:\qt6_repo>git remote -v
                        origin  https://code.qt.io/qt/qt5.git (fetch)
                        origin  https://code.qt.io/qt/qt5.git (push)
                        
                        C:\qt6_repo>git fetch origin
                        
                        C:\qt6_repo>git checkout remotes/origin/6.5.1
                        Note: switching to 'remotes/origin/6.5.1'.
                        
                        You are in 'detached HEAD' state.
                        ...
                        C:\qt6_repo>perl init-repository
                        Use of uninitialized value $url in scalar chomp at init-repository line 667.
                        Have no origin remote.
                        
                        C:\qt6_repo>git --version
                        git version 2.40.0.windows.1
                        
                        C:\qt6_repo>
                        

                        This is on Windows 10. I'm not sure what you're referring to regarding configuration settings, but I don't think I have anything unusual. In all other regards, Qt works fine for me.

                        mzimmersM Offline
                        mzimmersM Offline
                        mzimmers
                        wrote on last edited by mzimmers
                        #10

                        https://bugreports.qt.io/browse/QTBUG-114478

                        Got this fixed - turns out the problem was that my installation of Perl put the perl paths above my Qt toolchain...general hilarity ensued. See the bug report for details.

                        1 Reply Last reply
                        0
                        • mzimmersM mzimmers has marked this topic as solved on

                        • Login

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