The Artima Developer Community
Sponsored Link

Python Buzz Forum
Building CMUCL

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ng Pheng Siong

Posts: 410
Nickname: ngps
Registered: Apr, 2004

Ng Pheng Siong is just another guy with a website.
Building CMUCL Posted: Oct 28, 2004 10:03 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ng Pheng Siong.
Original Post: Building CMUCL
Feed Title: (render-blog Ng Pheng Siong)
Feed URL: http://sandbox.rulemaker.net/ngps/rdf10_xml
Feed Description: Just another this here thing blog.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ng Pheng Siong
Latest Posts From (render-blog Ng Pheng Siong)

Advertisement

With CMUCL 19a, building from source isn't that difficult, provided everything builds nicely which should be the case if one is using a supported platform.

The instructions are in the file BUILDING. To wit:

» Unpack the source into a directory called src. (First encounter with CMUCL's famous compilation bootstrapping problem: reading BUILDING without unpacking the source tree.)

» In the parent directory of src, create a target build directory:

$ src/tools/create-target.sh freebsd4 FreeBSD_gencgc FreeBSD

» Edit freebsd4/setenv.lisp to add some features. My CMUCL 19a binary installation has :ELF, :FREEBSD and :FREEBSD4 so I add those in.

» Recompile the Lisp world:

$ src/tools/build-world.sh freebsd4 lisp

» The first time this is done, build-world.sh writes, "The C header file has changed. Be sure to re-compile the startup code." Here the "startup code" refers to the C code that compiles to the lisp binary. How it builds is driven by the file freebsd4/lisp/Config, which is sym-linked to src/lisp/Config.FreeBSD_gencgc by create-target.sh above.

In this case, my purpose in rebuilding the thing is to link lisp to libc_r.so. Make one change to freebsd4/lisp/Config:

--- Config.FreeBSD_gencgc-nothr Thu Oct 28 20:25:46 2004
+++ Config.FreeBSD_gencgc       Fri Oct 29 10:25:13 2004
@@ -14,6 +14,6 @@
 ASSEM_SRC = x86-assem.S
 ARCH_SRC = x86-arch.c
 OS_SRC = FreeBSD-os.c os-common.c elf.c
-OS_LINK_FLAGS = -dynamic -export-dynamic
+OS_LINK_FLAGS = -pthread -dynamic -export-dynamic
 OS_LIBS =
 GC_SRC = gencgc.c

The link flag -pthread will link lisp to libc_r.so.

Now do it:

$ src/tools/rebuild-lisp.sh freebsd4
...
$ ldd freebsd4/lisp/lisp
freebsd4/lisp/lisp:
        libm.so.2 => /usr/lib/libm.so.2 (0x28085000)
        libc_r.so.4 => /usr/lib/libc_r.so.4 (0x280a0000)

» Build the Lisp world again:

$ src/tools/build-world.sh freebsd4 lisp

» Dump a core:

$ src/tools/load-world.sh freebsd4 "19a ngps freebsd4-pthread 2004-10-29"

» Test!

$ freebsd4/lisp/lisp -core freebsd4/lisp/lisp.core -noinit -nositeinit
...
Loaded subsystems:
    Python 1.1, target Intel x86
    CLOS based on Gerd's PCL 2004/04/14 03:32:47
* (+ 4 3) 

7
* 

Looks good.

Read: Building CMUCL

Topic: Phatbot Previous Topic   Next Topic Topic: botnet

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use