mono make install失败,显示“错误1”

时间:2015-05-31 14:44:20

标签: mono makefile

我终于设法从源代码构建单声道,但是从顶层构建目录调用的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'失败了。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

正在运行

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似乎是可选的。

如有必要,请随时修改此内容。