home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
jËzyki_programowania
/
clisp
/
doc
/
install.txt
< prev
next >
Wrap
Text File
|
1977-12-31
|
14KB
|
309 lines
Installation on Amiga (AmigaDOS):
---------------------------------
1. Install a GNU GCC development platform
I don't believe CLISP can be compiled with anything else than GCC
on the Amiga. CLISP source heavily stresses any C compiler.
I managed to compile early versions of CLISP on my stock B2000 with 5MB
of RAM and gcc-1.40, throwing every program out of the machine (including
RAM: and LoadWB) and running each compiler stage separately. Luckily,
when I hit GCC bugs, newer bug-freed versions were available. Compilation
of CLISP has lead to several bug-reports in gnu.gcc.bugs.
2. Install Amiga includes
They are copyrighted by Commodore-Amiga and can be obtained on the Amiga
Developer CD or on Fred Fish CDs. See your Amiga FAQ.
3. Make directory trees
Leave source in src/ (only *.d, *.h and *.lsp files are needed) and
utilities in utils/ (only comment5, ansidecl and cvtmsgs are needed).
Choose the version you want to build (see README.Amiga or README) and
create directories like make.high/, make.low/ and make.wide/ at the same
level as src/.
4. IxPrefs and ixemul.library `/' pathname translation
In order to find include files located in /src/ relatively to the make.*
directory, ixemul.library shouldn't translate /. As sh (which is called
by GNU-make) doesn't seem to be able to handle this situation, a
workaround is to assign src: and utils: to the src/ and utils/ directories
respectively.
5. Check your stack sizes
gcc-cc1 uses up to 380000 bytes of stack in EVAL.D.
gcc-cpp and gcc-as get along with 20000 bytes.
gcc-ld requires 180000 bytes.
This is my observed stack usage relative to GCC-2.5.8 and can increase
when adding new features to CLISP. If your make program cannot set stack
sizes, you'll have to run everything with the maximum stack. I have my
own make program which recognizes and honours the stack command.
6. Make the clisp support library found in amiga/jchlib/
This is a micro C startup library containing the bare minimum to start a
program from CLI or WorkBench, setjmp() and strlen(). It's used by CLISP
but could be by other programs too. It doesn't require ixemul.library.
From WorkBench, it opens the window specified by the WINDOW tooltype,
initializes argv[] with ARGS if present and supports project icons
(currently all in the same directory only).
Compiling CLISP without using my library has never been tested.
7. Makefile
Due to lack of RAM (I have 10 MB :-), big CLISP source files and the huge
stack needed by cc1, it was not possible for me to use a generic Makefile
and simply run gcc with a stack set to 380000 bytes. That's why I'm using
a private make which nobody but I has. It recognizes the stack command.
Furthermore my Makefile calls each compiler stage directly, saving the
space for the gcc driver.
Now, with a normal (GNU-)make, I nevertheless managed to build CLISP by
running VMM, a virtual memory manager and setting the maximal stack
before starting make. It's a huge waste of resources and won't run in a
10MB system without virtual memory, but you could also try this. Link or
copy the /bin/true command to make.*/stack so that /bin/sh will find a
stack command (it's called by the Makefile). If /bin/sh can't find cc1,
cpp etc. because they are deep inside the gcc-lib hierarchy, set a local
variable PATH to all the paths. Make and thus sh will inherit this
variable:
set PATH /gnu/bin:/gnu/lib/gcc-lib/m68k-cbm-amigados/2.x.x:/C:/utils/:.
8. Edit
make.*/Makefile
according to your choices and tastes. By default, you'll make the
international (well, english, french and german) version of CLISP, which
requires more space than a single language one that can be built by
adding one of -DENGLISH, -DFRANCAIS or -DDEUTSCH flags to the compiler.
See src/lispbibl.d for everything that can be defined. The amiga or AMIGA
define serves to recognize the Amiga (don't set them for now under
Amiga-UNIX). Interesting preprocessor flags include AMIGA3000, MC680Y0
for 68020 or better (implied by AMIGA3000), MC68000 for 68000 only, and
WIDE for 64 bit ints (for 32 bit clean pointers).
Extensions like gettext and readline cannot currently be added as they
use stdio and malloc whereas CLISP uses the low-level and unbuffered
dos.library routines for i/o and AllocMem() etc. for all memory. Don't
mess with it. Using UNIX-like (open) or ANSI (fopen) stdio would require
a large rewrite of several source files.
9. Edit
src/config.lsp
src/timezone.lsp
See README for the one line to modify in timezone.lsp. In config.lsp,
you may wish to set your favourite editor or restrict the load-path.
10. Remove
every $ from the file src/ari68020.mit.d and rename it src/ari68020.d
sed > ari68020.d -e "s/$//" ari68020.mit.d
Quote $ according to your shell conventions and sed version.
11. Copy,
rename or link src/ari68000.mit.d to src/ari68000.d
12. Type
make (while in a make.* directory) (-low)
make HIGH=1 (-high)
make WIDE=1 (-wide)
and wait for things to happen. One night on a B2000, more than one hour
on an A4000/40.
Hint: use FIFO: (by Matt Dillon) in order to get a logfile.
NewShell FIFO:shell/rwkecs
Run >nil: remcli shell
Run >nil: cat FIFO:shell/rmt >>compile.log
echo "Log going into compile.log."
Or use KingCon, ConsoleBuffer or else the Recorder program from the
hacks204 archive by Andy Finkel (doesn't seem to work with 3.0).
13. Patches
Gcc-2.3.3 -O2 -fomit-frame-pointer put several bugs in the compiler
output. I previously corrected two of them by hand-patching the assembly
files. Gcc-2.5.7 produced correct output but for 68020 and above machines
only. Gcc-2.5.8 produces few bugs and only in the -DWIDE version. Beta
versions of gcc-2.6.0 were not stable enough for compilation of the
-DWIDE version. I'm using Gcc-2.5.8.
Here's what to patch in control.s:_C_go (before the second eql):
movel a5@(-12),sp@-
movel a5@(-16),sp@-
#APP
| Should only be incremented once!
| movel d1,a2
| addql #8,d1
#NO_APP
movel d1,a2
addql #8,d1
movel a2@(4),sp@-
movel a2@,sp@-
movel d1,a5@(-28)
jbsr _eql
Here's a patch for predtype.s:_equalp (case_string dotimespL loop):
movel a5@(-32),d1
movel d1,a1
addql #1,d1
moveb a1@,d0
#APP
| Save incremented address!
movel d1,a5@(-32)
#NO_APP
movel d0,sp@-
jbsr a6@
Nobody gurantees there aren't more bugs not uncovered by the tests.
14. Type
make interpreted.mem a memory image with everything
uncompiled (size 1.7MB)
make lispinit.mem makes all *.fas files and
a memory image with everything
compiled (size 500KB, 1MB for wide version)
The second step is the most time consuming.
15. A test-suite
The directory clisp/tests/ contains a large number of test files. While in
CLISP, do
(cd "/tests/")
(load "tests")
(run-all-tests)
and have a look at possibly resulting .erg files. Only alltest.erg and
array.erg should remain and report some limit or fixnum differences.
16. Documentation
Unluckily for an Amiga-only site, I generated the .man file on a UNIX
box and displayed it in an EMACS buffer (M-x man) from where I saved it.
I'd like to know about better ways to do this.
17. Known compiler warnings
This gives you an idea of what not to look at. Some warnings, especially
in LISPARIT.D vary among the versions.
/src/array.d: In function `C_make_array':
/src/array.d:2445: warning: `fillpointer' may be used uninitialized in this function
/src/array.d: In function `C_adjust_array':
/src/array.d:2742: warning: `fillpointer' may be used uninitialized in this function
/src/charstrg.d: In function `test_index_arg':
/src/charstrg.d:1418: warning: `i' may be used uninitialized in this function
/src/charstrg.d: In function `test_string_limits':
/src/charstrg.d:1508: warning: `start' may be used uninitialized in this function
/src/charstrg.d:1509: warning: `end' may be used uninitialized in this function
/src/charstrg.d: In function `test_1_stringsym_limits':
/src/charstrg.d:1587: warning: `start' may be used uninitialized in this function
/src/charstrg.d:1588: warning: `end' may be used uninitialized in this function
/src/charstrg.d: In function `test_2_stringsym_limits':
/src/charstrg.d:1659: warning: `start1' may be used uninitialized in this function
/src/charstrg.d:1660: warning: `end1' may be used uninitialized in this function
/src/charstrg.d:1689: warning: `start2' may be used uninitialized in this function
/src/charstrg.d:1690: warning: `end2' may be used uninitialized in this function
/src/charstrg.d: In function `C_substring':
/src/charstrg.d:2322: warning: `start' may be used uninitialized in this function
/src/charstrg.d:2323: warning: `end' may be used uninitialized in this function
/src/control.d: In function `C_tagbody':
/src/control.d:1439: warning: variable `body' may be clobbered by `longjmp' or `vfork'
/src/eval.d: In function `invoke_handlers':
/src/eval.d:686: warning: variable `other_ranges' may be clobbered by `longjmp' or `vfork'
/src/eval.d:689: warning: variable `FRAME' may be clobbered by `longjmp' or `vfork'
/src/eval.d:702: warning: variable `i' may be clobbered by `longjmp' or `vfork'
/src/eval.d: In function `funcall_iclosure':
/src/eval.d:2371: warning: argument `closure' may be clobbered by `longjmp' or `vfork'
/src/eval.d:2372: warning: argument `args_pointer' may be clobbered by `longjmp' or `vfork'
/src/eval.d:2373: warning: argument `argcount' may be clobbered by `longjmp' or `vfork'
/src/eval.d: In function `eval':
/src/eval.d:2849: warning: variable `_SetSignal_re' may be clobbered by `longjmp' or `vfork'
/src/eval.d:2849: warning: variable `_n1' may be clobbered by `longjmp' or `vfork'
/src/eval.d:2846: warning: argument `form' may be clobbered by `longjmp' or `vfork'
/src/eval.d: In function `eval_no_hooks':
/src/eval.d:2906: warning: argument `form' may be clobbered by `longjmp' or `vfork'
/src/eval.d: In function `interpret_bytecode_':
/src/eval.d:5750: warning: variable `closure' may be clobbered by `longjmp' or `vfork'
/src/eval.d:5755: warning: variable `byteptr' may be clobbered by `longjmp' or `vfork'
/src/eval.d:5763: warning: variable `closureptr' may be clobbered by `longjmp' or `vfork'
/src/eval.d:5746: warning: argument `codeptr' may be clobbered by `longjmp' or `vfork'
/src/hashtabl.d: In function `hashcode':
/src/hashtabl.d:438: warning: statement with no effect
/src/hashtabl.d: In function `C_class_tuple_gethash':
/src/hashtabl.d:1326: warning: statement with no effect
/src/io.d: In function `C_bit_vector_reader':
/src/io.d:3155: warning: `ch' may be used uninitialized in this function
/src/io.d: In function `C_vector_reader':
/src/io.d:3245: warning: `el' may be used uninitialized in this function
/src/lisparit0.d: In function `divu_3232_3232_':
/src/lisparit0.d:1130: warning: statement with no effect
/src/lisparit0.d: In function `make_random_state':
/src/lisparit0.d:22269: warning: assignment makes integer from pointer without a cast
/src/pathname.d: In function `parse_logical_word':
/src/pathname.d:1027: warning: `ch' may be used uninitialized in this function
/src/rexx.d: In function `C_rexx_put':
/src/rexx.d:89: warning: `vargs' may be used uninitialized in this function
/src/spvw.d: In function `speicher_laenge':
/src/spvw.d:2364: warning: control reaches end of non-void function
/src/spvw.d: In function `alive':
/src/spvw.d:3556: warning: control reaches end of non-void function
/src/spvw.d: In function `gc_compact_from_varobject_page':
/src/spvw.d:5786: warning: `p2' may be used uninitialized in this function
/src/spvw.d:5787: warning: `l2' may be used uninitialized in this function
/src/spvw.d: In function `gc_compact_from_cons_page':
/src/spvw.d:5840: warning: `p2' may be used uninitialized in this function
/src/spvw.d:5841: warning: `l2' may be used uninitialized in this function
/src/spvw.d: In function `asciz_out':
/src/spvw.d:7859: warning: initialization discards `const' from pointer target type
/src/spvw.d: In function `main':
/src/spvw.d:9580: warning: variable `argv_memneed' may be clobbered by `longjmp' or `vfork'
/src/spvw.d:9582: warning: variable `argv_stackneed' may be clobbered by `longjmp' or `vfork'
/src/spvw.d: In function `loadmem':
/src/spvw.d:11526: warning: empty body in an else-statement
/src/stream.d: In function `make_file_stream':
/src/stream.d:8793: warning: `art' may be used uninitialized in this function
Additionaly for the -low and -00 versions:
/src/lisparit0.d: In function `I_to_UL':
/src/lisparit0.d:1954: warning: comparison is always 1 due to limited range of data type
/src/lisparit0.d: In function `I_to_L':
/src/lisparit0.d:2001: warning: comparison is always 1 due to limited range of data type
/src/lisparit0.d:2030: warning: comparison is always 0 due to limited range of data type
/src/lisparit0.d: In function `I_to_UQ':
/src/lisparit0.d:2092: warning: comparison is always 1 due to limited range of data type
/src/lisparit0.d: In function `LF_I_scale_float_LF':
/src/lisparit0.d:16261: warning: comparison is always 1 due to limited range of data type
/src/lisparit0.d:16288: warning: comparison is always 0 due to limited range of data type
Authors:
--------
Bruno Haible
Michael Stoll
Email: haible@ma2s2.mathematik.uni-karlsruhe.de
Amiga Port by:
--------------
Jörg Höhle
Email: Joerg.Hoehle@gmd.de