从github检出Mono源并在安装了MDK和./autogen.sh --prefix=/usr/local
的环境下运行monolite
后,我尝试make
,然后出现以下错误:
make[4]: Nothing to be done for `all-am'.
make[3]: Nothing to be done for `all-am'.
Making all in runtime
if test -w /Users/alp/workspace/mono/mcs; then :; else chmod -R +w /Users/alp/workspace/mono/mcs; fi
cd /Users/alp/workspace/mono/mcs && make --no-print-directory -s NO_DIR_CHECK=1 PROFILES=' net_2_0 net_3_5 net_4_0 net_4_5 ' CC='gcc' all-profiles
-n Bootstrap compiler:
Mono C# compiler version 2.10.11.0
make[7]: *** No rule to make target `../../external/ikvm/reflect/*.cs', needed by `../class/lib/basic/basic.exe'. Stop.
make[6]: *** [do-all] Error 2
make[5]: *** [all-recursive] Error 1
make[4]: *** [profile-do--basic--all] Error 2
make[3]: *** [profiles-do--all] Error 2
make[2]: *** [all-local] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
这是因为external/ikvm
是空的。所以我运行了git submodule init
,它成功了,然后我尝试了git submodule update --recursive
。那是我收到错误的时候:
fatal: Needed a single revision
Unable to find current revision in submodule path 'external/Lucene.Net'
如果我运行git submodule
,除Lucene.Net
以外的所有子模块上都会显示减号:
$ git submodule
88fb67b07621dfed054d8d75fd50672fb26349df external/Lucene.Net
-471c3e0803a9f40a0acc8aeceb31de6ff93a52c4 external/Newtonsoft.Json
-e77b12e6cc5ed260a98447f609e887337e44e299 external/aspnetwebstack
-fc76b93e3e0064b2d751796878f9cbe88df1d5f4 external/cecil
...
为什么git submodule update
给我这个错误?
答案 0 :(得分:0)
这应该有效:
rm -Rf external/Lucene.Net/
git submodule init
git submodule update