mono make install 失败 "Error 1"

mono make install fails with "Error 1"

我终于设法让单声道从源代码构建,但是从顶级构建目录调用的 make install 在以下几点失败:

make[6]: Entering directory `/bld/mono/mono-4.0.0/mcs/class/System'
make install-local
WARNING: generic atexit() called from legacy shared library
make[7]: Entering directory `/bld/mono/mono-4.0.0/mcs/class/System'
MONO_PATH="./../../class/lib/build:$MONO_PATH" /bld/mono/mono-4.0.0/runtime/mono-wrapper ./../../class/lib/build/gacutil.exe /i ./../../class/lib/net_4_5/System.dll /f /root /usr/mono/lib /package 4.5
make[7]: *** [install-local] Error 1
make[7]: Leaving directory `/bld/mono/mono-4.0.0/mcs/class/System'
make[6]: *** [do-install] Error 2

错误 1 ​​是唯一抛出的错误。

我可以 运行 这个命令没有错误

MONO_PATH="./../../class/lib/build:$MONO_PATH" /bld/mono/mono-4.0.0/runtime/mono-wrapper ./../../class/lib/build/gacutil.exe /i ./../../class/lib/net_4_5/System.dll /f /root /usr/mono/lib /package 4.5

而且我可以 运行 在 mono-wrapper 中没有错误地执行最终命令

/bld/mono/mono-4.0.0 $ /bld/mono/mono-4.0.0/libtool --verbose --mode=execute "mono/mini/mono" --config "/bld/mono/mono-4.0.0/runtime/etc/mono/config" "mcs/class/lib/build/gacutil.exe" /i mcs/class/lib/net_4_5/System.dll /f /root /usr/mono/lib /package 4.5

但是运行宁'make install'失败了。有什么想法吗?

运行

make --debug=V install

显示在尝试执行 mcs/build/library.make 的第 197 行时失败,即:

196 install-local: $(gacutil)
197         $(GACUTIL) /i $(the_lib)  /f $(gacdir_flag) /root $(GACROOT) $(package_flag)

删除 $(package_flag) 变量允许构建成功完成。 警告:我不确定这样做是否会以其他方式破坏安装。以防万一...供将来参考...这是 'man gacutil' 中的相关条目:

COMMANDS
       -i  <assembly_path>  [-check_refs]  [-package  NAME]  [-root   ROOTDIR]
       [-gacdir GACDIR]

        Installs  an  assembly into the global assembly cache. <assembly_path>
       is the name of the file that contains the assembly manifest

       The -package option can be used to also create a directory in  in  pre-
       fix/lib/mono  with  the  name  NAME,  and  a  symlink  is  created from
       NAME/assembly_name to the assembly on the GAC.  This is used so  devel-
       opers can reference a set of libraries at once.

       The  -root option is used to specify the "libdir" value of an installa-
       tion prefix which differs from the prefix of the system  GAC.   Typical
       automake  usage  is  "-root $(DESTDIR)$(prefix)/lib".  To access assem-
       blies installed to a prefix other than the mono prefix, it is necessary
       to set the MONO_GAC_PREFIX environment variable.

       The  -gacdir  option  is included for backward compatibility but is not
       recommended for new code. Use the -root option instead.

基本上,-package 似乎是可选的。

如有必要,请随时进行编辑和更正。