0.8.4.10
authorDaniel Barlow <dan@telent.net>
Tue, 7 Oct 2003 21:41:26 +0000 (21:41 +0000)
committerDaniel Barlow <dan@telent.net>
Tue, 7 Oct 2003 21:41:26 +0000 (21:41 +0000)
"brown paper bag" bug fix: initialise the thread->state slot
when it's created, to fix the most obvious threading problem

Search order for sbcl.core and sbclrc simplified.

Manual page edits: updates for contrib/, threading, platforms,
new sbcl.core search order, etc

Make "debugger invoked" message print thread id
asdf-install contrib: new UNINSTALL function deletes a
package's files.

New installation variable $(BUILD_ROOT) for use by package
installers that want to install into a fake root directory

contrib/asdf-install/defpackage.lisp
contrib/asdf-install/installer.lisp
contrib/asdf-module.mk
contrib/vanilla-module.mk
doc/sbcl.1
install.sh
src/code/debug.lisp
src/code/toplevel.lisp
src/runtime/runtime.c
src/runtime/thread.c
version.lisp-expr

index 1b9636b..bc85bad 100644 (file)
@@ -6,8 +6,8 @@
    #:*proxy* #:*cclan-mirror* #:*sbcl-home*
    #:*verify-gpg-signatures* #:*locations*
    #:*safe-url-prefixes*
-   ;; entry point
-   #:install))
+   ;; external entry points
+   #:uninstall #:install))
 
 (defpackage :asdf-install-customize
   (:use "CL" "SB-EXT"  "SB-BSD-SOCKETS" "ASDF-INSTALL"))
index 639fcdc..607b02d 100644 (file)
         (return))))))
 
 
+
 (defun verify-gpg-signature/url (url file-name)
   (destructuring-bind (response headers stream)
       (url-connection (concatenate 'string url ".asc"))
            (prin1 *trusted-uids* out))))
       (dolist (l *temporary-files*)
        (when (probe-file l) (delete-file l))))))
+
+(defun uninstall (system &optional (prompt t))
+  (let* ((asd (asdf:system-definition-pathname system))
+        (system (asdf:find-system system))
+        (dir (asdf::pathname-sans-name+type
+              (asdf::resolve-symlinks asd))))
+    (when (or (not prompt)
+             (y-or-n-p
+              "Delete system ~A~%asd file: ~A~%sources: ~A~%Are you sure?"
+              system asd dir))
+      (delete-file asd)
+      (asdf:run-shell-command "rm -r ~A" (namestring dir)))))
+      
+;;; some day we will also do UPGRADE, but we need to sort out version
+;;; numbering a bit better first
index 9bfb44c..9c98ea4 100644 (file)
@@ -15,5 +15,5 @@ test: all
 
 
 install: $(EXTRA_INSTALL_TARGETS)
-       tar cf - . | ( cd $(INSTALL_DIR) && tar xpvf - )
-       ( cd  $(SBCL_HOME)/systems && ln -fs ../$(SYSTEM)/$(SYSTEM).asd . )
+       tar cf - . | ( cd $(BUILD_ROOT)$(INSTALL_DIR) && tar xpvf - )
+       ( cd  $(BUILD_ROOT)$(SBCL_HOME)/systems && ln -fs ../$(SYSTEM)/$(SYSTEM).asd . )
index 2aebda3..f8e44ee 100644 (file)
@@ -5,4 +5,4 @@ $(MODULE).fasl: $(MODULE).lisp ../../output/sbcl.core
 test:: $(MODULE).fasl
 
 install:
-       cp $(MODULE).fasl $(INSTALL_DIR)
+       cp $(MODULE).fasl $(BUILD_ROOT)$(INSTALL_DIR)
index 7d51edb..216fd64 100644 (file)
@@ -16,7 +16,7 @@
 .TH SBCL 1 "$Date$"
 .AT 3
 .SH NAME
-SBCL -- "Steel Bank Common Lisp"
+SBCL -- Steel Bank Common Lisp
 
 .SH DESCRIPTION
 
@@ -76,7 +76,13 @@ SBCL aims for but has not completely achieved compliance with the ANSI
 standard for Common Lisp. More information about this is available in
 the BUGS section below.
 
-SBCL also includes various non-ANSI extensions.
+SBCL also includes various non-ANSI extensions, described more fully
+in the User Manual.  Some of these are in the base system and others
+are "contrib" modules loaded on request using REQUIRE.  For example,
+to load the SB-BSD-SOCKETS module that providces TCP/IP connectivity,
+
+   * (require 'asdf)
+   * (require 'sb-bsd-sockets)
 
 Many Lispy extensions have been retained from CMU CL:
 .TP 3
@@ -130,13 +136,17 @@ maintenance work in CMU CL. Many but not all bug fixes and
 improvements have been shared between the two projects, and sometimes
 the two projects disagree about what would be an improvement.
 
-Most extensions supported by CMU CL are not supported in SBCL,
+Most extensions supported by CMU CL have been unbundled from SBCL,
 including Motif support, the Hemlock editor, search paths, the
-low-level Unix interface, the WIRE protocol, multithreading, various
-user-level macros and functions (e.g. LETF, ITERATE, MEMQ,
-REQUIRED-ARGUMENT), and many others.
+low-level Unix interface, the WIRE protocol, various user-level macros
+and functions (e.g. LETF, ITERATE, MEMQ, REQUIRED-ARGUMENT), and many
+others.
+
+SBCL inplements multithreading, but in a completely different fashion
+from CMU CL: see the User Manual for details.  As of 0.8.5 this is
+considered beta-quality and must be explicitly enabled at build time.
 
-SBCL has retained some extensions from parent CMU CL. Many of the
+SBCL has retained some extensions from its parent CMU CL. Many of the
 retained extensions are in these categories:
 .TP 3
 \--
@@ -170,19 +180,17 @@ called SAVE-LISP-AND-DIE instead of SAVE-LISP, and SBCL's
 SAVE-LISP-AND-DIE supports fewer keyword options than CMU CL's
 SAVE-LISP does.
 
-(Why doesn't SBCL support more extensions? Why drop all those nice
-extensions from CMU CL when the code already exists? This is a
-frequently asked question on the mailing list. In some cases, it's a
-design philosophy issue: arguably SBCL has done its job by supplying a
-stable FFI, and the right design decision is to move functionality
-derived from that, like socket support, into separate libraries,
-distributed as separate software packages by separate maintainers. In
-other cases it's a practical decision, hoping that focusing on a
-smaller number of things will let us do a better job on them. This is
-very much the case for multithreading: it's an important, valuable
-extension, but it's not easy to get right, and especially while SBCL
-is still working on basic ANSI compliance, difficult extensions aren't
-likely to be a priority.)
+(Why doesn't SBCL support more extensions natively?  Why drop all
+those nice extensions from CMU CL when the code already exists? This
+is a frequently asked question on the mailing list.  There are two
+principal reasons.  First, it's a design philosophy issue: arguably
+SBCL has done its job by supplying a stable FFI, and the right design
+decision is to move functionality derived from that, like socket
+support, into separate libraries.  Some of these are distributed with
+SBCL as "contrib" modules, others are distributed as separate software
+packages by separate maintainers. Second, it's a practical decision -
+focusing on a smaller number of things will, we hope, let us do a
+better job on them.)
 
 .SH THE COMPILER
 
@@ -365,60 +373,25 @@ chance to see it.
 
 .SH SYSTEM REQUIREMENTS
 
-SBCL currently runs on
-X86 (Linux, FreeBSD, and OpenBSD), Alpha (Linux, Tru64), PPC
-(Linux) and SPARC (Linux and Solaris 2.x).
-For information on other ongoing and possible ports, see the
-sbcl-devel mailing list, and/or the web site.
+SBCL currently runs on X86 (Linux, FreeBSD, and OpenBSD), Alpha
+(Linux, Tru64), PPC (Linux, Darwin/MacOS X), SPARC (Linux and Solaris
+2.x), and MIPS (Linux).  For information on other ongoing and possible
+ports, see the sbcl-devel mailing list, and/or the web site.
 
 SBCL requires on the order of 16Mb RAM to run on X86 systems, though
 all but the smallest programs would be happier with 32Mb or more.
 
-.SH ENVIRONMENT
-
-.TP 10n
-.BR SBCL_HOME
-If this variable is set, it overrides the default directories for
-files like "sbclrc" and "sbcl.core", so that instead of being searched
-for in e.g. /etc/, /usr/local/etc/, /usr/lib/, and /usr/local/lib/, they
-are searched for only in the directory named by SBCL_HOME. This is
-intended to support users who wish to use their own version of SBCL
-instead of the version which is currently installed as the system
-default.
-.PP
-
-.SH FILES
-
-/usr/lib/sbcl/sbcl.core and /usr/local/lib/sbcl/sbcl.core are the
-standard locations for the standard SBCL core, unless overridden by
-the SBCL_HOME variable.
-
-/etc/sbclrc and /usr/local/etc/sbclrc are the standard locations for
-system-wide SBCL initialization files, unless overridden by the
-SBCL_HOME variable or the --sysinit command line option.
-
-$HOME/.sbclrc is the standard location for a user's SBCL
-initialization file, unless overridden by the --userinit
-command line option.
-
 .SH KNOWN BUGS
 
 This section attempts to list the most serious and long-standing bugs.
 For more detailed and current information on bugs, see the BUGS file
 in the distribution.
 
-It is possible to get in deep trouble by exhausting 
-memory. To plagiarize a sadly apt description of a language not
-renowned for the production of bulletproof software, "[The current
-SBCL implementation of] Common Lisp makes it harder for you to shoot
-yourself in the foot, but when you do, the entire universe explodes."
-.TP 3
-\--
-Like CMU CL, the SBCL system overcommits memory at startup. On typical
-Unix-alikes like Linux and FreeBSD, this means that if the SBCL system
-turns out to use more virtual memory than the system has available for
-it, other processes tend to be killed randomly (!).
-.PP
+It is possible to get in deep trouble by exhausting heap memory.  The
+SBCL system overcommits memory at startup, so, on typical Unix-alikes
+like Linux and FreeBSD, this means that if the SBCL system turns out
+to use more virtual memory than the system has available for it, other
+processes tend to be killed randomly (!).
 
 The compiler's handling of function return values unnecessarily
 violates the "declarations are assertions" principle that it otherwise
@@ -512,6 +485,16 @@ Various information about SBCL is available at
 <http://sbcl.sourceforge.net/>. The mailing lists there are the
 recommended place to look for support.
 
+.SH ENVIRONMENT
+
+.TP 10n
+.BR SBCL_HOME
+This variable controls where files like "sbclrc", "sbcl.core", and the
+add-on "contrib" systems are searched for.  If it is not set, then
+sbcl sets it from a compile-time default location which is usually
+/usr/local/lib/sbcl/ but may have been changed e.g. by a third-party
+packager.
+
 .SH FILES
 
 .TP
@@ -521,14 +504,17 @@ a loader, used to read sbcl.core
 .TP
 .I sbcl.core
 dumped memory image containing most of SBCL, to be loaded by
-the 'sbcl' executable
+the 'sbcl' executable.  Looked for in $SBCL_HOME, 
+unless overridden by the --core option.
 .TP
 .I sbclrc
-optional system-wide startup script (in an etc-ish system
-configuration file directory)
+optional system-wide startup script, looked for in $SBCL_HOME/sbclrc
+then /etc/sbclrc, unless overridden by the --sysinit command line
+option.
 .TP
 .I .sbclrc
-optional per-user customizable startup script (in user's home directory)
+optional per-user customizable startup script (in user's home
+directory, or as specified by  --userinit)
 
 .SH AUTHORS
 
index 50c66b6..0a08541 100644 (file)
@@ -10,6 +10,7 @@ ensure_dirs ()
 }
 
 INSTALL_ROOT=${INSTALL_ROOT-/usr/local}
+MAN_DIR=${MAN_DIR-$INSTALL_ROOT/man}
 SBCL_SOURCE=`pwd`
 if [ -n "$SBCL_HOME" -a "$INSTALL_ROOT/lib/sbcl" != "$SBCL_HOME" ];then
    echo SBCL_HOME environment variable is set, and conflicts with INSTALL_ROOT.
@@ -20,20 +21,22 @@ if [ -n "$SBCL_HOME" -a "$INSTALL_ROOT/lib/sbcl" != "$SBCL_HOME" ];then
 fi
 SBCL_HOME=$INSTALL_ROOT/lib/sbcl
 export SBCL_HOME INSTALL_ROOT
-ensure_dirs $INSTALL_ROOT $INSTALL_ROOT/bin $INSTALL_ROOT/lib \
-    $INSTALL_ROOT/man $INSTALL_ROOT/man/man1 \
-    $SBCL_HOME $SBCL_HOME/systems $SBCL_HOME/site-systems
+ensure_dirs $BUILD_ROOT$INSTALL_ROOT $BUILD_ROOT$INSTALL_ROOT/bin \
+    $BUILD_ROOT$INSTALL_ROOT/lib  \
+    $BUILD_ROOT$INSTALL_ROOT/man $BUILD_ROOT$INSTALL_ROOT/man/man1 \
+    $BUILD_ROOT$SBCL_HOME $BUILD_ROOT$SBCL_HOME/systems \
+    $BUILD_ROOT$SBCL_HOME/site-systems
 
 # move old versions out of the way.  Safer than copying: don't want to
 # break any running instances that have these files mapped
-test -f $INSTALL_ROOT/bin/sbcl && \
-    mv $INSTALL_ROOT/bin/sbcl $INSTALL_ROOT/bin/sbcl.old
-test -f $SBCL_HOME/sbcl.core && \
-    mv $SBCL_HOME/sbcl.core $SBCL_HOME/sbcl.core.old
+test -f $BUILD_ROOT$INSTALL_ROOT/bin/sbcl && \
+    mv $BUILD_ROOT$INSTALL_ROOT/bin/sbcl $BUILD_ROOT$INSTALL_ROOT/bin/sbcl.old
+test -f $BUILD_ROOT$SBCL_HOME/sbcl.core && \
+    mv $BUILD_ROOT$SBCL_HOME/sbcl.core $BUILD_ROOT$SBCL_HOME/sbcl.core.old
 
-cp src/runtime/sbcl $INSTALL_ROOT/bin/
-cp output/sbcl.core $SBCL_HOME/sbcl.core
-cp doc/sbcl.1 $INSTALL_ROOT/man/man1/
+cp src/runtime/sbcl $BUILD_ROOT$INSTALL_ROOT/bin/
+cp output/sbcl.core $BUILD_ROOT$SBCL_HOME/sbcl.core
+cp doc/sbcl.1 $BUILD_ROOT$INSTALL_ROOT/man/man1/
 
 # installing contrib 
 
@@ -48,5 +51,5 @@ for i in contrib/*; do
     test -d $i && test -f $i/test-passed || continue;
     INSTALL_DIR=$SBCL_HOME/`basename $i `
     export INSTALL_DIR
-    ensure_dirs $INSTALL_DIR && $GNUMAKE -C $i install
+    ensure_dirs $BUILD_ROOT$INSTALL_DIR && $GNUMAKE -C $i install
 done
index b3876e8..2b62184 100644 (file)
@@ -726,9 +726,10 @@ reset to ~S."
        ;; regardless of what the debugger does afterwards.)
        (handler-case
           (format *error-output*
-                  "~2&~@<debugger invoked on condition of type ~S: ~
+                  "~2&~@<debugger invoked on condition of type ~S in thread ~A: ~
                     ~2I~_~A~:>~%"
                   (type-of *debug-condition*)
+                  (sb!thread:current-thread-id)
                   *debug-condition*)
         (error (condition)
            (setf *nested-debug-condition* condition)
index 2cc0062..aae8fac 100644 (file)
                          possible-init-file-names)
               (/show0 "leaving PROBE-INIT-FILES"))))
       (let* ((sbcl-home (posix-getenv "SBCL_HOME"))
-            (sysinit-truename (if sbcl-home
-                                  (probe-init-files sysinit
-                                                    (concatenate 'string
-                                                                 sbcl-home
-                                                                 "/sbclrc"))
-                                  (probe-init-files sysinit
-                                                    "/etc/sbclrc"
-                                                    "/usr/local/etc/sbclrc")))
+            (sysinit-truename
+             (probe-init-files sysinit
+                               (concatenate 'string sbcl-home "/sbclrc")
+                               "/etc/sbclrc"))
             (user-home (or (posix-getenv "HOME")
                            (error "The HOME environment variable is unbound, ~
                                    so user init file can't be found.")))
index d7e672c..ec0d5bc 100644 (file)
 #include <string.h>
 #include "interr.h"
 #endif
+
+#ifndef SBCL_HOME
+#define SBCL_HOME "/usr/local/lib/sbcl/"
+#endif
+
 \f
 /* SIGINT handler that invokes the monitor (for when Lisp isn't up to it) */
 static void
@@ -278,46 +283,36 @@ main(int argc, char *argv[], char *envp[])
     /* If no core file was specified, look for one. */
     if (!core) {
        char *sbcl_home = getenv("SBCL_HOME");
-       if (sbcl_home) {
-           char *lookhere;
-           char *stem = "/sbcl.core";
-           lookhere = (char *) calloc(strlen(sbcl_home) +
-                                      strlen(stem) +
-                                      1,
-                                      sizeof(char));
-           sprintf(lookhere, "%s%s", sbcl_home, stem);
-           core = copied_existing_filename_or_null(lookhere);
-           free(lookhere);
-       } else {
-           putenv("SBCL_HOME=/usr/local/lib/sbcl/");
-           core = copied_existing_filename_or_null("/usr/local/lib/sbcl/sbcl.core");
-           if (!core) {
-               putenv("SBCL_HOME=/usr/lib/sbcl/");
-               core =
-                   copied_existing_filename_or_null("/usr/lib/sbcl/sbcl.core");
-           }
-       }
+       char *lookhere;
+       char *stem = "/sbcl.core";
+       if(!sbcl_home) sbcl_home = SBCL_HOME;
+       lookhere = (char *) calloc(strlen(sbcl_home) +
+                                  strlen(stem) +
+                                  1,
+                                  sizeof(char));
+       sprintf(lookhere, "%s%s", sbcl_home, stem);
+       core = copied_existing_filename_or_null(lookhere);
+       free(lookhere);
        if (!core) {
            lose("can't find core file");
        }
-    } else {
-       /* If a core was specified and SBCL_HOME is unset, set it */
-       char *sbcl_home = getenv("SBCL_HOME");
-       if (!sbcl_home) {
-           char *envstring, *copied_core, *dir;
-           char *stem = "SBCL_HOME=";
-           copied_core = copied_string(core);
-           dir = dirname(copied_core);
-           envstring = (char *) calloc(strlen(stem) +
-                                       strlen(dir) + 
-                                       1,
-                                       sizeof(char));
-           sprintf(envstring, "%s%s", stem, dir);
-           putenv(envstring);
-           free(copied_core);
-       }
     }
-
+    /* Make sure that SBCL_HOME is set, no matter where the core was
+     * found */
+    if (!getenv("SBCL_HOME")) {
+       char *envstring, *copied_core, *dir;
+       char *stem = "SBCL_HOME=";
+       copied_core = copied_string(core);
+       dir = dirname(copied_core);
+       envstring = (char *) calloc(strlen(stem) +
+                                   strlen(dir) + 
+                                   1,
+                                   sizeof(char));
+       sprintf(envstring, "%s%s", stem, dir);
+       putenv(envstring);
+       free(copied_core);
+    }
+    
     if (!noinform) {
        print_banner();
        fflush(stdout);
index 8bd4488..206511a 100644 (file)
@@ -139,6 +139,7 @@ pid_t create_thread(lispobj initial_function) {
     th->binding_stack_pointer=th->binding_stack_start;
     th->this=th;
     th->pid=0;
+    th->state=STATE_RUNNING;
 #ifdef LISP_FEATURE_STACK_GROWS_DOWNWARD_NOT_UPWARD
     th->alien_stack_pointer=((void *)th->alien_stack_start
                             + ALIEN_STACK_SIZE-4); /* naked 4.  FIXME */
index e3d38c5..48b5683 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.4.9"
+"0.8.4.10"