Subject: Re: [clisp-list] help with compiling clisp cvs on cygwin

From: "Yadin Y. Goldschmidt" <[email-masked]>
Date: Thu Mar 20 18:59:02 2003

Hi Arseny,
Thank for your reply. I tried to uninstall libiconv but it does not help.
I am still unable to compile sucessfully.
As per Sam's request could you compile it from cvs head and send binaries 
to me or post them on sourceforge or somewhere?
I would appreciate, TIA, Yadin.

---

From: Arseny Slobodjuck <[email-masked]>
Date: Fri Mar 21 06:03:07 2003

Hello Yadin,

> to me or post them on sourceforge or somewhere?
I uploaded freshly compiled win32 binaries to sourceforge
(clisp-2.30.1-win32.zip) - please try it.

-- 
Best regards,
 Arseny

---

From: Sam Steingold <[email-masked]>
Date: Fri Mar 21 06:30:08 2003

> * In message <[email-masked]>
> * On the subject of "[clisp-list] win32 cvs head binaries"
> * Sent on Sat, 22 Mar 2003 00:06:42 +1000
> * Honorable Arseny Slobodjuck <[email-masked]> writes:
>

let us not mix stable releases and ad hoc binaries.
<ftp://ftp2.cons.org/pub/lisp/clisp/snapshots/clisp-2.30.1-win32.zip>

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Yeah, yeah, I love cats too... wanna trade recipes?

---

From: Sam Steingold <[email-masked]>
Date: Fri Mar 21 06:33:18 2003

> * In message <5727776.1048197477@yadin-nb>
> * On the subject of "Re: [clisp-list] help with compiling clisp cvs on cygwin"
> * Sent on Thu, 20 Mar 2003 21:57:57 -0500
> * Honorable "Yadin Y. Goldschmidt" <[email-masked]> writes:
>

Yadin, you reported a bug with type.lisp and encodings.
we need to figure out which encodings do not work.
please remove libiconv and try the patch I send you.
the warnings should tell you which encodings are missing.
thanks.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
cogito cogito ergo cogito sum

---

From: "Yadin Y. Goldschmidt" <[email-masked]>
Date: Fri Mar 21 07:23:02 2003

Hello Arseny and Sam,
Thank you for your effeort but the binaries don't work: A box opens which 
says that
lisp.exe encountered a problem and needs to be closed. This is on a Win XP 
box.
(BTW I really need cygwin binaries not win32 binaries since I need to 
compile maxima to run in bash and win32 binaries don't understand cygwin 
paths, I know that from previous win32 releases).
I will try again to track the type.lisp problem. The problem is that when I 
remove libiconv the compilation fails even before it gets to type.lisp It 
failes when loading a previous .lisp file, I forgot which (maybe 
places.lisp). Also when I compiled libiconv myself and installed it also 
failes on loading one of the previous files. So it does not even get to 
your patched file. It failed with signal 11. I compiled libiconv from the 
original sources, I will try again to recompile from cygwin source but I 
don't have too much time to spend on this. If I make any progress I will 
report.
Thanks, Yadin.

--On Friday, March 21, 2003 9:30 AM -0500 Sam Steingold <[email-masked]> 
wrote:r

>> > As per Sam's request could you compile it from cvs head and send
>> > binaries to me or post them on sourceforge or somewhere?
> <http://www.mideasttruth.com/>
> <http://www.palestine-central.com/links.html> Yeah, yeah, I love cats
> too... wanna trade recipes?

---------------------------------------------------------------------------
Yadin Y. Goldschmidt                       voice:  (412)624-9024
Professor of Physics                         fax:  (412)624-9163
Dept. of Physics and Astronomy       http://www.pitt.edu/~yadin
University of Pittsburgh                     mailto:[email-masked]
Pittsburgh PA 15260
---------------------------------------------------------------------------

---

From: Sam Steingold <[email-masked]>
Date: Fri Mar 21 08:07:10 2003

> * In message <[email-masked]>
> * On the subject of "Re: [clisp-list] win32 cvs head binaries"
> * Sent on Fri, 21 Mar 2003 10:21:57 -0500
> compile maxima to run in bash and win32 binaries don't understand
> cygwin paths, I know that from previous win32 releases).

I think I made CLISP win32 understand cygwin paths.
see `*device-prefix*' in config.lisp.

> I don't have too much time to spend on this.
I understand.

> If I make any progress I will report.
thanks.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
All extremists should be taken out and shot.

---

From: Arseny Slobodjuck <[email-masked]>
Date: Fri Mar 21 16:37:04 2003

Hello Yadin,

> lisp.exe encountered a problem and needs to be closed. This is on a Win XP 
This is strange. I compiled maxima-5.9.0rc1 using it just now. I used
the following 'clisp' shell script (full path replaced with ... for
the sake of conspiracy):

=====
#!/bin/sh
/cygdrive/c/.../lisp.exe -M /cygdrive/c/.../lispinit.mem "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
=====

The $* won't work, so that mess. I had to correct maxima makefile - I
removed cmucl-...mk from it.

There is one thing I forgot to make yesterday late evening - this is debug
binaries. At worse it should miss some DLLs - is this the case ?
Sorry then.  I can upload normal version - say where.

> don't have too much time to spend on this. If I make any progress I will 

Don't lose the time - I tried a number of ways and got no success -
there is a bug in GC. Mingw build crashes after defmacro.lisp was
loaded.

>> <ftp://ftp2.cons.org/pub/lisp/clisp/snapshots/clisp-2.30.1-win32.zip>

May be it's worth to do a 'beta' section among file releases ?

-- 
Best regards,
 Arseny                            mailto:[email-masked]

---

From: Arseny Slobodjuck <[email-masked]>
Date: Fri Mar 21 16:38:02 2003

Hello Sam,

> the warnings should tell you which encodings are missing.

I believe this is due to binnary incompatibility with libiconv -
remember the clisp-list discussion on Nov 2002.

-- 
Best regards,
 Arseny

---

From: "Yadin Y. Goldschmidt" <[email-masked]>
Date: Fri Mar 21 19:48:02 2003

Hi Arseny,
The binaries did not work at all I, don't know why but even if you click on 
lisp.exe in explorer it opens a box that says the program needs to be 
terminated since it caused a system error. Please check the version that 
you uploaded, and if you can, please upload a corrected version to the same 
loaction. I really thank you for your effort.
Yadin.

--On Saturday, March 22, 2003 10:40 AM +1000 Arseny Slobodjuck 
<[email-masked]> wrote:r

>> lisp.exe encountered a problem and needs to be closed. This is on a Win
>> XP  box.
># !/bin/sh
> /cygdrive/c/.../lisp.exe -M /cygdrive/c/.../lispinit.mem "$1" "$2" "$3"
> "$4" "$5" "$6" "$7" "$8" "$9" =====
>

---

From: Sam Steingold <[email-masked]>
Date: Sat Mar 22 07:39:07 2003

> * In message <[email-masked]>
> * On the subject of "Re[2]: [clisp-list] win32 cvs head binaries"
> * Sent on Sat, 22 Mar 2003 10:40:57 +1000

Yes, but Yadin got past that!

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Beauty is only a light switch away.

---

From: "Yadin Y. Goldschmidt" <[email-masked]>
Date: Sat Mar 22 18:12:16 2003

Hello Arseny,
Thank you for the new binaries that you posted on your site
using MSVC. I downloaded them to my home computer and they work fine.
I also was sucessful to compile maxima and it works fine execpt that it 
fails to launch omplotdata for plot2d since it claims it is not a windows 
executable which indeed it is not. The cygwin compiled clisp-2.29 was able 
to execute it. I then tried the binaries that you posted Friday to 
sourceforge on my home computer and they also work. I don't know why they 
don't work on my work computer. On Monday I will check if the new binaries 
(with no debug) work on my work computer. I will look into this more and 
let you know. Thank you again very much for your help-
I really appreciate it. Yadin.

---

From: "Yadin Y. Goldschmidt" <[email-masked]>
Date: Mon Mar 24 10:07:07 2003

Hello,
I successfully recompiled the patched cygwin libiconv library. It nows 
loads type.lisp without any changes (I did not apply the patch, should I?) 
but it gets stuck on compiler.lisp with some warning and then signal 11. 
Here is the output:
./lisp.exe -B . -N locale -Efile UTF-8 -Eterminal UTF-8 -norc -m 750KW -x 
"(and
(load \"init.lisp\") (sys::%saveinitmem) (ext::exit))"
  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2003

;; Loading file defseq.lisp ...
;; Loaded file defseq.lisp
;; Loading file backquote.lisp ...
;; Loaded file backquote.lisp
;; Loading file defmacro.lisp ...
;; Loaded file defmacro.lisp
;; Loading file macros1.lisp ...
;; Loaded file macros1.lisp
;; Loading file macros2.lisp ...
;; Loaded file macros2.lisp
;; Loading file defs1.lisp ...
;; Loaded file defs1.lisp
;; Loading file places.lisp ...
;; Loaded file places.lisp
;; Loading file floatprint.lisp ...
;; Loaded file floatprint.lisp
;; Loading file type.lisp ...
;; Loaded file type.lisp
;; Loading file defstruct.lisp ...
;; Loaded file defstruct.lisp
;; Loading file format.lisp ...
(WARN "~a: redefining ~a ~s in ~a, was defined in ~a" "DEFUN/DEFMACRO" 
"function
" FORMAT #P"/cygdrive/c/temp/clisp/src/format.lisp" "top-level")
;; Loaded file format.lisp
;; Loading file international.lisp ...
;; Loaded file international.lisp
;; Loading file /cygdrive/c/temp/clisp/built-w-newiconv/room.lisp ...
;; Loaded file /cygdrive/c/temp/clisp/built-w-newiconv/room.lisp
;; Loading file /cygdrive/c/temp/clisp/built-w-newiconv/savemem.lisp ...
;; Loaded file /cygdrive/c/temp/clisp/built-w-newiconv/savemem.lisp
;; Loading file /cygdrive/c/temp/clisp/built-w-newiconv/trace.lisp ...
;; Loaded file /cygdrive/c/temp/clisp/built-w-newiconv/trace.lisp
;; Loading file /cygdrive/c/temp/clisp/built-w-newiconv/cmacros.lisp ...
;; Loaded file /cygdrive/c/temp/clisp/built-w-newiconv/cmacros.lisp
;; Loading file /cygdrive/c/temp/clisp/built-w-newiconv/compiler.lisp ...
(WARN "~a: redefining ~a ~s in ~a, was defined in ~a" "DEFUN/DEFMACRO" 
"function
" GLOBAL-IN-FENV-P #P"/cygdrive/c/temp/clisp/src/compiler.lisp" "top-level")
(WARN "~a: redefining ~a ~s in ~a, was defined in ~a" "DEFUN/DEFMACRO" 
"macro" E
VAL-WHEN-COMPILE #P"/cygdrive/c/temp/clisp/src/compiler.lisp" "top-level") 
Signa
l 11
make: *** [interpreted.mem] Error 139
What next?
Yadin.

--On Saturday, March 22, 2003 10:39 AM -0500 Sam Steingold <[email-masked]> 
wrote:r

> <http://www.palestine-central.com/links.html> Beauty is only a light
> switch away.

---

From: Sam Steingold <[email-masked]>
Date: Mon Mar 24 11:26:17 2003

> * In message <[email-masked]>
> * On the subject of "Re: Re[2]: [clisp-list] win32 cvs head binaries"
> * Sent on Mon, 24 Mar 2003 13:06:42 -0500

it depends on whether you want to help us with the problem you had
before.
if you do want to help us, you need to __remove__ libiconv, apply the
patch and try to build again.
the task is __not__ to achieve a successful build (yet :-), but to,
first, see what encodings are missing, and, then, later, with a
_different_ patch, to make clisp load type.lisp without libiconv.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Whether pronounced "leenooks" or "line-uks", it's better than Windows.

---

From: Arseny Slobodjuck <[email-masked]>
Date: Tue Mar 25 01:58:14 2003

> _different_ patch, to make clisp load type.lisp without libiconv.

Sam, I'm happy to inform you - there's no problem with cygwin and
libiconv except the latter has to be rebuilt. No missing encodings!
Unix error 2 = EILSEQ or something, it is not a file error. It is
acceptable in the place it occurs. I had already spent a day on this
so no need to repeat it (except if one wants - its another deal).

---

From: "Yadin Y. Goldschmidt" <[email-masked]>
Date: Tue Mar 25 06:26:25 2003

Sam,
I did it already but to be sure I did it again. I removed libiconv 
completely and compiled clisp. It chokes on type.lisp with signal 11. This 
is true both for the patched type.lisp and for the unpatched type.lisp.
If I reinstall the newly recompiled patched libiconv then it goes up to 
compiler.lisp and dies with signal 11.
Yadin.

--On Monday, March 24, 2003 2:26 PM -0500 Sam Steingold <[email-masked]> 
wrote:r

> <http://www.palestine-central.com/links.html> Whether pronounced
> "leenooks" or "line-uks", it's better than Windows.

---

From: "Yadin Y. Goldschmidt" <[email-masked]>
Date: Tue Mar 25 06:30:34 2003

I forgot to mention that (without libiconv) there are no comments or error 
messages when it dies loading type.lisp just : signal 11.

---

From: Sam Steingold <[email-masked]>
Date: Sat Mar 29 18:46:11 2003

Yadin, please try CVS head again - it appears that the problem has been fixed.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Cannot handle the fatal error due to a fatal error in the fatal error handler.

---

From: "Yadin Y. Goldschmidt" <[email-masked]>
Date: Sun Mar 30 07:26:03 2003

I successfully compiled cvs head on cygwin. Thank you. the problem has been 
solved.
Yadin.

--On Saturday, March 29, 2003 9:46 PM -0500 Sam Steingold <[email-masked]> 
wrote:r

> <http://www.palestine-central.com/links.html> Cannot handle the fatal
> error due to a fatal error in the fatal error handler.

---

From: Sam Steingold <[email-masked]>
Date: Mon Mar 31 06:52:54 2003

> * In message <4887728.1049019900@yadin-nb>
> * Sent on Sun, 30 Mar 2003 10:25:00 -0500
> I successfully compiled cvs head on cygwin. Thank you. the problem has
> been solved.

Thanks to Arseny Slobodjuck & Dan Stanger for much debugging!

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
MS Windows vs IBM OS/2: Why marketing matters more than technology...

---

From: "Yadin Y. Goldschmidt" <[email-masked]>
Date: Tue Apr 1 09:45:25 2003

Hello Sam,
Now that clisp cvs can be compiled on cygwin I have a few questions 
/comments/requests:
1. Why when I type clisp --version no version information appears, but 
instead I get the |1> prompt? Is it because this is cvs and not a regular 
release?
2. When compiling on cygwin the compilation stops in the middle because of 
undefined reference to main
in libcharset. I have to manually go to build/libcharset/lib and issue the 
compile comand without -no-undefined.
Can configure be changed so it will not implement the no_undefined_flag for 
cygwin?
3. The patched cygwin libiconv library has to be recompiled before the 
clisp compilation can be successful. I did that myself but it is probably a 
good idea to ask Chuck Wilson the libiconv maintainer to update the library 
on the cygwin tree.
Should I ask him or you, Sam, want to do that?
Otherwise I am really pleased with this release. I used it to recompile 
maxima and it works great. Thanks again,
Yadin.

--On Monday, March 31, 2003 9:42 AM -0500 Sam Steingold <[email-masked]> 
wrote:r

> <http://www.palestine-central.com/links.html> MS Windows vs IBM OS/2: Why
> marketing matters more than technology...

---

From: Sam Steingold <[email-masked]>
Date: Tue Apr 1 10:25:52 2003

> * In message <[email-masked]>
> * Sent on Tue, 01 Apr 2003 12:38:59 -0500
>    instead I get the |1> prompt? Is it because this is cvs and not a
>    regular release?

this was a bug, introduced in the -repl/multiple -x patch recently.
I just fixed it.
thanks for reporting it.

> 2. When compiling on cygwin the compilation stops in the middle
>    because of undefined reference to main in libcharset. I have to
>    manually go to build/libcharset/lib and issue the compile comand
>    without -no-undefined.  Can configure be changed so it will not
>    implement the no_undefined_flag for cygwin?

probably.  I am sure Dan Stanger or Arseny Slobodjuck can do that.
I have no access to cygwin (or woe32).

>    clisp compilation can be successful. I did that myself but it is
>    probably a good idea to ask Chuck Wilson the libiconv maintainer to
>    update the library on the cygwin tree.  Should I ask him or you,
>    Sam, want to do that?

Please ask him yourself.

Note that in your very first message to this list you appeared to
indicate that CLISP cannot be built on cygwin without libiconv.
If this is the case, it is no good and should be fixed.
Please apply the first appended patch and rebuild without libiconv.
The warnings (in an ugly list form due to bootstrapping) will tell us
what encodings are missing.
The second patch should make clisp build on cygwin even without
libiconv.

Thanks.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
You can have it good, soon or cheap.  Pick two...

===============================================================================
--- type.lisp.~1.44.~	2003-04-01 13:15:21.000000000 -0500
+++ type.lisp	2003-04-01 13:16:44.000000000 -0500
@@ -1372,11 +1372,18 @@
   ;; Return the definition range of a character set. If necessary, compute it
   ;; and store it in the cache.
   (defun get-charset-range (charset &optional maxintervals)
-    (or (gethash charset table)
-        (setf (gethash charset table)
-              (charset-range (make-encoding :charset charset)
-                             (code-char 0) (code-char (1- char-code-limit))
-                             maxintervals))))
+    (let ((name (if (encodingp charset) (encoding-charset charset) charset)))
+      (or (gethash name table)
+          (let ((enc (if (encodingp charset) charset
+                         (make-encoding :charset charset
+                                        :if-does-not-exist nil))))
+            (unless enc         ; SHOULD BE AN ERROR!!!
+              (warn "~S: invalid charset ~S" 'get-charset-range charset)
+              (return-from get-charset-range nil))
+            (setf (gethash name table)
+                  (charset-range enc (code-char 0)
+                                 (code-char (1- char-code-limit))
+                                 maxintervals))))))
   ;; Fill the cache, but cache only the results with small lists of intervals.
   ;; Some iconv based encodings have large lists of intervals (up to 5844
   ;; intervals for ISO-2022-JP-2) which are rarely used and not worth caching.

===============================================================================
--- type.lisp.~1.44.~	2003-04-01 13:15:21.000000000 -0500
+++ type.lisp	2003-04-01 13:21:05.000000000 -0500
@@ -1373,10 +1373,12 @@
   ;; and store it in the cache.
   (defun get-charset-range (charset &optional maxintervals)
     (or (gethash charset table)
+        (let ((enc (make-encoding :charset charset :if-does-not-exist nil)))
+          (and enc
         (setf (gethash charset table)
-              (charset-range (make-encoding :charset charset)
+                     (charset-range enc
                              (code-char 0) (code-char (1- char-code-limit))
-                             maxintervals))))
+                                    maxintervals))))))
   ;; Fill the cache, but cache only the results with small lists of intervals.
   ;; Some iconv based encodings have large lists of intervals (up to 5844
   ;; intervals for ISO-2022-JP-2) which are rarely used and not worth caching.

---

From: Sam Steingold <[email-masked]>
Date: Tue Apr 1 14:43:56 2003

> * In message <[email-masked]>
> * Sent on Tue, 01 Apr 2003 12:53:24 -0700
> * Honorable Dan Stanger <[email-masked]> writes:
>
> Sam Steingold wrote:
> 
> What is the flag to configure without libiconv?

you have to remove libiconv first; when it is present, it will be used.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
If you're passed on the right, you're in the wrong lane.