maxima makefile etc



I'm finally back from my travels. I wish I had been able to respond
earlier...

On Wed, 2003-12-24 at 12:29, Richard Fateman wrote: 
> I just tried making maxima for the first time since (I think)
> 5.2, using allegro common lisp 6.2 under windows,
> and I was struck by what seems to me to be the large reversal
> in portability in going toward 5.9.0.  

My goal for the build system was to make it as comfortable as possible
for both experienced Lisp users as well as casual users who are familiar
with compiling and installing programs. I think the portability to
non-Unix systems has improved somewhat, while the overall
reproducibility has improved immensely. The portability among Lisps has
also improved immensely. 

An experienced Lisp user should be able to compile and run Maxima
without touching configure, make, or any other unixy tools. I say
"should" instead of "can" simply because that approach hasn't been very
well exercised -- until now, nobody had asked about it. Since there
haven't been any requests (until now), I haven't found the motivation to
document/test the pure Lisp compilation. This message should be a start.

> Maybe I am doing something
> wrong, but here is what I had to do in 5.2. then what I had
> to do for 5.9.0
> 
> 5.2:
> 
> 1. Check an allegro-specific file that says how to dump lisps
> and some other non-standard items in Allegro. I think it also
> rendered some non-ANSI particulars of Maxima into
> ANSI lisp. This was closely modeled on a GCL file.
> I think this was called excl-dump.lisp. I think that paths etc
> were put in this file.
> 
> 2. start up an allegro ANSI lisp (upper case).
> 3. load excl-dump.lisp.
> 4. type (compile)
> 5. exit, start again, but type (load)
> 6. type (dump "maxima.dxl")
> 7. to run maxima, specify an image including maxima.dxl

My objection to the state of affairs in 5.2 was always that the above
procedure was so totally different from the way the GCL version was
compiled that the subtle differences between the two procedures were
impossible to discern. 

> 5.9.0

Here is what you could have done:

1. Copy autoconf-variables.lisp.in to autoconf-variables.lisp. The
values in autoconf-variables.lisp can be edited by hand, but they aren't
really necessary.

2. Start your Lisp.

3. Load defsystem.lisp from the lisp-utils directory.

4. Type (mk:operate-on-system "maxima" :compile).

5. Exit, start again, and type (mk:oos "maxima" :load). (oos is a
nickname for operate-on-system.) 

6. Type (excl:dumplisp :name "maxima.dxl")

7. Run maxima using the maxima.dxl image.

The important point about the new system is that the Makefile works
exactly the same way -- the resulting Maxima will be identical whether
or not you go through the make apparatus.

> First, spend an afternoon loading cygwin on my machine.

Ugh. I wouldn't recommend that at all. Following the advice of others, I
have been building Maxima on windows using MinGW instead of Cygwin. The
procedure I followed to create the binary installer is described in
detail in the file INSTALL.win32.

Cygwin *should* work, however.

> spend an afternoon looking at many files which may or
> may not be correctly set up, with mysterious names and flags
> in a scripting language which I intensely dislike. Then
> run configure, make, (which fails)... at least one problem
> is that the location for windows programs tends to be
> in a directory with a space in the name, e.g.
> c:\Program Files\acl62\alisp.exe   for ANSI Allegro CL.
> 
> so lisp-utils/run  fails.
> 
> Try to do, by hand, the effect of the run script.
> 
> Beyond that, names like /usr/local/   seem to be all
> over the place.  I had to disable $file_search which got
> into an infinite error loop with windows-filenames.

I spent quite a bit of time going over the various build scripts to make
sure I had sufficiently quoted variables to allow for spaces in path
names. To my shock and dismay, I later learned that automake is
incompatible with spaces in path names, so my efforts were wasted. The
best I could do was to do the MinGW make/install in a directory without
spaces, then let the installer move the end product into the standard
directory (which includes spaces.)

The lisp-utils/maxima-run-lisp script has been put out of its misery for
the next release.

> So my impression is that the portability is mostly
> n lisps, but one style of operating system (and it is not the
> operating system running on 95% of machines).
> 
> Am I misunderstanding something here???

I'm afraid you were mostly missing documentation. If there is more
interest in building Maxima without the unix(-like) apparatus, I will
write up better instructions.

--Jim