Subject: [clisp-list] Re: clisp build error

From: [email-masked] (Don Cohen)
Date: Thu, 21 Jun 2001 12:07:04 -0700 (PDT)

Sam Steingold writes:
 > >  > step back - whenever you build a working lisp --with-modules=regexp, you
 > >  > have used dynamic modules.  they do work.
 > > Does this mean that if I configure --with-modules=regexp then I get no
 > > more advantage from --with-dynamic-modules ?
 > --with-modules=regexp wouldn't work --without-modules=regexp.
sorry but this is making no sense to me

 > > I thought that --with-modules=regexp meant to compile in regexp, which
 > > is what I'd call a static module.
 > nope: --with-modules=regexp added regexp to the "full" image (invoked
 > with `clisp -K full`), but the default "base" image does not get
 > regexp.
Ok, so you're saying that we create two images, base and full.
Full has regexp built in.
I had imagined that dynamic modules meant that after you start lisp
you get to "load" a module in the form of a .so or .dll file.
If that's not what it is then what is it?

 > > In the last version I tried:
 > > 2000-03-31  Bruno Haible  <[email-masked]> 
 > > 
 > > which corresponds pretty well to the thing I was checking:
 > >  CVS/Tag:
 > > D2000.04.01.08.00.00 
 > 
 > and you are getting a crash with _this_?!
yes, when configure with dynamic modules

 > are you sure this not something with your machine? disk? ram? cpu?
 > you are using Linux - you probably have not rebooted for ages (writhing
 > with envy :-).
Well, actually this machine hasn't been up that long.  21 days.
The real proof to the contrary is that when I leave out 
--with-dynamic-modules (even though I include regexp) I have NO
problems.

 > Maybe you should consider upgrading your kernel?

That would be a total cop-out.  I really doubt it would matter.  (I
sure hope not.)  And even if it did, then you'd be telling everyone
with the older kernel that they have to upgrade.  This is the kernel I
got from installing redhat 7, so I bet there are lots of people out
there using it.

BTW, here are the commands I executed, just so you can check.

 [root@host1 bug]# cvs -z3 -d:pserver:[email-masked]:/cvsroot/clisp co -D 2000-07-01 clisp 
 [root@host1 bug]# cd clisp 
 [root@host1 clisp]# cat CVS/Tag 
=>
D2000.07.01.07.00.00
 [root@host1 clisp]# ./configure --with-dynamic-modules --build build 
=> ...
;; Loading of file /root/clisp/bug/clisp/build/dutch.lisp is finished. 
;; Loading file /root/clisp/bug/clisp/build/config.lisp 
*** - handle_fault error2 ! address = 0x2034A000 not in [0x2025B000,0x2031BBC8) ! 
SIGSEGV cannot be cured. Fault address = 0x2034A000. 
make: *** [interpreted.mem] Segmentation fault (core dumped) 
 [root@host1 clisp]# cd .. 
 [root@host1 bug]# rm -rf clisp/ 
 [root@host1 bug]# cvs -z3 -d:pserver:[email-masked]:/cvsroot/clisp co -D 2000-04-01 clisp 
=> [just to make sure you think this looks right]
cvs server: Updating clisp 
U clisp/.cvsignore 
U clisp/ANNOUNCE 
U clisp/COPYRIGHT 
...
 [root@host1 bug]# cd clisp 
 [root@host1 clisp]# cat CVS/Tag 
=>
D2000.04.01.08.00.00
 [root@host1 clisp]# ./configure --with-dynamic-modules --build build 
=> ...
;; Loading of file /root/clisp/bug/clisp/build/reploop.lisp is finished. 
;; Loading file /root/clisp/bug/clisp/build/dribble.lisp 
*** - handle_fault error2 ! address = 0x20357000 not in [0x2025A000,0x202EEEE0) ! 
SIGSEGV cannot be cured. Fault address = 0x20357000. 
make: *** [halfcompiled.mem] Segmentation fault (core dumped)

---

From: Sam Steingold <[email-masked]>
Date: 21 Jun 2001 16:56:20 -0400

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Re: clisp build error"
> * Sent on Thu, 21 Jun 2001 12:07:04 -0700 (PDT)
> * Honorable [email-masked] (Don Cohen) writes:
>
> Sam Steingold writes:

oops - should have been
"--with-modules=regexp wouldn't work --without-dynamic-modules"

> If that's not what it is then what is it?

nope :-)  "dynamic modules" allow adding FFI modules (like the ones in
the modules directory) to an existing CLISP image, without recompiling
CLISP.

> yes, when configure with dynamic modules

what about
$ ./configure --with-modules=regexp 

-- 
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/>
Those who can laugh at themselves will never cease to be amused.

---

From: [email-masked] (Don Cohen)
Date: Thu, 21 Jun 2001 16:13:13 -0700 (PDT)

> the modules directory) to an existing CLISP image, without recompiling
I see I've been wasting my time even more than I thought.

 > $ ./configure --with-modules=regexp 
 [root@host1 clisp]# cd build 
 [root@host1 build]# make distclean 
 [root@host1 build]# cd .. 
 [root@host1 clisp]# ./configure --with-modules=regexp --build build 
 ...
 test '!' -s minitests.output.i686-pc-linuxlibc6 
 makemake: modules=regexp: invalid package name 

ahem  - let's try
 ./configure --with-module=regexp --build build 
 ...
 Test passed. 
 make[1]: Leaving directory `/root/clisp/bug/clisp/build/suite'

---

From: Sam Steingold <[email-masked]>
Date: 21 Jun 2001 19:27:17 -0400

> * In message <[email-masked]>
> * On the subject of "Re: [clisp-list] Re: clisp build error"
> * Sent on Thu, 21 Jun 2001 16:13:13 -0700 (PDT)
yes - I always make this mistake!

>  ./configure --with-module=regexp --build build 

I presume the problem does not exist anymore.
good.

-- 
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/>
Don't ascribe to malice what can be adequately explained by stupidity.

---

From: [email-masked] (Don Cohen)
Date: Thu, 21 Jun 2001 18:30:52 -0700 (PDT)

> I presume the problem does not exist anymore.
Nice try, but NO!

starting from Test Passed above:
 [root@host1 clisp]# cd build 
 [root@host1 build]# make distclean 
 [root@host1 build]# cd .. 
 [root@host1 clisp]# ./configure --with-dynamic-modules --build build 
=> ...
;; Loading file /root/clisp/bug/clisp/build/disassem.lisp ... 
;; Loading of file /root/clisp/bug/clisp/build/disassem.lisp is finished. 
*** - handle_fault error2 ! address = 0x202EE000 not in [0x2025A000,0x2029C060) ! 
SIGSEGV cannot be cured. Fault address = 0x202EE000. 
make: *** [halfcompiled.mem] Segmentation fault (core dumped)

---

From: Sam Steingold <[email-masked]>
Date: 22 Jun 2001 14:22:28 -0400

> * In message <[email-masked]>
> * Sent on Thu, 21 Jun 2001 18:30:52 -0700 (PDT)

okay.  you were right all along.
--with-dynamic-modules does load modules dynamically, and is _not_
required for --with-module=regexp.  sorry.

Now, could you please try to debug this?
you have the core, and
$ gdb -c core
(gdb) where
will probably be totally useless.
maybe you could do
$ makemake debug > Makefile
and get the core and see what is going on there?
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/>
Binaries die but source code lives forever.

---

From: [email-masked] (Don Cohen)
Date: Fri, 22 Jun 2001 13:25:46 -0700 (PDT)

> will probably be totally useless.
correct - it says no stack
 > and get the core and see what is going on there?
I guess you really mean
 ./makemake  --with-dynamic-modules debug > Makefile 
 make
(worked)
 make test
(worked)
 make testsuite
=> ...
(HASH-TABLE-P (MAKE-HASH-TABLE :TEST #'EQL :REHASH-SIZE 1. 
*** - handle_fault error2 ! address = 0x20368000 not in [0x2025A000,0x2030C1E0) ! 
SIGSEGV cannot be cured. Fault address = 0x20368000. 
make[1]: *** [tests] Segmentation fault (core dumped) 
make[1]: Leaving directory `/root/clisp/bug/clisp/build/suite' 
make: *** [testsuite] Error 2 

So now I guess you want me to do this?

[root@host1 build]# gdb -c core 
GNU gdb 5.0 
Copyright 2000 Free Software Foundation, Inc. 
GDB is free software, covered by the GNU General Public License, and you are 
welcome to change it and/or distribute copies of it under certain conditions. 
Type "show copying" to see the conditions. 
There is absolutely no warranty for GDB.  Type "show warranty" for details. 
This GDB was configured as "i386-redhat-linux". 
Core was generated by `./lisp.run -m 750KW -B . -N locale -Efile ISO-8859-1 -norc\
 -x (load "init.lisp"'. 
Program terminated with signal 11, Segmentation fault. 
#0  0x8079ac8 in ?? () 
(gdb) where 
#0  0x8079ac8 in ?? () 
Cannot access memory at address 0x202edffe 
(gdb)  

I hope you don't think I know how to use gdb.
Tell me what to do next.
Maybe you'd like me to send you the core file?

---

From: Sam Steingold <[email-masked]>
Date: 22 Jun 2001 16:42:48 -0400

> * In message <[email-masked]>
> * Sent on Fri, 22 Jun 2001 13:25:46 -0700 (PDT)
yep.
please make sure that -fomit-frame-pointer is not in CFLAGS.
if it is not there already, please try adding '-g' there.

> [root@host1 build]# gdb -c core

$ gdb -c core lisp.run
(not that it should make a difference)...

> Cannot access memory at address 0x202edffe 

too bad...

> I hope you don't think I know how to use gdb.
I hope _you_ don't think _I_ know how to use gdb, or program in C or
debug lisp.run &c... :-(

> Maybe you'd like me to send you the core file?

can you upload it somewhere?
(do _not_ e-mail it to me or to clisp-list &c)

[why are you running all this as root?!]

-- 
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/>
I want Tamagochi! -- What for?  Your pet hamster is still alive!

---

From: [email-masked] (Don Cohen)
Date: Fri, 22 Jun 2001 14:57:09 -0700 (PDT)

> if it is not there already, please try adding '-g' there.
I do see lines with omit-frame-pointer but it's not in Makefile.
I don't know whether to worry.

 > I hope _you_ don't think _I_ know how to use gdb, or program in C or
In that case what are you going to do with core?

 > (do _not_ e-mail it to me or to clisp-list &c)
http://ap5.com/~donc/core - 1.8MB