ceph 编译时遇到的一些问题

发布时间 2023-11-30 14:55:15作者: oyjoyj
在用git submodule update --init --recursive --progress下载子模块时,一些子模块加载有问题,包括rook-clinet-python
#######################################执行./do_cmake.sh时报错###########################

Make Error at /usr/share/cmake/Modules/ExternalProject.cmake:2847 (message): No download info given for 'mgr-rook-client' and its source directory:
   /home/ceph.bk/src/pybind/mgr/rook/rook-client-python/rook_client

  is not an existing non-empty directory.  Please specify one of:

   * SOURCE_DIR with an existing non-empty directory
   * DOWNLOAD_COMMAND
   * URL
   * GIT_REPOSITORY
   * SVN_REPOSITORY
   * HG_REPOSITORY
   * CVS_REPOSITORY and CVS_MODULE
Call Stack (most recent call first):
  /usr/share/cmake/Modules/ExternalProject.cmake:3681 (_ep_add_download_command)
  src/pybind/mgr/rook/CMakeLists.txt:3 (ExternalProject_Add)

############解决办法###########
1.可以用在主目录下 用 git diff 看哪些模块下载有问题,例如
@@ -1 +1 @@
-Subproject commit 389cb68b87193358358ae87cc56d257fd0d80189
+Subproject commit 389cb68b87193358358ae87cc56d257fd0d80189-dirty
diff --git a/src/pybind/mgr/rook/rook-client-python b/src/pybind/mgr/rook/rook-client-python
--- a/src/pybind/mgr/rook/rook-client-python
+++ b/src/pybind/mgr/rook/rook-client-python
2.然后在.gitmodules下看子模块加载路径path,和地址url

submodule "src/pybind/mgr/rook/rook-client-python"

path = src/pybind/mgr/rook/rook-client-python

url = https://github.com/ceph/rook-client-python.git
3.删除rook-client-python
然后git clone
https://github.com/ceph/rook-client-python.git 下载
下载下来后 放到
src/pybind/mgr/rook目录下