<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.lisp.scheme.scheme48">
    <title>gmane.lisp.scheme.scheme48</title>
    <link>http://blog.gmane.org/gmane.lisp.scheme.scheme48</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2165"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2164"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2163"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2162"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2161"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2160"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2159"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2158"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2157"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2156"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2155"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2154"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2153"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2152"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2151"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2150"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2149"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2148"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2147"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2146"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2165">
    <title>no more SIGSEGV when trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2165</link>
    <description>
 IS&gt; The development code that crashed was built the way just like the
 IS&gt; one I've used to build the development code with itself, i. e.:

 MS&gt; I think I somehow got into a mind state where I believed you're
 MS&gt; doing all of this on Windows: sorry about that.  On what platform
 MS&gt; are you doing it?

 IS&gt; I do it on GNU/Linux, as of Debian Etch (amd64 port.)

 MC&gt; Ivan, do you still see this problem with the current development
 MC&gt; sources (5f5e619749e0)?

I've just built initial.images of f6856f11c6f34 with
6ab92621cc7c, and then again, with itself -- it built just fine,
with the images matching bytewise:

$ sha1sum build/initial.image-* 
a27bb81b8ceea2fe999382e8e80d15ae60894e11  build/initial.image-32
a27bb81b8ceea2fe999382e8e80d15ae60894e11  build/initial.image-32.old
658ba49dc83a15fce804c0cab19d623d35dd2eb8  build/initial.image-64
658ba49dc83a15fce804c0cab19d623d35dd2eb8  build/initial.image-64.old
$ 

Thanks!

I still wonder, how difficult would it be to make initial.images
building a part of the (IIUC, non-existing, as of yet) test
suite?

[...]


</description>
    <dc:creator>Ivan Shmakov</dc:creator>
    <dc:date>2008-09-30T17:04:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2164">
    <title>[Scheme Steering Committee announcements] Scheme Language SteeringCommittee election: preliminary announcement</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2164</link>
    <description>_______________________________________________
Scheme-announcements mailing list
Scheme-announcements&lt; at &gt;lists.ccs.neu.edu
https://lists.ccs.neu.edu/bin/listinfo/scheme-announcements
</description>
    <dc:creator>Mitchell Wand</dc:creator>
    <dc:date>2008-09-24T05:16:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2163">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2163</link>
    <description>

IS&gt; I do it on GNU/Linux, as of Debian Etch (amd64 port.)

Ivan, do you still see this problem with the current development sources
(5f5e619749e0)?  I was not able to reproduce the error on either

Linux galibier 2.6.18-92.1.6.el5 #1 SMP Wed Jun 25 12:38:37 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

and

Darwin izoard 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep  3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 i386.

</description>
    <dc:creator>Marcus Crestani</dc:creator>
    <dc:date>2008-09-22T21:39:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2162">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2162</link>
    <description>
 &gt;&gt; Perhaps the runtime and PreScheme compiler are not quite in sync in
 &gt;&gt; the latest hg?  I could be wrong, but it seems like in general one
 &gt;&gt; would build the development system with a stable version of the
 &gt;&gt; compiler (unless one were working on the compiler of said
 &gt;&gt; development system).

 &gt; In principle, it should work, but it's not the usual mode of
 &gt; operation of the developers.  I'll check it out.

Actually, I'd expect that any revision should be able to build
itself in full.  Besides, isn't such a build a good test for the
system?

Therefore, I'd suggest to include (re)building of the essential
parts (such as initial images and the C code) as part of the
Make `test' target.  The resulting files should then match
byte-wise those supplied with the release.

It may make sense to include $ make test as the final step of $
make enough (unless disabled by the user), and to fail on the $
make install stage if such a test wasn't passed (nor disabled by
the user.)


</description>
    <dc:creator>Ivan Shmakov</dc:creator>
    <dc:date>2008-09-14T14:54:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2161">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2161</link>
    <description>
 &gt;&gt;&gt;&gt;&gt; How did you build the running Scheme 48 from the development code
 &gt;&gt;&gt;&gt;&gt; itself?

 &gt;&gt;&gt;&gt; The same way as I've tried to build the development version of
 &gt;&gt;&gt;&gt; Scheme48 with itself later (already posted to this thread), only
 &gt;&gt;&gt;&gt; using Scheme48 1.8 as the basis.

[...]

 &gt;&gt;&gt; So *how* did you build the development version that crashed? :-)

 &gt;&gt; I guess, I'm now the one confused with the question.

 &gt;&gt; The development code that crashed was built the way just like the
 &gt;&gt; one I've used to build the development code with itself, i. e.:

 &gt; I think I somehow got into a mind state where I believed you're doing
 &gt; all of this on Windows: sorry about that.  On what platform are you
 &gt; doing it?

I do it on GNU/Linux, as of Debian Etch (amd64 port.)

As I was suspicious about possible bugs within the new FFI
(well, what's the most likely place for bugs which lead to
segmentation faults, anyway?), I've build Scheme48 as of
6ab92621cc7c [1].  It wasn't a big surprise that /that/ version
did indeed compile itself fine.

So, there're 45 changesets more to check.  It seems that 5 to 6
double-builds will be enough to locate the faulty one.

[1] http://www.deinprogramm.de/cgi-bin/hgs48.cgi/rev/6ab92621cc7c7c22131e4beceb90dba8cc9f47e9


</description>
    <dc:creator>Ivan Shmakov</dc:creator>
    <dc:date>2008-09-13T21:48:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2160">
    <title>Re: a Scheme48 wrapper for Sqlite3</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2160</link>
    <description>
 IS&gt; I've made some changes to the code, but I'm currently too busy to
 IS&gt; finish the work.  I'm therefore posting the code in its current
 IS&gt; state in the hope that it might be useful to someone.

I've reworked the code a bit, and the user-visible changes are
roughly as follows.

    * The code is now rewritten to utilize the new Scheme48 FFI (for
      to-be Scheme 1.9.)

    * The error-signalling variants are now provided for a number of
      functions; these variants are: `sqlite3-open', `sqlite3-close',
      `sqlite3-prepare-2', `sqlite3-prepare',
      `sqlite3-prepared-finalize!', `sqlite3-prepared-reset!',
      `sqlite3-prepared-step!'.

    * The interfaces were extended by `sqlite3-column-name' (with error
      signalling) and `sqlite3-column-name-1' (without), mostly to allow
      for `sqlite3-exec' to be reimplemented.

    * The `sqlite3-exec' is now reimplemented on top of the rest of the
      interface; both `sqlite3-exec-1' and sqlite3_s48_exec () are gone.

    * An example makefile is provided.

I've tested it with Scheme48 (as of [1]), and it appears to
build and work correctly:

cd ~/devel/scheme48-sqlite/
make -k 
cc -g -Wall -I/.../include  -c -o sqlite3-int.o sqlite3-int.c
sqlite3-int.c: In function 'sqlite3_s48_libversion':
sqlite3-int.c:85: warning: passing argument 2 of 's48_enter_byte_string_2' discards qualifiers from pointer target type
sqlite3-int.c: In function 'sqlite3_s48_errmsg':
sqlite3-int.c:167: warning: passing argument 2 of 's48_enter_byte_string_2' discards qualifiers from pointer target type
sqlite3-int.c: In function 'sqlite3_s48_column_name':
sqlite3-int.c:274: warning: passing argument 2 of 's48_enter_byte_string_2' discards qualifiers from pointer target type
sqlite3-int.c: In function 'sqlite3_s48_column_blob':
sqlite3-int.c:288: warning: passing argument 2 of 's48_enter_byte_vector_2' discards qualifiers from pointer target type
cc -g -Wall -o sqlite3-int.so sqlite3-int.o -shared -lsqlite3

Compilation finished at Mon Sep  8 11:41:52

Welcome to Scheme 48 1.9T (made by ivan on Mon Sep  8 11:38:33 NOVST 2008)
Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees.
Please report bugs to scheme-48-bugs&lt; at &gt;s48.org.
Get more information at http://www.s48.org/.
Type ,? (comma question-mark) for help.
264&gt; ,structure foo (export)
foo&gt; ,open sqlite3 

warning: Structure has undefined exports [check-structure]
         #{structure 263 sqlite3-low}
         (sqlite3-exec-1)
foo&gt; (define d (sqlite3-open "/tmp/foo.db"))
; no values returned
foo&gt; (define (show . args)
       (write args)
       (newline))
; no values returned
foo&gt; (sqlite3-exec d "SELECT 'foo' UNION SELECT 'bar'"
   show 'unused)
(unused 1 #(#{byte-vector 98 97 114}) #(#{OS-string ("US-ASCII" "ANSI_X3.4-1968") "'foo'"}))
(unused 1 #(#{byte-vector 102 111 111}) #(#{OS-string ("US-ASCII" "ANSI_X3.4-1968") "'foo'"}))
#{Unspecific}
foo&gt; 

[1] http://www.deinprogramm.de/cgi-bin/hgs48.cgi/rev/808c9731148689766698a36fbe8dc22bdda94f16

 IS&gt; The things to be done are, roughly:

[...]

 IS&gt; * an exception should be raised on receiving ``bad'' result code
 IS&gt; (the functions needing the attention with regard to this issue
 IS&gt; are currently given suffix `-1' in the code);

 IS&gt; * remove sqlite3_s48_exec () and (sqlite3-exec-1 ...); implement
 IS&gt; `sqlite3-exec' on top of `sqlite3-prepare' and
 IS&gt; `sqlite3-prepared-step!'.

I believe that these two are now done.

[...]

;;; "sqlite3.scm" -- Scheme48 wrapper for Sqlite3  -*- Scheme -*-
;; Features: sqlite3

;;; Copyright (C) 2008 Ivan Shmakov

;;; Code:

(import-dynamic-externals "./sqlite3-int")

(import-lambda-definition-2 sqlite3-s48-box ())

(import-lambda-definition-2 sqlite3-s48-libversion ())
(import-lambda-definition-2 sqlite3-s48-libversion-number ())

(import-lambda-definition-2 sqlite3-s48-free (pointer))

(import-lambda-definition-2 sqlite3-s48-open  (filename sqlite3-ptr))
(import-lambda-definition-2 sqlite3-s48-close (sqlite3-ptr))

(import-lambda-definition-2 sqlite3-s48-errcode (sqlite3-ptr))
(import-lambda-definition-2 sqlite3-s48-errmsg  (sqlite3-ptr))

(import-lambda-definition-2 sqlite3-s48-prepare-1
                            (sqlite3-ptr sql utf-16? prepared-ptr u-pair))
(import-lambda-definition-2 sqlite3-s48-finalize  (sqlite3-prepared-ptr))
(import-lambda-definition-2 sqlite3-s48-reset     (sqlite3-prepared-ptr))
(import-lambda-definition-2 sqlite3-s48-step      (sqlite3-prepared-ptr))

(import-lambda-definition-2 sqlite3-s48-data-count (sqlite3-prepared-ptr))
(import-lambda-definition-2 sqlite3-s48-column-type
                            (sqlite3-prepared-ptr column-index))
(import-lambda-definition-2 sqlite3-s48-column-name
                            (sqlite3-prepared-ptr column-index))
(import-lambda-definition-2 sqlite3-s48-column-blob
                            (sqlite3-prepared-ptr column-index))

;;; Utility

(define (vector-map! vec proc src-1 . srcs)
  (do ((l   (vector-length src-1))
       (i   0 (+ 1 i)))
      ((&gt;=  i l))
    (let ((ref (lambda (vec) (vector-ref vec i))))
      (vector-set! vec i (apply proc (ref src-1)
                                (map  ref srcs))))))

;;; Types

(define-enumerated-type sqlite3-result :sqlite3-result
  sqlite3-result?
  sqlite3-results
  sqlite3-result-name
  sqlite3-result-code
  (ok           ;   0 SQLITE_OK
   error        ;   1 SQLITE_ERROR
   internal     ;   2 SQLITE_INTERNAL
   perm         ;   3 SQLITE_PERM
   abort        ;   4 SQLITE_ABORT
   busy         ;   5 SQLITE_BUSY
   locked       ;   6 SQLITE_LOCKED
   nomem        ;   7 SQLITE_NOMEM
   readonly     ;   8 SQLITE_READONLY
   interrupt    ;   9 SQLITE_INTERRUPT
   ioerr        ;  10 SQLITE_IOERR
   corrupt      ;  11 SQLITE_CORRUPT
   notfound     ;  12 SQLITE_NOTFOUND   (Internal Only)
   full         ;  13 SQLITE_FULL
   cantopen     ;  14 SQLITE_CANTOPEN
   protocol     ;  15 SQLITE_PROTOCOL
   empty        ;  16 SQLITE_EMPTY      (Internal Only)
   schema       ;  17 SQLITE_SCHEMA
   toobig       ;  18 SQLITE_TOOBIG
   constraint   ;  19 SQLITE_CONSTRAINT
   mismatch     ;  20 SQLITE_MISMATCH
   misuse       ;  21 SQLITE_MISUSE
   nolfs        ;  22 SQLITE_NOLFS
   auth         ;  23 SQLITE_AUTH
   n/a-24 n/a-25 n/a-26 n/a-27 n/a-28 n/a-29 n/a-30 n/a-31 n/a-32 n/a-33
   n/a-34 n/a-35 n/a-36 n/a-37 n/a-38 n/a-39 n/a-40 n/a-41 n/a-42 n/a-43
   n/a-44 n/a-45 n/a-46 n/a-47 n/a-48 n/a-49 n/a-50 n/a-51 n/a-52 n/a-53
   n/a-54 n/a-55 n/a-56 n/a-57 n/a-58 n/a-59 n/a-60 n/a-61 n/a-62 n/a-63
   n/a-64 n/a-65 n/a-66 n/a-67 n/a-68 n/a-69 n/a-70 n/a-71 n/a-72 n/a-73
   n/a-74 n/a-75 n/a-76 n/a-77 n/a-78 n/a-79 n/a-80 n/a-81 n/a-82 n/a-83
   n/a-84 n/a-85 n/a-86 n/a-87 n/a-88 n/a-89 n/a-90 n/a-91 n/a-92 n/a-93
   n/a-94 n/a-95 n/a-96 n/a-97 n/a-98 n/a-99
   row          ; 100 SQLITE_ROW
   done))       ; 101 SQLITE_DONE

; (define (sqlite3-result? object)
;   ;; .
;   (and (sqlite3-result-1? object)
;        (let ((i (sqlite3-result-index-1 object)))
;          ;; ignore all the non-assigned result codes
;          (or (&lt;= i 23) (&gt;= i 100)))))

(define (sqlite3-result&lt;-integer code)
  ;; .
  (vector-ref sqlite3-results code))

(define-enumerated-type sqlite3-type :sqlite3-type
  sqlite3-type?
  sqlite3-types
  sqlite3-type-name
  sqlite3-type-code
  (integer      ; 1 SQLITE_INTEGER
   float        ; 2 SQLITE_FLOAT
   text         ; 3 SQLITE_TEXT
   blob         ; 4 SQLITE_BLOB
   null))       ; 5 SQLITE_NULL

(define (sqlite3-type&lt;-integer code)
  ;; .
  (vector-ref sqlite3-types code))

(define-record-type sqlite3 :sqlite3
  (make-sqlite3 box)
  sqlite3?
  (box sqlite3-box set-sqlite3-box!))

(define-record-discloser :sqlite3
  (lambda (sqlite3)
    (list 'sqlite3)))

(define-record-type sqlite3-prepared :sqlite3-prepared
  (make-sqlite3-prepared box finished?)
  sqlite3-prepared?
  (box          sqlite3-prepared-box    set-sqlite3-prepared-box!)
  (finished?    sqlite3-prepared-finished?
                set-sqlite3-prepared-finished?!))

(define-record-discloser :sqlite3-prepared
  (lambda (sqlite3-prepared)
    (list 'sqlite3-prepared
          `(finished? ,(sqlite3-prepared-finished? sqlite3-prepared)))))

;; NB: meaningless
(define-record-resumer :sqlite3 #f)
(define-record-resumer :sqlite3-prepared #f)

;;; Simple wrappers

(define (make-call-wrapper proc callback name)
  (lambda args
    (call-with-values (lambda () (apply proc args))
      (lambda (r . rest)
        (apply callback
               (lambda (error-message)
                 (assertion-violation name
                                      error-message
                                      ;; FIXME: order of arguments here?
                                      (cons r rest)
                                      (sqlite3-result&lt;-integer r) r))
               r rest)))))

(define make-call-ok-wrapper
  (let ((ok-code (sqlite3-result-code (sqlite3-result ok))))
    (lambda (proc callback name error-message)
      (define (check-and-call signal r . rest)
        (if (= r ok-code)
            (apply callback r rest)
            (signal error-message)))
      (make-call-wrapper proc check-and-call name))))

;;; Obtaining static information

(define (sqlite3-libversion)
  (x-&gt;os-string (sqlite3-s48-libversion)))

(define sqlite3-libversion-number sqlite3-s48-libversion-number)

(define (sqlite3-libversion-list)
  (let* ((n   (sqlite3-libversion-number))
         (z   (remainder    n          1000))
         (ye3 (remainder (- n    z) 1000000))
         (xe6            (- n (+ z ye3)))
         (y   (/ ye3 1000))
         (x   (/ xe6 1000000)))
    (list x y z)))

;;; Opening and closing database

(define (sqlite3-open-1 filename)
  (let* ((box (sqlite3-s48-box))
         (r   (sqlite3-s48-open (os-string-&gt;byte-vector
                                 (x-&gt;os-string filename))
                                box))
         (o   (make-sqlite3 box)))
    (add-finalizer! o sqlite3-close-1)
    ;; .
    (values r o)))

(define (sqlite3-close-1 sqlite3)
  ;; .
  (cond ((sqlite3-box sqlite3)
         =&gt; (lambda (box)
              (let ((r (sqlite3-s48-close box)))
                ;; FIXME: SQLITE_BUSY code is silently ignored
                (if (not (= r (sqlite3-result-code
                               (sqlite3-result busy))))
                    (set-sqlite3-box! sqlite3 #f))
                r)))))

(define sqlite3-open
  (make-call-ok-wrapper sqlite3-open-1
                        (lambda (r o) o)
                        'sqlite3-open
                        "sqlite3-s48-open failed"))

(define sqlite3-close
  (make-call-ok-wrapper sqlite3-close-1
                        (lambda (r) (unspecific))
                        'sqlite3-close
                        "sqlite3-s48-close failed"))

;;; Database status

(define (sqlite3-last-result sqlite3)
  (let ((r (sqlite3-s48-errcode (sqlite3-box sqlite3))))
    ;; .
    (sqlite3-result&lt;-integer r)))

(define (sqlite3-last-error-message sqlite3)
  (let ((b (sqlite3-s48-errmsg  (sqlite3-box sqlite3))))
    ;; .
    (byte-vector-&gt;os-string b)))

;;; Preparing statements

(define (sqlite3-prepare-1 sqlite3 sql)
  (let* ((box (sqlite3-s48-box))
         (u-x (cons #f #f))
         (r   (sqlite3-s48-prepare-1 (sqlite3-box sqlite3)
                                     (os-string-&gt;byte-vector
                                      (x-&gt;os-string sql))
                                     #f ; utf-16?
                                     box u-x))
         (o   (make-sqlite3-prepared box #f)))
    (add-finalizer! o sqlite3-prepared-finalize-1!)
    ;; .
    (values r o (car u-x))))

(define (sqlite3-prepared-finalize-1! prepared)
  ;; .
  (cond ((sqlite3-prepared-box prepared)
         =&gt; (lambda (box)
              (let ((r (sqlite3-s48-finalize box)))
                ;; NB: statement is finalized irrespective of `r'
                (set-sqlite3-prepared-box! prepared #f)
                r)))))

(define (sqlite3-prepared-reset-1! prepared)
  (let ((r (sqlite3-s48-reset (sqlite3-prepared-box prepared))))
    ;; FIXME: should check `r' here?
    (set-sqlite3-prepared-finished?! prepared #f)
    ;; .
    r))

(define (sqlite3-prepared-step-1! prepared)
  (if (sqlite3-prepared-finished? prepared)
      (assertion-violation 'sqlite3-prepared-step-1!
                           "prepared statement already done"
                           prepared))
  (let ((r (sqlite3-s48-step  (sqlite3-prepared-box prepared))))
    (if (= r (sqlite3-result-code (sqlite3-result done)))
        (set-sqlite3-prepared-finished?! prepared #t))
    ;; .
    r))

(define sqlite3-prepare-2
  (make-call-ok-wrapper sqlite3-prepare-1
                        (lambda (r o index)
                          (values o index))
                        'sqlite3-prepare-2
                        "sqlite3-s48-prepare-1 failed"))

(define (sqlite3-prepare sqlite3 sql)
  (call-with-values (lambda () (sqlite3-prepare-2 sqlite3 sql))
    (lambda (prepared index)
      prepared)))

(define sqlite3-prepared-finalize!
  (make-call-ok-wrapper sqlite3-prepared-finalize-1!
                        (lambda (r) (unspecific))
                        'sqlite3-prepared-finalize!
                        "sqlite3-s48-finalize failed"))

(define sqlite3-prepared-reset!
  (make-call-ok-wrapper sqlite3-prepared-reset-1!
                        (lambda (r) (unspecific))
                        'sqlite3-prepared-reset!
                        "sqlite3-s48-reset failed"))

(define sqlite3-prepared-step!
  (let ((row-code  (sqlite3-result-code (sqlite3-result row)))
        (done-code (sqlite3-result-code (sqlite3-result done))))
    (make-call-wrapper sqlite3-prepared-step-1!
                       (lambda (signal r)
                         (cond ((= r row-code)  #t)
                               ((= r done-code) #f)
                               (else
                                (signal "sqlite3-s48-reset failed"))))
                       'sqlite3-prepared-step!)))

;;; Fetching values

(define (sqlite3-columns prepared)
  ;; .
  (sqlite3-s48-data-count (sqlite3-prepared-box prepared)))

(define (check-index prepared index)
  (if (or (negative? index)
          (&gt;= index (sqlite3-columns prepared)))
      (assertion-violation 'sqlite3-column-type
                           "column index out of range"
                           index)))

(define (sqlite3-column-type-1 prepared index)
  (check-index prepared index)
  ;; .
  (sqlite3-s48-column-type  (sqlite3-prepared-box prepared)
                            index))

(define (sqlite3-column-type prepared index)
  ;; .
  (sqlite3-type&lt;-integer (sqlite3-column-type-1 prepared index)))

(define (sqlite3-column-name-1 prepared index)
  (check-index prepared index)
  ;; .
  (sqlite3-s48-column-name  (sqlite3-prepared-box prepared)
                            index))

(define (sqlite3-column-name prepared index)
  ;; .
  (x-&gt;os-string (sqlite3-column-name-1 prepared index)))

(define (sqlite3-column-blob prepared index)
  (check-index prepared index)
  ;; .
  (sqlite3-s48-column-blob  (sqlite3-prepared-box prepared)
                            index))

;;; Executing queries

(define (sqlite3-exec sqlite3 sql callback cb-data)
  (let ((prepared (sqlite3-prepare sqlite3 sql)))
    (let loop ()
      (if (sqlite3-prepared-step! prepared)
          (let ((columns (sqlite3-columns prepared)))
            (do ((i     (+ -1 columns) (+ -1 i))
                 (vals  (make-vector columns))
                 (names (make-vector columns)))
                ((negative? i)
                 (callback cb-data columns vals names))
              ;; FIXME: should x-&gt;os-string be applied here?
              (vector-set! vals  i (sqlite3-column-blob prepared i))
              (vector-set! names i (sqlite3-column-name prepared i)))
            (loop))))))

;;; sqlite3.scm ends here

;;; "sqlite3-packages.scm" -- ???  -*- Scheme -*-

;;; Copyright (C) 2008 Ivan Shmakov

;;; Code:

(define-interface sqlite3-interface
  (export sqlite3?
          sqlite3-prepared?
          sqlite3-libversion
          sqlite3-libversion-list
          sqlite3-open
          sqlite3-close
          sqlite3-last-result
          sqlite3-last-error-message
          sqlite3-prepare
          sqlite3-prepare-2
          sqlite3-prepared-finalize!
          sqlite3-prepared-reset!
          sqlite3-prepared-step!
          sqlite3-prepared-finished?
          sqlite3-columns
          sqlite3-column-type
          sqlite3-column-name
          sqlite3-column-blob
          sqlite3-exec))

(define-interface sqlite3-low-interface
  (export (sqlite3-result :syntax)
          sqlite3-result-code
          sqlite3-result-name
          sqlite3-libversion-number
          sqlite3-open-1
          sqlite3-close-1
          sqlite3-prepare-1
          sqlite3-prepared-finalize-1!
          sqlite3-prepared-reset-1!
          sqlite3-prepared-step-1!
          sqlite3-column-type-1
          sqlite3-column-name-1
          sqlite3-exec-1))

(define-interface chicken-sqlite3-interface
  (export sqlite3:open
          sqlite3:close
          sqlite3:exec
          sqlite3:first-result
          sqlite3:first-row
          sqlite3:for-each-row
          sqlite3:map-row))

(define-structures ((sqlite3            sqlite3-interface)
                    (sqlite3-low        sqlite3-low-interface))
  (open scheme
        ;; exceptions
        (subset exceptions
                (assertion-violation))
        ;; externals
        external-calls
        load-dynamic-externals
        ;; data structures
        (subset util (unspecific))
        byte-vectors
        define-record-types
        finite-types
        os-strings)
  (files sqlite3))

;;; sqlite3-packages.scm ends here

/*** sqlite3-int.c --- ?  -*- C -*- */

/*** Copyright (C) 2008 Ivan Shmakov */

/*** Code: */

#include &lt;stddef.h&gt;             /* for size_t */

#include &lt;scheme48.h&gt;

#include &lt;sqlite3.h&gt;

typedef s48_call_t  x48_call;
typedef s48_ref_t   x48_ref;

static x48_ref   sqlite3_s48_box (x48_call);

static x48_ref   sqlite3_s48_libversion (x48_call);
static x48_ref   sqlite3_s48_libversion_number (x48_call);

static x48_ref   sqlite3_s48_free (x48_call, x48_ref);

static x48_ref   sqlite3_s48_open   (x48_call, x48_ref, x48_ref);
static x48_ref   sqlite3_s48_open16 (x48_call, x48_ref, x48_ref);
static x48_ref   sqlite3_s48_close (x48_call, x48_ref);

static x48_ref   sqlite3_s48_errcode (x48_call, x48_ref sqlite3_ptr);
static x48_ref   sqlite3_s48_errmsg  (x48_call, x48_ref sqlite3_ptr);

static x48_ref   sqlite3_s48_prepare_1 (x48_call,
                                        x48_ref, x48_ref, x48_ref,
                                        x48_ref, x48_ref);
static x48_ref   sqlite3_s48_finalize (x48_call, x48_ref);
static x48_ref   sqlite3_s48_reset (x48_call, x48_ref);
static x48_ref   sqlite3_s48_step (x48_call, x48_ref);

static x48_ref   sqlite3_s48_data_count (x48_call, x48_ref);
static x48_ref   sqlite3_s48_column_type (x48_call, x48_ref, x48_ref);
static x48_ref   sqlite3_s48_column_name (x48_call, x48_ref, x48_ref);
static x48_ref   sqlite3_s48_column_blob (x48_call, x48_ref, x48_ref);

void
s48_on_load (void)
{
  S48_EXPORT_FUNCTION (sqlite3_s48_box);

  S48_EXPORT_FUNCTION (sqlite3_s48_libversion);
  S48_EXPORT_FUNCTION (sqlite3_s48_libversion_number);

  S48_EXPORT_FUNCTION (sqlite3_s48_free);

  S48_EXPORT_FUNCTION (sqlite3_s48_open);
  S48_EXPORT_FUNCTION (sqlite3_s48_open16);
  S48_EXPORT_FUNCTION (sqlite3_s48_close);

  S48_EXPORT_FUNCTION (sqlite3_s48_errcode);
  S48_EXPORT_FUNCTION (sqlite3_s48_errmsg);

  S48_EXPORT_FUNCTION (sqlite3_s48_prepare_1);
  S48_EXPORT_FUNCTION (sqlite3_s48_finalize);
  S48_EXPORT_FUNCTION (sqlite3_s48_reset);
  S48_EXPORT_FUNCTION (sqlite3_s48_step);

  S48_EXPORT_FUNCTION (sqlite3_s48_data_count);
  S48_EXPORT_FUNCTION (sqlite3_s48_column_type);
  S48_EXPORT_FUNCTION (sqlite3_s48_column_name);
  S48_EXPORT_FUNCTION (sqlite3_s48_column_blob);

  /* . */
}

static x48_ref
sqlite3_s48_box (x48_call c)
{
  /* NB: it's assumed that sizeof (ANY_TYPE *) is the same */
  /* . */
  return s48_enter_pointer_2 (c, (void *)0);
}

static x48_ref
sqlite3_s48_libversion (x48_call c)
{
  /* . */
  return
    s48_enter_byte_string_2 (c, sqlite3_libversion ());
}

static x48_ref
sqlite3_s48_libversion_number (x48_call c)
{
  /* . */
  return
    s48_enter_long_2 (c, sqlite3_libversion_number ());
}

static x48_ref
sqlite3_s48_free (x48_call c, x48_ref ptr)
{
  sqlite3_free (s48_extract_value_2 (c, ptr, void *));
  /* . */
  return s48_unspecific_2 (c);
}

/*** Opening and closing database */

static x48_ref
sqlite3_s48_open (x48_call c, x48_ref filename, x48_ref sqlite3_ptr)
{
  /* NB: is filename expected to be in UTF-8? */
  const void *c_filename = s48_extract_byte_vector_2 (c, filename);
  sqlite3 *o;
  int r;

  r = sqlite3_open (c_filename, &amp;o);
  s48_unsafe_set_value_2 (c, sqlite3_ptr, sqlite3 *, o);

  /* . */
  return
    s48_enter_long_2 (c, r);
}

static x48_ref
sqlite3_s48_open16 (x48_call c, x48_ref filename, x48_ref sqlite3_ptr)
{
  /* NB: filename is expected to be in UTF-16 */
  const void *c_filename = s48_extract_byte_vector_2 (c, filename);
  sqlite3 *o;
  int r;

  r = sqlite3_open16 (c_filename, &amp;o);
  s48_unsafe_set_value_2 (c, sqlite3_ptr, sqlite3 *, o);

  /* . */
  return
    s48_enter_long_2 (c, r);
}

static x48_ref
sqlite3_s48_close (x48_call c, x48_ref sqlite3_ptr)
{
  sqlite3 *o = s48_unsafe_extract_value_2 (c, sqlite3_ptr, sqlite3 *);

  /* . */
  return
    s48_enter_long_2 (c, sqlite3_close (o));
}

/*** Database status */

static x48_ref
sqlite3_s48_errcode (x48_call c, x48_ref sqlite3_ptr)
{
  sqlite3 *o = s48_unsafe_extract_value_2 (c, sqlite3_ptr, sqlite3 *);

  /* . */
  return
    s48_enter_long_2 (c, sqlite3_errcode (o));
}

static x48_ref
sqlite3_s48_errmsg (x48_call c, x48_ref sqlite3_ptr)
{
  sqlite3 *o = s48_unsafe_extract_value_2 (c, sqlite3_ptr, sqlite3 *);

  /* . */
  return
    s48_enter_byte_string_2 (c, sqlite3_errmsg (o));
}

/*** Preparing statements */

static x48_ref
sqlite3_s48_prepare_1 (x48_call c,
                       x48_ref  sqlite3_ptr,
                       x48_ref  sql,
                       x48_ref  utf_16_p,
                       x48_ref  prepared_ptr,
                       x48_ref  used_pair)
{
  sqlite3 *o = s48_unsafe_extract_value_2 (c, sqlite3_ptr, sqlite3 *);
  const char *c_sql = s48_extract_byte_vector_2 (c, sql);
  const char *c_sql_tail;
  const size_t c_sql_size = s48_byte_vector_length_2 (c, sql);
  sqlite3_stmt *prepared;
  int r;

  s48_check_pair_2 (c, used_pair);

  r = (s48_extract_boolean_2 (c, utf_16_p)
       ? sqlite3_prepare16 (o, c_sql, c_sql_size,
                            &amp;prepared, (const void **)&amp;c_sql_tail)
       : sqlite3_prepare   (o, c_sql, c_sql_size,
                            &amp;prepared, (const char **)&amp;c_sql_tail));
  s48_unsafe_set_value_2 (c, prepared_ptr, sqlite3_stmt *, prepared);
  if (s48_pair_p_2 (c, used_pair)) {
    s48_unsafe_set_car_2 (c, used_pair,
                          s48_enter_long_2 (c, c_sql_tail - c_sql));
  }

  /* . */
  return
    s48_enter_long_2 (c, r);
}

static x48_ref
sqlite3_s48_finalize (x48_call c, x48_ref prepared_ptr)
{
  sqlite3_stmt *p
    = s48_unsafe_extract_value_2 (c, prepared_ptr, sqlite3_stmt *);

  /* . */
  return
    s48_enter_long_2 (c, sqlite3_finalize (p));
}

static x48_ref
sqlite3_s48_reset (x48_call c, x48_ref prepared_ptr)
{
  sqlite3_stmt *p
    = s48_unsafe_extract_value_2 (c, prepared_ptr, sqlite3_stmt *);

  /* . */
  return
    s48_enter_long_2 (c, sqlite3_reset (p));
}

static x48_ref
sqlite3_s48_step (x48_call c, x48_ref prepared_ptr)
{
  sqlite3_stmt *p
    = s48_unsafe_extract_value_2 (c, prepared_ptr, sqlite3_stmt *);

  /* . */
  return
    s48_enter_long_2 (c, sqlite3_step (p));
}

/*** Fetching values */

static x48_ref
sqlite3_s48_data_count (x48_call c, x48_ref prepared_ptr)
{
  sqlite3_stmt *p
    = s48_unsafe_extract_value_2 (c, prepared_ptr, sqlite3_stmt *);

  /* . */
  return
    s48_enter_long_2 (c, sqlite3_data_count (p));
}

static x48_ref
sqlite3_s48_column_type (x48_call c,
                         x48_ref prepared_ptr, x48_ref column)
{
  sqlite3_stmt *p
    = s48_unsafe_extract_value_2 (c, prepared_ptr, sqlite3_stmt *);
  int i = s48_extract_long_2 (c, column);

  /* . */
  return
    s48_enter_long_2 (c, sqlite3_column_type (p, i));
}

static x48_ref
sqlite3_s48_column_name (x48_call c,
                         x48_ref prepared_ptr, x48_ref column)
{
  sqlite3_stmt *p
    = s48_unsafe_extract_value_2 (c, prepared_ptr, sqlite3_stmt *);
  int i = s48_extract_long_2 (c, column);

  /* . */
  return
    s48_enter_byte_string_2 (c, sqlite3_column_name (p, i));
}

static x48_ref
sqlite3_s48_column_blob (x48_call c,
                         x48_ref prepared_ptr, x48_ref column)
{
  sqlite3_stmt *p
    = s48_unsafe_extract_value_2 (c, prepared_ptr, sqlite3_stmt *);
  int i = s48_extract_long_2 (c, column);
  int         l = sqlite3_column_bytes (p, i);
  const void *b = sqlite3_column_blob  (p, i);
  x48_ref v;

  v = s48_enter_byte_vector_2 (c, b, l);

  /* . */
  return v;
}

/*** sqlite3-int.c ends here */

### Makefile  -*- Makefile -*-
CFLAGS    = -g -Wall
CPPFLAGS  = -I$(HOME)/include
LDFLAGS   = -lsqlite3
SHARED_LDFLAGS = -shared $(LDFLAGS)

default: sqlite3-int.so

sqlite3-int.so: sqlite3-int.o
        $(CC) $(CFLAGS) -o $&lt; at &gt; $^ $(SHARED_LDFLAGS)
### Makefile ends here


</description>
    <dc:creator>Ivan Shmakov</dc:creator>
    <dc:date>2008-09-08T09:45:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2159">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2159</link>
    <description>
Ivan Shmakov &lt;ivan&lt; at &gt;theory.asu.ru&gt; writes:


I think I somehow got into a mind state where I believed you're doing
all of this on Windows: sorry about that.  On what platform are you
doing it?

</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2008-08-26T05:38:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2158">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2158</link>
    <description>
 &gt;&gt;&gt; How did you build the running Scheme 48 from the development code
 &gt;&gt;&gt; itself?

 &gt;&gt; The same way as I've tried to build the development version of
 &gt;&gt; Scheme48 with itself later (already posted to this thread), only
 &gt;&gt; using Scheme48 1.8 as the basis.

[...]

 &gt;&gt; (Surely not to mean anything related to either Visual C, or Volkov
 &gt;&gt; Commander.)

 &gt; So *how* did you build the development version that crashed? :-)

I guess, I'm now the one confused with the question.

The development code that crashed was built the way just like
the one I've used to build the development code with itself,
i. e.:

--cut: http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2147 --
$ mkdir +build-1 
$ cd +build-1 
$ ../configure --prefix="$HOME" 
...
$ make \
      ../build/filenames.make \
      i-know-what-i-am-doing \
      c/scheme48.h \
      ../build/initial.image-{32,64}
...
--cut: http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2147 --

(And to be sure, I've just used the commands above to bootstrap
the development Scheme48 using Scheme48 1.8 once again.)

The only differences were the use of Scheme48 to perform the
build, and the final outcome.  Consider the build logs:

--cut: http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2154 --
scheme48-4f2030ac3336 $ LC_ALL=C nohup time bash autogen.sh 
nohup: appending output to `nohup.out'
scheme48-4f2030ac3336 $ tail -n 32 nohup.out 
 s48_external_event_uid
 s48_permanent_external_event_uid
#{Unspecific}
cd ./ps-compiler &amp;&amp;     \
(echo ',batch';     \
echo ',config ,load ../scheme/platform-interfaces.scm';     \
echo ',config ,load ../scheme/rts-packages-64.scm';          \
echo ',config ,load ../scheme/prescheme/interface.scm';     \
echo ',config ,load ../scheme/prescheme/package-defs.scm';   \
echo ',exec ,load load-ps-compiler.scm';     \
echo ',exec ,load compile-twospace-gc-64.scm';     \
echo ',exit'     \
) | scheme48 -h 8000000 &amp;&amp;     \
mv ../scheme/vm/scheme48-twospace-heap-64.c ../c
Welcome to Scheme 48 1.9T (made by ivan on Thu Aug 21 01:34:41 NOVST 2008)
Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees.
Please report bugs to scheme-48-bugs&lt; at &gt;s48.org.
Get more information at http://www.s48.org/.
Type ,? (comma question-mark) for help.


Pre-Scheme compiler version 1.9T
Copyright (c) 1993-2008 by Richard Kelsey.
Please report bugs to pre-scheme&lt; at &gt;s48.org.

/bin/sh: line 10: 15147 Done                    ( echo ',batch'; echo ',config ,load ../scheme/platform-interfaces.scm'; echo ',config ,load ../scheme/rts-packages-64.scm'; echo ',config ,load ../scheme/prescheme/interface.scm'; echo ',config ,load ../scheme/prescheme/package-defs.scm'; echo ',exec ,load load-ps-compiler.scm'; echo ',exec ,load compile-twospace-gc-64.scm'; echo ',exit' )
     15148 Segmentation fault      | scheme48 -h 8000000
make: *** [compile-twospace-gc-64] Error 139
Command exited with non-zero status 2
96.27user 3.38system 1:46.72elapsed 93%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (98major+894375minor)pagefaults 0swaps
--cut: http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2154 --

scheme48-4f2030ac3336-with-1.8/+build-1 $ LC_ALL=C nohup time make \
      ../build/filenames.make \
      i-know-what-i-am-doing \
      c/scheme48.h \
      ../build/initial.image-{32,64} 
...
scheme48-4f2030ac3336-with-1.8/+build-1 $ cat nohup.out
 s48_external_event_uid
 s48_permanent_external_event_uid
#{Unspecific}
cd ../ps-compiler &amp;&amp;     \
(echo ',batch';     \
echo ',config ,load ../scheme/platform-interfaces.scm';     \
echo ',config ,load ../scheme/rts-packages-64.scm';          \
echo ',config ,load ../scheme/prescheme/interface.scm';     \
echo ',config ,load ../scheme/prescheme/package-defs.scm';   \
echo ',exec ,load load-ps-compiler.scm';     \
echo ',exec ,load compile-twospace-gc-64.scm';     \
echo ',exit'     \
) | scheme48 -h 8000000 &amp;&amp;     \
mv ../scheme/vm/scheme48-twospace-heap-64.c ../c
Welcome to Scheme 48 1.8 (made by ivan on Wed Apr 16 18:18:15 NOVST 2008)
Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees.
Please report bugs to scheme-48-bugs&lt; at &gt;s48.org.
Get more information at http://www.s48.org/.
Type ,? (comma question-mark) for help.


Pre-Scheme compiler version 1.9T
Copyright (c) 1993-2008 by Richard Kelsey.
Please report bugs to pre-scheme&lt; at &gt;s48.org.

#{Unspecific}

Changing default package for file ../scheme/vm/data/platform-64.scm from
#{Package 252 platform} to #{Package 313 ps-platform}

Changing default package for file ../scheme/vm/interp/arch.scm from
#{Package 311 vm-architecture} to #{Package 318 vm-architecture}
[... This particular step completes fine...]
  relocate_binding_table_two_spaceB
  reverse_byte_orderB
  really_read_image_area
#{Unspecific}
cd ../ps-compiler &amp;&amp;     \
(echo ',batch';     \
echo ',config ,load ../scheme/platform-interfaces.scm';     \
echo ',config ,load ../scheme/rts-packages-64.scm';          \
echo ',config ,load ../scheme/prescheme/interface.scm';     \
echo ',config ,load ../scheme/prescheme/package-defs.scm';   \
echo ',exec ,load load-ps-compiler.scm';     \
echo ',exec ,load compile-bibop-gc-64.scm';     \
echo ',exit'     \
) | scheme48 -h 8000000 &amp;&amp;     \
mv ../scheme/vm/scheme48-bibop-heap-64.c ../c
Welcome to Scheme 48 1.8 (made by ivan on Wed Apr 16 18:18:15 NOVST 2008)
Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees.
Please report bugs to scheme-48-bugs&lt; at &gt;s48.org.
[... So the whole build...]
scheme48-4f2030ac3336-with-1.8/+build-1 $ 


</description>
    <dc:creator>Ivan Shmakov</dc:creator>
    <dc:date>2008-08-25T16:13:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2157">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2157</link>
    <description>
Ivan Shmakov &lt;ivan&lt; at &gt;theory.asu.ru&gt; writes:


So *how* did you build the development version that crashed? :-)

</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2008-08-25T06:13:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2156">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2156</link>
    <description>
 &gt;&gt;&gt; Could you elaborate on your build setup?  Specifically, how do
 &gt;&gt;&gt; configure/make fit in the setup?  (I use the batch files in the
 &gt;&gt;&gt; build/ directory, described in WINDOWS.txt to bootstrap.)

 &gt;&gt; The configure &amp; make steps are similar to those in autogen.sh:

 &gt; How did you build the running Scheme 48 from the development code
 &gt; itself?

The same way as I've tried to build the development version of
Scheme48 with itself later (already posted to this thread), only
using Scheme48 1.8 as the basis.

 &gt; (I was probably a bit quick to assume that I knew what "VCS" means.
 &gt; What does it mean?)

It stands for Version Control System; i. e., Mercurial, when it
comes to Scheme48.  Alternatively, I could've been speaking
about ``the source from the (VCS) repository''.

(Surely not to mean anything related to either Visual C, or
Volkov Commander.)


</description>
    <dc:creator>Ivan Shmakov</dc:creator>
    <dc:date>2008-08-24T16:31:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2155">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2155</link>
    <description>
Ivan Shmakov &lt;ivan&lt; at &gt;theory.asu.ru&gt; writes:


How did you build the running Scheme 48 from the development code
itself?  (I was probably a bit quick to assume that I knew what "VCS"
means.  What does it mean?)

</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2008-08-21T17:20:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2154">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2154</link>
    <description>
 &gt;&gt; BTW, I'm getting segmentation faults while trying to bootstrap
 &gt;&gt; recent Scheme48 revisions from the Mercurial repository using some
 &gt;&gt; likewise recent Scheme48 versions.

 &gt;&gt; E. g., when trying to bootstrap Scheme48 rev. dc9216ef6864 using
 &gt;&gt; Scheme48 rev. dc9216ef6864, which was in turn built with Scheme48
 &gt;&gt; 1.8:

 &gt;&gt; $ mkdir +build-1 
 &gt;&gt; $ cd +build-1 
 &gt;&gt; $ ../configure --prefix="$HOME" 
 &gt;&gt; ...
 &gt;&gt; $ make \
 &gt;&gt;       ../build/filenames.make \
 &gt;&gt;       i-know-what-i-am-doing \
 &gt;&gt;       c/scheme48.h \
 &gt;&gt;       ../build/initial.image-{32,64}

[...]

 &gt; Could you elaborate on your build setup?  Specifically, how do
 &gt; configure/make fit in the setup?  (I use the batch files in the
 &gt; build/ directory, described in WINDOWS.txt to bootstrap.)

The configure &amp; make steps are similar to those in autogen.sh:

$ nl -ba autogen.sh 
...
     7./configure &amp;&amp;
     8rm -rf autom4te.cache &amp;&amp;
     9rm -f scheme48.image build/initial.image-32 build/initial.image-64 c/scheme48.h &amp;&amp;
    10make build/filenames.make &amp;&amp;
    11make i-know-what-i-am-doing &amp;&amp;
    12make c/scheme48.h &amp;&amp;
    13make build/initial.image-32 build/initial.image-64 &amp;&amp;
    14make distclean
$ 

The only notable difference is the use of the separate build
directory (+build-1), and it's what I'm accustomed to do
whenever possible.

The use of autogen.sh leads to the same result:

scheme48-4f2030ac3336 $ LC_ALL=C nohup time bash autogen.sh 
nohup: appending output to `nohup.out'
scheme48-4f2030ac3336 $ tail -n 32 nohup.out 
 s48_external_event_uid
 s48_permanent_external_event_uid
#{Unspecific}
cd ./ps-compiler &amp;&amp;     \
(echo ',batch';     \
echo ',config ,load ../scheme/platform-interfaces.scm';     \
echo ',config ,load ../scheme/rts-packages-64.scm';          \
echo ',config ,load ../scheme/prescheme/interface.scm';     \
echo ',config ,load ../scheme/prescheme/package-defs.scm';   \
echo ',exec ,load load-ps-compiler.scm';     \
echo ',exec ,load compile-twospace-gc-64.scm';     \
echo ',exit'     \
) | scheme48 -h 8000000 &amp;&amp;     \
mv ../scheme/vm/scheme48-twospace-heap-64.c ../c
Welcome to Scheme 48 1.9T (made by ivan on Thu Aug 21 01:34:41 NOVST 2008)
Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees.
Please report bugs to scheme-48-bugs&lt; at &gt;s48.org.
Get more information at http://www.s48.org/.
Type ,? (comma question-mark) for help.


Pre-Scheme compiler version 1.9T
Copyright (c) 1993-2008 by Richard Kelsey.
Please report bugs to pre-scheme&lt; at &gt;s48.org.

/bin/sh: line 10: 15147 Done                    ( echo ',batch'; echo ',config ,load ../scheme/platform-interfaces.scm'; echo ',config ,load ../scheme/rts-packages-64.scm'; echo ',config ,load ../scheme/prescheme/interface.scm'; echo ',config ,load ../scheme/prescheme/package-defs.scm'; echo ',exec ,load load-ps-compiler.scm'; echo ',exec ,load compile-twospace-gc-64.scm'; echo ',exit' )
     15148 Segmentation fault      | scheme48 -h 8000000
make: *** [compile-twospace-gc-64] Error 139
Command exited with non-zero status 2
96.27user 3.38system 1:46.72elapsed 93%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (98major+894375minor)pagefaults 0swaps
scheme48-4f2030ac3336 $ 


</description>
    <dc:creator>Ivan Shmakov</dc:creator>
    <dc:date>2008-08-21T17:03:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2153">
    <title>Re: AC_ARG_ENABLE() isn't used quite properly</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2153</link>
    <description>IS&gt; There's a problem with S48_GLIB and some other Autoconf macros
IS&gt; used by Scheme48's configure.in currently.  Consider, e. g.:

I've pushed a fix for `--enable-glib', `--enable-native-code',
`--enable-force-32bit', and `--enable-universal-binary'.

Thanks for pointing this out, Ivan!

</description>
    <dc:creator>Marcus Crestani</dc:creator>
    <dc:date>2008-08-21T07:52:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2152">
    <title>Re: writing negative flonums</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2152</link>
    <description>
Ivan Shmakov &lt;ivan&lt; at &gt;theory.asu.ru&gt; writes:


Fixed.  (The problem was only in the development code, not in the
release.)

Thanks for the report!

</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2008-08-21T08:05:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2151">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2151</link>
    <description>
Ivan Shmakov &lt;ivan&lt; at &gt;theory.asu.ru&gt; writes:


Could you elaborate on your build setup?  Specifically, how do
configure/make fit in the setup?  (I use the batch files in the build/
directory, described in WINDOWS.txt to bootstrap.)

</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2008-08-21T07:00:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2150">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2150</link>
    <description>
"Scott Bell" &lt;sebell&lt; at &gt;gmail.com&gt; writes:


In principle, it should work, but it's not the usual mode of operation
of the developers.  I'll check it out.

</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2008-08-21T06:54:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2149">
    <title>Re: SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2149</link>
    <description>Hi Ivan,

Perhaps the runtime and PreScheme compiler are not quite in sync in
the latest hg?
I could be wrong, but it seems like in general one would build the
development system
with a stable version of the compiler (unless one were working on the
compiler of said
development system).

Regards,

- Scott


On Wednesday, August 20, 2008, at 12:56PM, "Ivan Shmakov"
&lt;ivan&lt; at &gt;theory.asu.ru&gt; wrote:


</description>
    <dc:creator>Scott Bell</dc:creator>
    <dc:date>2008-08-20T19:37:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2148">
    <title>AC_ARG_ENABLE() isn't used quite properly</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2148</link>
    <description>There's a problem with S48_GLIB and some other Autoconf macros
used by Scheme48's configure.in currently.  Consider, e. g.:

$ nl -ba s48_glib.m4 
     1### s48_glib.m4 --- S48_GLIB macro  -*- Autoconf -*-
     2# serial 1
     3dnl
     4dnl
     5dnl
     6AC_DEFUN([S48_GLIB], [dnl
     7AC_ARG_ENABLE([glib],
     8[AC_HELP_STRING([--enable-glib],
     9                [Use the glib event loop])],
    10[dnl Check for glib-2.0
    11   PKG_CHECK_MODULES(GLIB, glib-2.0, AC_DEFINE(HAVE_GLIB), AC_MSG_WARN(glib-2.0 not found))
...

I. e., the PKG_CHECK_MODULES(GLIB, ...) (and the rest) will be
executed whenever --enable-glib or --enable-glib=ARG is given,
no matter what the ARG will be.  In particular, the GLIB checks
will be made whenever --enable-glib=no is given, or the form
treated synonymously to it by Autoconf: --disable-glib.

(That way, I was really quite a GLIB user for some time.)

The proper way to use AC_ARG_ENABLE() would be, e. g.:

AC_DEFUN([S48_GLIB], [dnl
AC_ARG_ENABLE([glib],
[AC_HELP_STRING([--enable-glib],
                [Use the glib event loop])])
    if test "$enable_glib" != no; then
 dnl Check for glib-2.0
   PKG_CHECK_MODULES(GLIB, glib-2.0, AC_DEFINE(HAVE_GLIB), AC_MSG_WARN(glib-2.0 not found))
         ...
    fi
])


</description>
    <dc:creator>Ivan Shmakov</dc:creator>
    <dc:date>2008-08-20T19:06:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2147">
    <title>SIGSEGV trying to bootstrap Scheme48 from VCS</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2147</link>
    <description>BTW, I'm getting segmentation faults while trying to bootstrap
recent Scheme48 revisions from the Mercurial repository using
some likewise recent Scheme48 versions.

E. g., when trying to bootstrap Scheme48 rev. dc9216ef6864 using
Scheme48 rev. dc9216ef6864, which was in turn built with
Scheme48 1.8:

$ mkdir +build-1 
$ cd +build-1 
$ ../configure --prefix="$HOME" 
...
$ make \
      ../build/filenames.make \
      i-know-what-i-am-doing \
      c/scheme48.h \
      ../build/initial.image-{32,64}
...
cd ../ps-compiler &amp;&amp;     \
(echo ',batch';     \
echo ',config ,load ../scheme/platform-interfaces.scm';     \
echo ',config ,load ../scheme/rts-packages-64.scm';          \
echo ',config ,load ../scheme/prescheme/interface.scm';     \
echo ',config ,load ../scheme/prescheme/package-defs.scm';   \
echo ',exec ,load load-ps-compiler.scm';     \
echo ',exec ,load compile-twospace-gc-64.scm';     \
echo ',exit'     \
) | scheme48 -h 8000000 &amp;&amp;     \
mv ../scheme/vm/scheme48-twospace-heap-64.c ../c
Welcome to Scheme 48 1.9T (made by ivan on Thu Aug 21 01:34:41 NOVST 2008)
Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees.
Please report bugs to scheme-48-bugs&lt; at &gt;s48.org.
Get more information at http://www.s48.org/.
Type ,? (comma question-mark) for help.


Pre-Scheme compiler version 1.9T
Copyright (c) 1993-2008 by Richard Kelsey.
Please report bugs to pre-scheme&lt; at &gt;s48.org.

/bin/sh: line 10:  2040 Done                    ( echo ',batch'; echo ',config ,load ../scheme/platform-interfaces.scm'; echo ',config ,load ../scheme/rts-packages-64.scm'; echo ',config ,load ../scheme/prescheme/interface.scm'; echo ',config ,load ../scheme/prescheme/package-defs.scm'; echo ',exec ,load load-ps-compiler.scm'; echo ',exec ,load compile-twospace-gc-64.scm'; echo ',exit' )
      2041 Segmentation fault      | scheme48 -h 8000000
make: *** [compile-twospace-gc-64] Error 139
$ echo $? 
2
$ 

There's no problem with bootstrapping recent Scheme48 source
using Scheme48 1.8.

There may be some problems with my set-up, but I'd be glad if
someone could check it out.


</description>
    <dc:creator>Ivan Shmakov</dc:creator>
    <dc:date>2008-08-20T18:56:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2146">
    <title>writing negative flonums</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2146</link>
    <description>... Doesn't look like anything good at all.

Welcome to Scheme 48 1.9T (made by ivan on Thu Aug 21 01:34:41 NOVST 2008)
Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees.
Please report bugs to scheme-48-bugs&lt; at &gt;s48.org.
Get more information at http://www.s48.org/.
Type ,? (comma question-mark) for help.
0.1
-1
0.1


</description>
    <dc:creator>Ivan Shmakov</dc:creator>
    <dc:date>2008-08-20T18:38:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2145">
    <title>ANN: Call for registration: 2008 Workshop on Scheme and Functional Programming</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.scheme48/2145</link>
    <description>The 2008 Workshop on Scheme and Functional Programming
will be held

    * in Victoria, British Columbia,
    * on Saturday, 20 September, two days before ICFP.

Discounted early registration closes Wednesday, 20 August.

The workshop program is online at
http://www.ccs.neu.edu/home/will/scheme2008/program.html

For more details, see http://www.schemeworkshop.org/2008/

Will Clinger
workshop chair


</description>
    <dc:creator>William D Clinger</dc:creator>
    <dc:date>2008-08-20T02:44:10</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.lisp.scheme.scheme48">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.lisp.scheme.scheme48</link>
  </textinput>
</rdf:RDF>
