【问题标题】:mono make install fails with "Error 1"mono make install 失败并出现“错误 1”
【发布时间】:2015-06-11 18:39:12
【问题描述】:

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

【问题讨论】:

  • 根据您的安装位置,您可能需要sudo。
  • sudo 在我使用的环境(android)中不可用,但我设法找到了问题......问题在于 rules.make 构建路径的方式。
  • 您可能想自己提供答案,以便将来的访问者受益。
  • 我会尽快把它放在一起......并弄清楚回答我自己的问题是否是不。我问的最后一个问题......然后回答......被否决了
  • 如果没有人愿意评论为什么他们对你投了反对票,那么我不会担心,只要你的回答确实回答了你的问题,那么你就做对了。

标签: mono makefile


【解决方案1】:

跑步

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-23
    • 1970-01-01
    • 2016-01-22
    相关资源
    最近更新 更多