TL;DR :
Even if libffi
似乎已安装,configure
即使我给它添加(正确的?)前缀,脚本也找不到它。
/!\ 这篇文章的最后一部分(*)是我陷入困境的地方。 /!\
我仅提供其他信息来解释我如何到达那里。我对这篇长篇文章表示歉意,如果有些内容与您无关,请随时告诉我,我会考虑缩短我的文章。
为什么我想自己编译CLISP:
我有一个 lisp 程序,我想运行,但是当运行它时CLISP
安装有brew
(我没有 root 访问权限)我收到以下错误:
*** - CFFI requires CLISP compiled with dynamic FFI support.
所以我想自己编译CLISP。
到目前为止我一直在使用 SBCL,但我有一个问题 https://stackoverflow.com/questions/35578933/no-mouse-wheel-event-when-shift-key-is-down-shiftmouse-wheel-events并正在寻找其他实现。
我在尝试编译时遇到的问题:
我下载了来源 https://sourceforge.net/projects/clisp/files/latest/download,解开皮重。
然后我尝试跑步./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
and libsigsegv
都是用自制软件安装的。但都没有找到。
我尝试添加--with-libsigsegv-prefix=<several values amongst ~/.brew/{opt,opt/libsigsegv,lib,Cellar/libsigsegv,...}
: 还是同样的问题。
这也几乎相同这个帖子 https://stackoverflow.com/questions/3901698/is-there-a-way-to-get-the-clisp-compiled-with-dynamic-ffi-support-on-mac-os or this one https://stackoverflow.com/questions/130636/how-to-compile-clisp-2-46。但经过验证的解决方案对我不起作用(没有 root 访问权限的 OSX)。
运行配置时--with-dynamic-ffi
and --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
当尝试手动安装时libffi
and 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
我没主意了。