Subject: [clisp-list] Problems building wildcard module

From: Dave Pearson <[email-masked]>
Date: Fri, 20 Apr 2001 13:24:44 +0100

I'm attempting to build the latest clisp from CVS and there appears to be a
problem when building the wildcard module.

The build process got as far as building wildcard and then stopped with:

,----
| Compiling file /usr/local/src/clisp/with-gcc-wall/wildcard/wildcard.lisp ...
| *** - There is no package with name "WILDCARD"
`----

at that point lisp.run seemed to hog the processor and nothing more
happened. Hitting Ctrl-C didn't help so I ended up having to kill the
process.

This is on a RedHat 6.2 GNU/Linux box. gcc is:

,----
| davep@hagbard:~$ gcc -v
| Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
| gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
`----

-- 
Dave Pearson:                   |     lbdb.el - LBDB interface.
http://www.davep.org/           |  sawfish.el - Sawfish mode.
Emacs:                          |  uptimes.el - Record emacs uptimes.
http://www.davep.org/emacs/     | quickurl.el - Recall lists of URLs.

---

From: Dave Pearson <[email-masked]>
Date: Fri, 20 Apr 2001 13:43:40 +0100

> happened. Hitting Ctrl-C didn't help so I ended up having to kill the

Having managed to build the latest clisp by removing WILDCARD from the list
of modules I'm now trying to build the latest version of clocc (I'm trying
to get the latest clisp going so I can get the latest clocc going as it
seems the latest clocc needs the latest clisp).

On doing a "make clocc-top" I get the following error:

,----
| ;; Loading file clocc.fas ...
| ;; Loading of file clocc.fas is finished.
| ;; Loading file src/defsystem-3.x/defsystem.fas ...
| *** - FIND-ALL-SYMBOLS: argument #<UNBOUND> should be a string or a symbol
`----

and, at that point, lisp.run seems to be "stuck" and seems to hog the
processor. I've also observed this behaviour when trying to compile a file
of my own.

-- 
Dave Pearson
http://www.davep.org/

---

From: Sam Steingold <[email-masked]>
Date: 20 Apr 2001 12:15:44 -0400

> * In message <[email-masked]>
> * On the subject of "[clisp-list] "Hanging" on compilation error? (Was: Problems building wildcard module)"
> * Sent on Fri, 20 Apr 2001 13:43:40 +0100
> * Honorable Dave Pearson <[email-masked]> writes:
>

latest CLISP means the CVS version, right?
I will fix this right away.

> | *** - FIND-ALL-SYMBOLS: argument #<UNBOUND> should be a string or a symbol

please recompile defsystem

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
nobody's life, liberty or property are safe while the legislature is in session

---

From: Dave Pearson <[email-masked]>
Date: Fri, 20 Apr 2001 17:38:28 +0100

> latest CLISP means the CVS version, right?

Apologies, that wasn't very clear was it? Yes, from CVS.

> please recompile defsystem

Curious, did the clocc CVS server send me *.fas files? Time to
investigate....

-- 
Dave Pearson
http://www.davep.org/

---

From: Dave Pearson <[email-masked]>
Date: Sat, 21 Apr 2001 07:08:39 +0100

On Fri, Apr 20, 2001 at 12:15:44PM -0400, Sam Steingold wrote:

> > [SNIP: lisp.run hangs and hogs process when encountering an error]
> 

Did a fix happen? I refreshed from CVS just now but compiling still dies as
it did before:

,----

and hangs hogging the processor.

I guess the above is also a bug in wildcard.lisp as well (as in, it's a bug
that kicks off the unrelated problem of clisp hanging when encountering an
error)?

-- 
Dave Pearson
http://www.davep.org/

---

From: Sam Steingold <[email-masked]>
Date: 23 Apr 2001 11:24:18 -0400

> * In message <[email-masked]>
> * On the subject of "Re: [clisp-list] "Hanging" on compilation error? (Was: Problems building wildcard module)"
> * Sent on Sat, 21 Apr 2001 07:08:39 +0100
> Did a fix happen? I refreshed from CVS just now but compiling still
> dies as it did before:

it works for me since this morning. :-)

> and hangs hogging the processor.

I cannot reproduce this.
-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Isn't "Microsoft Works" an advertisement lie?

---

From: Dave Pearson <[email-masked]>
Date: Mon, 23 Apr 2001 17:15:51 +0100

On Mon, Apr 23, 2001 at 11:24:18AM -0400, Sam Steingold wrote:

> > Did a fix happen? I refreshed from CVS just now but compiling still dies
> > as it did before:
> 

It might be useful to indicate what change might coincide with your morning
so I'll know if I'm using your idea of "this morning" and any code that goes
with it.

> > and hangs hogging the processor.

I can reproduce this at will (although I'm rebuilding clisp right now with
source pulled from CVS just a few moments ago, I'll let you know what
happens once I've rebuilt and re-tested) like this:

,----
| davep@hagbard:~/temp$ cat foo.cl
| (error "Boo!")
| davep@hagbard:~/temp$ clisp -K full -a foo.cl
| 
| *** - Boo!
`----

at that point there's a lisp.run sitting in memory pegging the processor. In
my limited knowledge of clisp it would appear that any ERROR call in a
"batch" call to clisp causes lisp.run to hang (and it hangs such that it
won't response to a Ctrl-C (other then to tell me that I've hit Ctrl-C) but
will be killed.

-- 
Dave Pearson
http://www.davep.org/

---

From: Dave Pearson <[email-masked]>
Date: Mon, 23 Apr 2001 17:38:01 +0100

> it works for me since this morning. :-)

I'm still getting this problem:

,----

and lisp.run still hangs and hogs the processor at that point. This is with
clisp sources pulled from CVS as of this clisp-devel message:

,----[ Mon, 23 Apr 2001 07:43:51 -0700 ]
| Update of /cvsroot/clisp/clisp/modules/clx/new-clx/demos
| In directory usw-pr-cvs1:/tmp/cvs-serv1799
| 
| Modified Files:
|         clx-demos.lisp
| Log Message:
| getenv is in EXT, not SYS now
`----

I'll try a "make distclean" and work on from there.

-- 
Dave Pearson
http://www.davep.org/

---

From: Sam Steingold <[email-masked]>
Date: 23 Apr 2001 13:19:59 -0400

> * In message <[email-masked]>
> * Sent on Mon, 23 Apr 2001 17:15:51 +0100
> It might be useful to indicate what change might coincide with your
> morning so I'll know if I'm using your idea of "this morning" and any
> code that goes with it.

the change is in wildcard.lisp defpackage form.

> I can reproduce this at will (although I'm rebuilding clisp right now
> with source pulled from CVS just a few moments ago, I'll let you know
> what happens once I've rebuilt and re-tested) like this:

please rm -rf the build directory before rebuilding, just to make
sure...

> | davep@hagbard:~/temp$ clisp -K full -a foo.cl

$ time clisp ~/foo.lisp 
 
"load" 
*** - boo!

real    0m0.187s
user    0m0.111s
sys     0m0.073s
$ time clisp -K full -a ~/foo.lisp 
 
"load" 
*** - boo!

real    0m0.203s
user    0m0.131s
sys     0m0.063s
$

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
History doesn't repeat itself, but historians do repeat each other.

---

From: Dave Pearson <[email-masked]>
Date: Mon, 23 Apr 2001 21:24:46 +0100

> the change is in wildcard.lisp defpackage form.

Hmm, I'm not sure this tells me which CVS update should be responsible. But,
anyway, after a distclean it seems to be building past that.

The build is now dying on:

,----
| Compiling file /usr/local/src/clisp/with-gcc-wall/bindings/linuxlibc6/linux.lisp ...
| *** - COMMON-LISP:EVAL: the function delete-package is undefined
`----

> please rm -rf the build directory before rebuilding, just to make

Totally nuke the directory specified when I do the initial configure? Ok,
I'll give that a shot.

> [SNIP examples of it working for Sam]

Assuming that my total nuke and build test doesn't help, are there some
obvious environmental differences I should be looking for?

-- 
Dave Pearson
http://www.davep.org/

---

From: Dave Pearson <[email-masked]>
Date: Mon, 23 Apr 2001 22:15:02 +0100

On Mon, Apr 23, 2001 at 01:19:59PM -0400, Sam Steingold wrote:

> please rm -rf the build directory before rebuilding, just to make sure...

Right, I totally nuked the build directory and built from scratch. The build
died like this:

,----

and the hang/hog happened. It tool a "killall lisp.run" to get my prompt
back.

-- 
Dave Pearson
http://www.davep.org/

---

From: Sam Steingold <[email-masked]>
Date: 24 Apr 2001 10:53:26 -0400

> * In message <[email-masked]>
> * Sent on Mon, 23 Apr 2001 22:15:02 +0100

I fixed and tested this.
please
        $ cvs up modules/bindings/linuxlibc6/linux.lisp
and make sure it is linked to
        with-gcc-wall/bindings/linuxlibc6/linux.lisp

> and the hang/hog happened. It tool a "killall lisp.run" to get my
> prompt back.

I do not observe this, either before or after my fix.
I would appreciate it if could create a reproducible test case, i.e., a
stand-alone file foo.lisp such that
        $ clisp -norc -c foo.lisp
hangs/hogs.
Thanks.

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
OK, so you're a Ph.D.  Just don't touch anything.

---

From: Dave Pearson <[email-masked]>
Date: Tue, 24 Apr 2001 16:45:21 +0100

> > | *** - COMMON-LISP:EVAL: the function delete-package is undefined

Confirmed here. Thanks.

> I do not observe this, either before or after my fix.

The fix you mention above? It would seem unlikely that it would have
anything to do with it. As I think I've already demonstrated the hang
problem seems to be when an `error' is thrown and clisp has been called as a
"batch" process.

>         $ clisp -norc -c foo.lisp

See <[email-masked]> for one example of a
reproducible test case. If it's compilation you're interested in then this:

,----[ foo.lisp ]
| )
`----

is the smallest possible lisp file that causes the hang when compiled.

IOW, what I'm observing isn't a compiler problem, it's a problem with clisp
hanging when an `error' is thrown.

Note that 2.25.1 doesn't demonstrate this version, clisp built from current
CVS does.

As I asked in <[email-masked]>, are there some
obvious environmental differences I should be looking for? Failing that, is
there some useful way I can check what clisp is doing at the point that it
hangs during an error?

-- 
Dave Pearson
http://www.davep.org/

---

From: Sam Steingold <[email-masked]>
Date: 25 Apr 2001 16:10:31 -0400

> * In message <[email-masked]>
> * Sent on Tue, 24 Apr 2001 16:45:21 +0100
> IOW, what I'm observing isn't a compiler problem, it's a problem with
> clisp hanging when an `error' is thrown.
> Note that 2.25.1 doesn't demonstrate this version, clisp built from
> current CVS does.

yep - this is a linux-specific bug in eval.d which I somehow introduced
with my handler-bind patch.  I think I fixed this bug now.
the test case is
$ clisp -q -norc -x '(/ 0)'

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Despite the raising cost of living, it remains quite popular.

---

From: Dave Pearson <[email-masked]>
Date: Wed, 25 Apr 2001 23:00:58 +0100

On Wed, Apr 25, 2001 at 04:10:31PM -0400, Sam Steingold wrote:

> > clisp hanging when an `error' is thrown. Note that 2.25.1 doesn't
> > demonstrate this version, clisp built from current CVS does.
> 

Confirmed at this end. Thanks.

-- 
Dave Pearson
http://www.davep.org/