Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/125.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Qt:init存储库中止,返回“0”;致命:需要一次修订;_C++_Git_Qt_Qt5 - Fatal编程技术网

C++ Qt:init存储库中止,返回“0”;致命:需要一次修订;

C++ Qt:init存储库中止,返回“0”;致命:需要一次修订;,c++,git,qt,qt5,C++,Git,Qt,Qt5,我试图从git源代码构建Qt5的5.9版,但更新子模块失败: git clone https://github.com/qt/qt5.git cd qt5 git checkout 5.9 ./init-repository ... ... lots of submodules being updated successfully ... fatal: Needed a single revision Unable to find current revision in submodule p

我试图从git源代码构建Qt5的5.9版,但更新子模块失败:

git clone https://github.com/qt/qt5.git
cd qt5
git checkout 5.9
./init-repository
...
... lots of submodules being updated successfully
...

fatal: Needed a single revision
Unable to find current revision in submodule path 'qtnetworkauth'
git submodule update --force --no-fetch exited with status 256 at ./init-repository line 198.
    Qt::InitRepository::exe(Qt::InitRepository=HASH(0x1fa94b0), "git", "submodule", "update", "--force", "--no-fetch") called at ./init-repository line 429
    Qt::InitRepository::git_clone_all_submodules(Qt::InitRepository=HASH(0x1fa94b0), "qt/qt5", 0, "preview", "essential", "addon", "deprecated") called at ./init-repository line 644
    Qt::InitRepository::run(Qt::InitRepository=HASH(0x1fa94b0)) called at ./init-repository line 655
所以它看起来像是
qtnetworkauth
某种程度上配置错误,但我不知道如何解决它。 我试图删除
qtnetworkauth
模块,方法是删除
.gitmodules
qtdoc
中的引用以及文件夹本身,但其他模块失败

奇怪的是,在删除并添加对
qtnetworkauth
的引用后运行
/init repository-f
时,我可以看到它被签出,但子模块文件夹仍然是空的:

...
+ git clone --no-checkout https://github.com/qt/qtnetworkauth qtnetworkauth
Cloning into 'qtnetworkauth'...
remote: Counting objects: 283, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 283 (delta 3), reused 0 (delta 0), pack-reused 269
Receiving objects: 100% (283/283), 200.12 KiB | 0 bytes/s, done.
Resolving deltas: 100% (139/139), done.
Checking connectivity... done.
+ git config commit.template /home/frans/_HOME/0000_android_dev/qt5/.commit-template
+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtnetworkauth
...

我做错了什么?或者,如果它是一个Qt错误-我如何解决它?

在实际获取所有存储库之前,您正在更改分支。这可能会破坏
/init repository
脚本中的某些内容

我已检查此序列是否有效:

git clone git://code.qt.io/qt/qt5.git
cd qt5/
./init-repository
git checkout 5.9
git submodule update

好吧,这很有趣——尽管改变我命令的顺序没有效果,但你还是帮了我。问题似乎是我使用的github克隆。从
code.qt.io
克隆解决了我的问题,即使两个克隆完全相同(遥控器除外)。改变你的答案,我会接受的。