error building 6.5.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...
-
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.
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.
-
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...
Hi,
Do you have a fresh clone of the super module or one that was already initialized once ?
-
Hi,
Do you have a fresh clone of the super module or one that was already initialized once ?
-
@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.gitYou 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.
-
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.
-
@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...
Can you also check with the dev branch ? Just so you have more information to give on the report ?
-
Can you also check with the dev branch ? Just so you have more information to give on the report ?
-
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 -vgit 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.1This 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.
-
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 -vgit 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.1This 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.
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.
-
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.
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.
-
M mzimmers has marked this topic as solved on