Subject: [clisp-list] Build problem on Debian

From: Chris Hall <[email-masked]>
Date: Mon May 24 06:06:05 2004

I'm running Debian Woody, kernel 2.2.25 and have just spent waaaay too
many hours on a Sunday trying to build some version, any version, of
clisp.

I need to use regexes, and the default clisp install on Debian doesn't
seem to support them, when invoked either by 'clisp' *or* 'clisp -K
full' it doesn't show up in *features*.  (BTW, the same goes for the
FreeBSD 4.9 clisp).  If I try to use one of the functions, I get an
error.

So, I downloaded the latest source, libsigsegv, etc., followed
directions, and got a SIGSEGV error during the build (something about
0x10a not in [...]).  Searched Google and got 14 results - none useful
to me at all, but I *did* notice the clisp 'help wanted' page asking for
help on this issue.  Sorry folks - that is way, _way_ over my head.
Tried building w/o libsigsegv, but just got a totally different fatal
SIGSEGV error again during the build.

'K - let's try another version.

Next I downloaded 2.29, configure, makemake, edit, etc., etc., etc.  I
got the error below, so I hit Google, the Gmane general list and a few
years of the Sourceforge mailing lists - all I found was a hint of a
related Debian problem in a January 2004 message from Luke Gorrie on the
Sourceforge list, but no resolution.  Fiddled around some more, changed
some things, rm-rf'ed, unpacked, re-configured and built a few more
times trying different things, finally tried building as root, all to no
avail.

Everytime, it is sooooo close - 'make check' works just fine, but su
over to root and 'make install' bombs (see below).

Hmmmm.  OK, so I get the Debian stable source package (now we are at
version 2.27) and start looking through diffs figuring 'hey, they got it
built somehow', because I can 'apt-get install' the
default-but-insufficient-for-my-purposes build.

Sure enough, way deep in the (rather large) Debian diffs is a reference
to Debian not handling the symbolic links in the way the Makefile seems
to expect.

To be honest, at this point, I don't spend the time to figure out
exactly what Debian did, or why - it has by now been a long day and I
just want to get to work on my regexes (I'm using guile and gawk until I
can port to clisp).  So I apply the diffs, they work fine, configure,
makemake, edit, make check.  Builds fine, as it did all the other times
for 2.29 and earlier.  But when I try to install, same *exact* error.

I must either be doing something really silly (or maybe there is
something missing from my Debian?) - surely a GNU lisp shouldn't be so
difficult to build on Debian GNU/Linux?

If it is any help, I *can* build and install the latest GCL, no problem
- I have done so several times recently.  I've also successfully built
and installed recent Python and Postgres, and a few other things - all
without a problem.

Does anybody have any suggestions or ideas, maybe a link or two?

Thanks, g'nite,
+Chris

P.S.  For some reason directories linkkit, base, full, and clisp-link do
*not* seem to exist anywhere in the build tree.

How did we get this far in the build without what appear to be the
output directories?  All I can think of is that an error somehow went
undetected/unhandled by make.

----------------( /usr/local/lib/clisp *after*
naia:~/lisp/clisp-2.27/src# ls -lR /usr/local/lib/clisp/ 
/usr/local/lib/clisp/:
total 16
drwxr-sr-x    2 root     staff        4096 May 24 01:19 base
drwxr-sr-x    2 root     staff        4096 May 24 01:19 data
drwxr-sr-x    2 root     staff        4096 May 24 01:19 full
drwxr-sr-x    2 root     staff        4096 May 24 00:33 linkkit

/usr/local/lib/clisp/base:
total 0

/usr/local/lib/clisp/data:
total 1160
-rw-r--r--    1 root     staff     1134578 May 24 01:19 UnicodeData.txt
-rw-r--r--    1 root     staff       45476 May 24 01:19 clhs.txt

/usr/local/lib/clisp/full:
total 0

/usr/local/lib/clisp/linkkit:
total 92
-rw-r--r--    1 root     staff       81913 May 24 00:33 clisp.h
-rw-r--r--    1 root     staff        1983 May 24 00:33 modules.c
-rw-r--r--    1 root     staff        1943 May 24 00:33 modules.d

----------------( 'make install' output
naia:~/lisp/clisp-2.27/src# make install
if [ ! -d /usr/local ] ; then mkdir /usr/local ; fi
if [ ! -d /usr/local ] ; then mkdir /usr/local ; fi
if [ ! -d /usr/local/lib ] ; then mkdir /usr/local/lib ; fi
if [ ! -d /usr/local/lib/clisp ] ; then mkdir /usr/local/lib/clisp ; fi
if [ ! -d /usr/local/lib/clisp/data ] ; then mkdir /usr/local/lib/clisp/data ; fi
/usr/bin/install -c -m 644 data/UnicodeData.txt /usr/local/lib/clisp/data/UnicodeData.txt
/usr/bin/install -c -m 644 data/clhs.txt /usr/local/lib/clisp/data/clhs.txt
if [ ! -d /usr/local/lib/clisp/linkkit ] ; then mkdir /usr/local/lib/clisp/linkkit ; fi
(cd /usr/local/lib/clisp && rm -rf base full)
mkdir /usr/local/lib/clisp/base
mkdir /usr/local/lib/clisp/full
for f in clisp-link linkkit/modules.d linkkit/modules.c linkkit/clisp.h base/* full/*; do \
  case $f in \
    */lisp.run) /usr/bin/install -c $f /usr/local/lib/clisp/$f;; \
    *) /usr/bin/install -c -m 644 $f /usr/local/lib/clisp/$f;; \
  esac; \
done
/usr/bin/install: cannot stat `clisp-link': No such file or directory
/usr/bin/install: cannot stat `linkkit/modules.d': No such file or directory
/usr/bin/install: cannot stat `linkkit/modules.c': No such file or directory
/usr/bin/install: cannot stat `linkkit/clisp.h': No such file or directory
/usr/bin/install: cannot stat `base/*': No such file or directory
/usr/bin/install: cannot stat `full/*': No such file or directory
make: *** [install-bin] Error 1

-- 
What is life? It is the flash of a firefly in the night. It is the
breath of a buffalo in the wintertime. It is the little shadow which
runs across the grass and loses itself in the sunset.
--- Crowfoot's last words (1890), Blackfoot warrior and orator.

---

From: "John K. Hinsdale" <[email-masked]>
Date: Mon May 24 06:42:07 2004

> many hours on a Sunday trying to build some version, any version, of

Chris welcome to the CLISP and Debian club.  Just like Debian itself,
happily it can always be MADE to work, but ...

w.r.t. build issues.  The thing that works for me generally is to
download the most recent release, or the CVS head, and build from
source; I always do the configure and build in one step w/
  ./configure ... --build mydir

 > directions,

a couple pieces of info would help here: exactly what file did you get
as "latest source", i.e., is it "clisp-2.33.tar.gz" or equivalent?

And what did you end doing after "followed directions" i.e., what
actual commands were done for "./configure" and to build.

which GCC you are using is also a good thing to post as CLISP can be
somewhat picky about the GCC version.

But the naem of the source distro. file and the config/build commands
will be essential in getting helping from the list here ... 

 > Next I downloaded 2.29, configure, makemake, edit, etc., etc., etc.  I

In my experience I have not found it productive to backtrack to older
versions' source releases, the reaons being tha the newer versions
tend to fix many more problems than they create.  Time's better spent
figuring out what the problem buliding the latest release.  This is
true of all packages not jsut CLISP.  Also, not being able to build
the latest release bodes ill for being able to upgrade in the future.

 > I must either be doing something really silly (or maybe there is

Maybe ;)  ... you need to post the commands you used tho.
Suggest you try ./confgure with "--build" and skip all the "makemake"
stuff 

 > surely a GNU lisp shouldn't be so difficult to build on Debian
 > GNU/Linux?

I am shocked that anything would be difficult on Debian. ;)

 > Does anybody have any suggestions or ideas, maybe a link or two?

For me the "configure ... --build"

 > undetected/unhandled by make.

Before runnign "make install" and checking the final system-wide
installation directories, I find it useful to do a test of the CLISP
in the build area.  Locate the directory "full" which shoudl have the
files "lisp.run" and "lispinit.mem" in it.

  E.g.:
   cd /path/to/clisp-2.33/build-dir/full
   ./lisp.run -M lispinit.mem
   
This lisp should have all the compiled-in features you wanted.  If
not, then what you have in the build area shoudl not be installed.

 > ----------------( 'make install' output

The "make install" output is not so useful without first knowing if
you were able to get to a point where you have the "full" directory w/
the files "lisp.run" and "lispinit.mem"

WARNING: I am not an expert on building CLISP however I do manage to
eventually get it built under Debian, so I can probably assist.

I run two commands to build CLISP.  The first is:

./configure                                     \
       --with-readline                          \
       --with-dynamic-ffi                       \
       --with-dynamic-modules                   \
       --with-export-syscalls                   \
       --with-module=wildcard                   \
       --with-module=regexp                     \
       --with-module=bindings/glibc             \
       --with-module=oracle                     \
       --with-module=fastcgi                    \
       --with-module=syscalls                   \
       --build mysrc

This does the config and build all in one step, leaving the build in a
subdirectory called "mysrc".  You will probably want to leave out most
of the --with-module args.

To check it worked I do
	cd /path/to/clisp-2.nn/mysrc/full
	./lisp.run -M lispinit.mem

and make sure it has the features, behaves properly, etc.

To install, I then just do
	cd /path/to/clisp-2.nn/mysrc
	make install

Note: if you want to re-run the configure with --build you
FIRST need to remove the old build area:

	cd /path/to/clisp-2.nn
	rm -rf mysrc

this is somewhat non-obvious IMHO.

Good luck, send more info and we will see if we can get it built,
and then you can get some real work done ;)

---
John Hinsdale, Alma Mater Software, Inc., Tarrytown, NY 10591-3710 USA
[email-masked] | http://www.alma.com/staff/hin | +1 914 631 4690

---

From: Edi Weitz <[email-masked]>
Date: Mon May 24 07:00:15 2004

On Mon, 24 May 2004 03:05:09 -1000, Chris Hall <[email-masked]> wrote:

> I need to use regexes, and the default clisp install on Debian
> doesn't seem to support them

[snip]

> Does anybody have any suggestions or ideas, maybe a link or two?

  apt-get -t testing install cl-ppcre

:)

Edi.

---

From: Sam Steingold <[email-masked]>
Date: Mon May 24 07:40:09 2004

> * Chris Hall <[email-masked]> [2004-05-24 03:05:09 -1000]:
>

Did you try a binary distribution for Linux?
<http://sourceforge.net/project/showfiles.php?group_id=1355>
I think a build for 2.4 will work for 2.2 as well.

> FreeBSD 4.9 clisp).  If I try to use one of the functions, I get an

Please complain to the Debian and FreeBSD package maintainers.
I agree that they should offer more modules by default.

> 0x10a not in [...]).

<http://clisp.cons.org/faq.html#bugs>
<http://clisp.cons.org/clisp.html#bugs>

please try

$ ./configure --with-debug --build build-g
$ cd build-g
$ gdb lisp.run
(gdb) run -B . -E utf-8 -i init.lisp

and report the backtrace.

you might also try the CVS HEAD.

Please also do
$ gcc -o malloc unix/malloc.c
$ for x in 1000000 100000 10000 1000; do ./malloc $x; done
$ rm -f malloc
and send the results here.

thanks.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Programming is like sex: one mistake and you have to support it for a lifetime.

---

From: Chris Hall <[email-masked]>
Date: Mon May 24 09:54:03 2004

> I think a build for 2.4 will work for 2.2 as well.

Um, actually, no, I didn't even think of it - I just assumed that I
needed to build it.

Maybe an rpm, if I got one of the rpm-to-debian tools?  Hmmm.

> I agree that they should offer more modules by default.

I know nothing about FreeBSD PORT system, but I *do* know that Debian
could offer a config dialog from dselect, at least, and let people
choose packages at install time, so maybe I *will* drop the Debian
maintainer a line.

The FreeBSD box is a friend's - I'll ask him to see what we needs to
be done to prods those folks.

> and send the results here.

I'd be happy to do that if it gets to the point where lisp.run is
available - would it be useful for you if I did?  But at present it is
the build itself that is blowing up somewhere along the line.

I've managed to get 2.29 built and installed - I had to doctor the
Makefile, details in a separate post.  I can now (use-package
"REGEXP"), and that is what I really needed and wanted.

Thanks so much for your time,
+Chris

-- 
Good judgment comes from experience. Experience comes from bad
judgment.
- Jim Horning

---

From: Bruno Haible <[email-masked]>
Date: Mon May 24 10:19:01 2004

Chris Hall wrote:

> Next I downloaded 2.29

The 2.33 is the most robust and stable release we've seen in 3 years.
I wouldn't bother trying to build 2.29, except for a museum of clisp
versions.

> /usr/bin/install: cannot stat `full/*': No such file or directory

It seems to me you are doing "make check" and "make install" without
"make" having run to completion. "make" needs to be run successfully
before you can do "make install". Or maybe there's a problem with symlinks
in the build directory?

Bruno

---

From: Chris Hall <[email-masked]>
Date: Tue May 25 02:47:16 2004

> I agree that they should offer more modules by default.

I've discovered that the FreeBSD full image has rexexp included.  Yay!
Someone notified me via this list that Debian includes regexp since
2.29, so problem solved. :-) (*That* was easy, at least!)

> you might also try the CVS HEAD.

I tried to do this using 2.33, but it stuck for over 45 minutes while
building CLOS, so I cancelled the build.  Granted, I use an old 333
mhz Pentium, but the GCL debug build only took about 45 minutes
*total*.

I also tried using CVS from today, but it stopped at:

aclocal: src/m4/libtool.m4: 3608: duplicated macro `AM_DISABLE_STATIC'
aclocal: src/m4/libtool.m4: 3609: duplicated macro `AM_PROG_LD'
aclocal: src/m4/libtool.m4: 3610: duplicated macro `AM_PROG_NM'
make[1]: *** [src/autoconf/aclocal.m4] Error 1
make[1]: Leaving directory `/home/rocktiger/lisp/build/clisp'
make: *** [../src/VERSION] Error 2

> and send the results here.

malloc(1000000) = #x4013A008
&main = #x 80484D4
malloc(100000) = #x 8049768
&main = #x 80484D4
malloc(10000) = #x 8049768
&main = #x 80484D4
malloc(1000) = #x 8049768
&main = #x 80484D4

Nice sig!

Aloha,
+Chris

---

From: Sam Steingold <[email-masked]>
Date: Tue May 25 06:14:08 2004

> * Chris Hall <[email-masked]> [2004-05-24 23:46:10 -1000]:
>
> building CLOS, so I cancelled the build.

I don't know what "building CLOS" means.

> make: *** [../src/VERSION] Error 2

touch ../src/VERSION and proceed.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Winword 6.0 UNinstall: Not enough disk space to uninstall WinWord

---

From: Chris Hall <[email-masked]>
Date: Wed May 26 06:02:03 2004

> you might also try the CVS HEAD.

Debian kernel 2.2.20, gcc 2.95.4, glibc 2.2.

I did a checkout on 24 May and tried - it builds OK, then bombs during
'make check' with a sigsegv error.

So I did the debug build (sheesh! about 3 hours on my box) and
followed the above instructions.

Ummm, what do you mean by a backtrace?  It starts up, loads a bunch of
stuff, then displays a clisp prompt.

Also, the debug build finishes differently - it displays a message
explaining how to see what tests failed - wanna see my tests/clos.erg?
- while the normal build bombs on a sigsegv error.

One thing caught my eye though:

	.gdbinit:139: Error in sourced command file:
	Function "sigsegv_handler_failed" not defined.

I still have the debug build - I don't want to max out my box for 3
hours again for something I know isn't going to work ;-D - so if you'd
like more info, it'll be here for a little while.

> and send the results here.

Sent that in a earlier post.

---

From: Sam Steingold <[email-masked]>
Date: Wed May 26 11:00:14 2004

> * Chris Hall <[email-masked]> [2004-05-26 03:01:12 -1000]:
>

these all are somewhat old.
gcc 2.95 is known to have bugs which prevent correct building of CLISP.
IIRC, (print 1 2) crashes or something.

> 'make check' with a sigsegv error.

this is not helpful.
you should at least include the full error message with several
preceding lines which will let us identify the failed test.

> Ummm, what do you mean by a backtrace?

"where" or "backtrace" output of gdb after a crash.

> explaining how to see what tests failed - wanna see my tests/clos.erg?

yes, of course.
if it is 10 lines, just send it here.
if it is long, send here the URL.

> - while the normal build bombs on a sigsegv error.

which test?
what happens when you disable the failed test?

> 	Function "sigsegv_handler_failed" not defined.

that's fine - it just means that you are using a debug build without
generational gc.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
A year spent in artificial intelligence is enough to make one believe in God.