在OSX上编译clisp-2.49:未找到LIBFFI

时间:2016-04-25 19:37:38

标签: macos common-lisp homebrew failed-installation clisp

TL; DR:

即使安装了libffi,即使我给它(正确的?)前缀,configure脚本也找不到它。

  

/!\这篇文章的最后一部分(*)是我被困的地方。 /!\

     

我只是提供其他信息来解释我是如何到达那里的。我为这篇重要帖子道歉,如果事情似乎与你无关,请随时告诉我,我会考虑发帖子短。

为什么我要自己编译CLISP:

我有一个lisp程序我想运行但是当CLISPbrew一起安装时运行它(我没有root权限)我收到以下错误:

*** - CFFI requires CLISP compiled with dynamic FFI support.

所以我想自己编译CLISP。

到目前为止我使用的是SBCL,但我有a problem并正在寻找其他实现。

尝试编译时遇到的问题:

我下载了the sources,解开了它。

然后我尝试运行./configure

但我明白了:

Configure findings:
  FFI:        no (user requested: default)
  readline:   no (user requested: default)
  libsigsegv: no, consider installing GNU libsigsegv
./configure: libsigsegv was not detected, thus some features, such as
  generational garbage collection and
  stack overflow detection in interpreted Lisp code
cannot be provided.
Please install libsigsegv like this:
  mkdir tools; cd tools; prefix=`pwd`/x86_64-apple-darwin15.4.0
  wget http://ftp.gnu.org/pub/gnu/libsigsegv/libsigsegv-2.8.tar.gz
  tar xfz libsigsegv-2.8.tar.gz
  cd libsigsegv-2.8
  ./configure --prefix=${prefix} && make && make check && make install
  cd ../..
  rm -f src/config.cache
  ./configure --with-libsigsegv-prefix=${prefix}
If you insist on building without libsigsegv, please pass
  --ignore-absence-of-libsigsegv
to this script:
  ./configure --ignore-absence-of-libsigsegv
If you have installed libsigsegv, but clisp does not detect it,
you might have installed it incorrectly, see section 2 in in unix/INSTALL.

重要提示:

libffilibsigsegv都安装了自制软件。但未找到。 我尝试添加--with-libsigsegv-prefix=<several values amongst ~/.brew/{opt,opt/libsigsegv,lib,Cellar/libsigsegv,...}:仍然是同样的问题。

这与this postthis one几乎相同。但经验证的解决方案对我不起作用(没有root访问权限的OSX)。

使用--with-dynamic-ffi--ignore-absence-of-libsigsegv运行配置时:

我试图运行./configure --ignore-absence-of-libsigsegv并添加--with-dynamic-ffi,因为有人在评论中建议我。

但后来我明白了:

Configure findings:
  FFI:        no (user requested: default)
  readline:   no (user requested: default)
  libsigsegv: no, consider installing GNU libsigsegv
As you requested, we will proceed without libsigsegv...
./makemake  --with-dynamic-ffi    > Makefile
clang: error: unsupported option '-print-multi-os-directory'
clang: error: no input files

尝试手动安装libffilibsigsegv时:

我也尝试了第一条错误消息中的建议:

运行./configure --with-libsigsegv-prefix=${prefix}时,我得到了:

Configure findings:
  FFI:        no (user requested: default)
  readline:   no (user requested: default)
  libsigsegv: yes
./makemake  --with-libsigsegv-prefix=/nfs/2013/v/vmonteco/Documents/clisp-2.49/tools/x86_64-apple-darwin15.4.0    > Makefile
clang: error: unsupported option '-print-multi-os-directory'
clang: error: no input files
make: `config.lisp' is up to date.

即使我添加了--with-dynamic-ffi,或者我尝试手动安装libffi,如建议的第一条错误消息(并添加--with-ffi-prefix=${prefix}

如果我尝试手动构建并安装libffcall

我得到很多

avcall-i386.s:7:2: error: instruction requires: Not 64-bit mode

运行make

(*)现在,它确实找到libsigsegv,但找不到libffi

然而${prefix}的树看起来像这样:

.
├── include
│   └── sigsegv.h
├── lib
│   ├── libffi-3.2.1
│   │   └── include
│   │       ├── ffi.h
│   │       └── ffitarget.h
│   ├── libffi.6.dylib
│   ├── libffi.a
│   ├── libffi.dylib -> libffi.6.dylib
│   ├── libffi.la
│   ├── libsigsegv.a
│   ├── libsigsegv.la
│   └── pkgconfig
│       └── libffi.pc
└── share
    ├── info
    │   ├── dir
    │   └── libffi.info
    └── man
        └── man3
            ├── ffi.3
            ├── ffi_call.3
            ├── ffi_prep_cif.3
            └── ffi_prep_cif_var.3

我没有想法。

1 个答案:

答案 0 :(得分:1)

在OSX上(仅针对OSX进行开发)检查Clozure是一个非常好的主意。 http://ccl.clozure.com它包括一个IDE,从速度和一般性能来看,它与SBCL相当。您可以使用Clozure开发本机OSX UI应用程序,当然这些应用程序不可移植。如果你遵守标准,那么你甚至可以在Linux等上使用Clozure。

相关问题