欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

MAC OSX 10.7 Lion 下简单编译 CLISP 的过程--使用了 macport

程序员文章站 2022-06-11 16:18:54
...

MAC OSX 10.7 Lion 下简单编译 CLISP 的过程

最简单的办法就是用 macport(需要你的系统上先安装好 macport), 命令行如下:

sudo port install clisp

然后就边喝茶边看 CPU 温度飙升到 90多度,风扇以 6000 转的速度狂转....

整个过程就是先查找 Clisp 有依赖关系的库, 先把这些库下载编译好, 最后编译 Clisp , 编译最后的输入信息如下:

..........
--->  Computing dependencies for clisp
--->  Fetching archive for clisp
--->  Attempting to fetch clisp-2.49_2.darwin_11.i386.tbz2 from http://jog.id.packages.macports.org/macports/packages/clisp
--->  Attempting to fetch clisp-2.49_2.darwin_11.i386.tbz2 from http://packages.macports.org/clisp
--->  Attempting to fetch clisp-2.49_2.darwin_11.i386.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/clisp
--->  Fetching distfiles for clisp
--->  Attempting to fetch clisp-2.49.tar.bz2 from http://cjj.kr.distfiles.macports.org/clisp
--->  Verifying checksum(s) for clisp
--->  Extracting clisp
--->  Applying patches to clisp
--->  Configuring clisp
--->  Building clisp
--->  Staging clisp into destroot
--->  Installing clisp @2.49_2
--->  Activating clisp @2.49_2
--->  Cleaning clisp
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.
Air:clisp-2.49 admin$ ls
ANNOUNCE	Makefile.devel	configure	src		win32msvc
COPYRIGHT	SUMMARY		doc		tests
GNU-GPL		build-dir	emacs		unix
INSTALL		clisp.spec	modules		utils
Air:clisp-2.49 admin$

如上图所示编译完成, 在命令行试验一下, 输入 clisp 试试:

Air:clisp-2.49 admin$ clisp
  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Welcome to GNU CLISP 2.49 (2010-07-07) <http://clisp.cons.org/>

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2010

Type :h and hit Enter for context help.

[1]>
OK! 大功告成, 不过这时候翻了翻说明, 才发现其实有不少选项可以手工控制的, 比如:

7. Type

         make

   to build CLISP.
   If you are an expert in building CLISP, you may alternatively do this
   in eleven easy to remember steps:
         make init                prepares all symbolic links and utilities
         make allc                makes all *.c files
         make lisp.run            makes the executable runtime
           (cygwin & mingw: use "make lisp.exe" instead)
         make interpreted.mem     a memory image with everything uncompiled
         make halfcompiled.mem    a memory image with compiler.fas and
                                   the rest uncompiled
         make lispinit.mem        makes all *.fas files and
                                   a memory image with everything compiled
         make manual              makes the documentation
         make modular             prepares for module building
         make boot                makes the boot linking set (just the core)
         make base                makes the base linking set
                                   (boot + regexp + syscalls + i18n + readline)
         make full                makes the full linking set (base + your
                                   MODULES variable in Makefile, see step 5)
最后看了下默认生成的映像文件 lispinit.mem 发现在我用过的几个 Common Lisp 实现中, 它是最小的, 只有 2M! 真是夸张啊!

转载于:https://my.oschina.net/freeblues/blog/138004