【发布时间】:2016-08-19 09:00:00
【问题描述】:
TL;DR :
即使libffi 似乎已安装,configure 脚本即使我给它(正确?)前缀也找不到它。
/!\ 这篇文章的最后一部分 (*) 是我卡住的地方。 /!\
我只提供其他信息来解释我是如何到达那里的。我为这个大帖子道歉,如果有些事情对你来说似乎无关紧要,请随时告诉我,我会考虑发布我的帖子更短。
为什么要自己编译CLISP:
我有一个想要运行的 lisp 程序,但是当使用安装了 brew 的 CLISP 运行它时(我没有 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.
重要:
libffi 和libsigsegv 都安装了自制软件。 但没有找到。
我尝试添加 --with-libsigsegv-prefix=<several values amongst ~/.brew/{opt,opt/libsigsegv,lib,Cellar/libsigsegv,...} :仍然是同样的问题。
这也与this post 或this one 几乎相同。但是经过验证的解决方案对我不起作用(没有 root 访问权限的 OSX)。
使用--with-dynamic-ffi 和--ignore-absence-of-libsigsegv 运行配置时:
我尝试运行 ./configure --ignore-absence-of-libsigsegv 并添加了 --with-dynamic-ffi,因为有人在 cmets 中建议我。
但后来我明白了:
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
尝试手动安装 libffi 和 libsigsegv 时:
我也尝试了第一条错误消息中的建议:
在运行./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
我没有想法。
【问题讨论】:
标签: macos common-lisp homebrew failed-installation clisp