【问题标题】:Compiling Poly/ML on MobaXterm: the ar u option在 MobaXterm 上编译 Poly/ML:ar u 选项
【发布时间】:2019-03-11 08:23:41
【问题描述】:

我将在基于 MobaXterm v11.1 cygwin 的发行版上编译 Poly/ML Standard ML 编译器。一经制作,我得到

/bin/sh ./libtool  --tag=CC   --mode=link gcc  -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2  -Wall -fexceptions   -o libffi_convenience.la  src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo      src/x86/ffi.lo src/x86/win32.lo
libtool: link: ar cru .libs/libffi_convenience.a src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/win32.o
ar: unknown option -- u
BusyBox v1.22.1 (2015-11-10 11:07:12    ) multi-call binary.

我这里有 binutils/ar 版本 2.29.1。

在带有 binutils/ar 版本 2.22.52 的 Fedora 机器上编译通过。

我将 binutils 2.22.52 下载到我的 MobaXterm 并尝试编译它,但我收到与上述相同的错误消息:

ar cru libintl.a bindtextdom.o dcgettext.o dgettext.o gettext.o finddomain.o loadmsgcat.o localealias.o textdomain.o l10nflist.o explodename.o dcigettext.o dcngettext.o dngettext.o ngettext.o plural.o plural-exp.o localcharset.o relocatable.o localename.o log.o osdep.o intl-compat.o
ar: unknown option -- u

我看到了两个可能的原因:

  • ar 的 u 选项在版本 2.22.52 和 2.29.1 之间已弃用
  • MobaXterm 使用包含有限版本 ar 的 Busybox

什么是真正的解释,如何安装理解 u 选项的 ar?

【问题讨论】:

  • 您似乎在调用 ar,它是 BusyBox 1.22.1 的一部分,并且它被剥夺了一些功能。您需要确保调用正确的 ar 可执行文件。也许更改您的 makefile 以通过完整路径调用它。
  • ar 只是 /bin 中 Busybox 的符号链接——makefile 非常困难,因为 make 也会调用 configure,我看看它

标签: configure busybox unix-ar polyml mobaxterm


【解决方案1】:

在 polyml 源代码分发的 libffi 目录中,我使用 AR_FLAGS=cr 编辑了 configure,然后在该目录中编辑了 make,然后在 polyml 主目录中编辑了 make。

幸运的是,u 选项对生成的文件没有实际影响,仅对编译时间有影响:

   u   Normally, ar r... inserts all files listed into the archive.  If you would like to insert only
       those of the files you list that are newer than existing members of the same names, use this
       modifier.  The u modifier is allowed only for the operation r (replace).  In particular, the
       combination qu is not allowed, since checking the timestamps would lose any speed advantage
       from the operation q.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-01-19
    • 2020-04-26
    • 1970-01-01
    • 1970-01-01
    • 2016-04-19
    • 1970-01-01
    • 2014-02-14
    • 1970-01-01
    相关资源
    最近更新 更多