home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / clisp / doc / install.txt < prev    next >
Text File  |  1977-12-31  |  14KB  |  309 lines

  1. Installation on Amiga (AmigaDOS):
  2. ---------------------------------
  3.  
  4. 1. Install a GNU GCC development platform
  5.  
  6.    I don't believe CLISP can be compiled with anything else than GCC
  7.    on the Amiga. CLISP source heavily stresses any C compiler.
  8.  
  9.    I managed to compile early versions of CLISP on my stock B2000 with 5MB
  10.    of RAM and gcc-1.40, throwing every program out of the machine (including
  11.    RAM: and LoadWB) and running each compiler stage separately. Luckily,
  12.    when I hit GCC bugs, newer bug-freed versions were available. Compilation
  13.    of CLISP has lead to several bug-reports in gnu.gcc.bugs.
  14.  
  15. 2. Install Amiga includes
  16.  
  17.    They are copyrighted by Commodore-Amiga and can be obtained on the Amiga
  18.    Developer CD or on Fred Fish CDs. See your Amiga FAQ.
  19.  
  20. 3. Make directory trees
  21.  
  22.    Leave source in src/ (only *.d, *.h and *.lsp files are needed) and
  23.    utilities in utils/ (only comment5, ansidecl and cvtmsgs are needed).
  24.    Choose the version you want to build (see README.Amiga or README) and
  25.    create directories like make.high/, make.low/ and make.wide/ at the same
  26.    level as src/.
  27.  
  28. 4. IxPrefs and ixemul.library `/' pathname translation
  29.  
  30.    In order to find include files located in /src/ relatively to the make.*
  31.    directory, ixemul.library shouldn't translate /. As sh (which is called
  32.    by GNU-make) doesn't seem to be able to handle this situation, a
  33.    workaround is to assign src: and utils: to the src/ and utils/ directories
  34.    respectively.
  35.  
  36. 5. Check your stack sizes
  37.  
  38.    gcc-cc1 uses up to 380000 bytes of stack in EVAL.D.
  39.    gcc-cpp and gcc-as get along with 20000 bytes.
  40.    gcc-ld requires 180000 bytes.
  41.  
  42.    This is my observed stack usage relative to GCC-2.5.8 and can increase
  43.    when adding new features to CLISP. If your make program cannot set stack
  44.    sizes, you'll have to run everything with the maximum stack. I have my
  45.    own make program which recognizes and honours the stack command.
  46.  
  47. 6. Make the clisp support library found in amiga/jchlib/
  48.  
  49.    This is a micro C startup library containing the bare minimum to start a
  50.    program from CLI or WorkBench, setjmp() and strlen(). It's used by CLISP
  51.    but could be by other programs too. It doesn't require ixemul.library.
  52.    From WorkBench, it opens the window specified by the WINDOW tooltype,
  53.    initializes argv[] with ARGS if present and supports project icons
  54.    (currently all in the same directory only).
  55.  
  56.    Compiling CLISP without using my library has never been tested.
  57.  
  58. 7. Makefile
  59.  
  60.    Due to lack of RAM (I have 10 MB :-), big CLISP source files and the huge
  61.    stack needed by cc1, it was not possible for me to use a generic Makefile
  62.    and simply run gcc with a stack set to 380000 bytes. That's why I'm using
  63.    a private make which nobody but I has. It recognizes the stack command.
  64.    Furthermore my Makefile calls each compiler stage directly, saving the
  65.    space for the gcc driver.
  66.  
  67.    Now, with a normal (GNU-)make, I nevertheless managed to build CLISP by
  68.    running VMM, a virtual memory manager and setting the maximal stack
  69.    before starting make. It's a huge waste of resources and won't run in a
  70.    10MB system without virtual memory, but you could also try this. Link or
  71.    copy the /bin/true command to make.*/stack so that /bin/sh will find a
  72.    stack command (it's called by the Makefile). If /bin/sh can't find cc1,
  73.    cpp etc. because they are deep inside the gcc-lib hierarchy, set a local
  74.    variable PATH to all the paths. Make and thus sh will inherit this
  75.    variable:
  76.  
  77.     set PATH /gnu/bin:/gnu/lib/gcc-lib/m68k-cbm-amigados/2.x.x:/C:/utils/:.
  78.  
  79. 8. Edit
  80.  
  81.     make.*/Makefile
  82.  
  83.    according to your choices and tastes. By default, you'll make the
  84.    international (well, english, french and german) version of CLISP, which
  85.    requires more space than a single language one that can be built by
  86.    adding one of -DENGLISH, -DFRANCAIS or -DDEUTSCH flags to the compiler.
  87.    See src/lispbibl.d for everything that can be defined. The amiga or AMIGA
  88.    define serves to recognize the Amiga (don't set them for now under
  89.    Amiga-UNIX). Interesting preprocessor flags include AMIGA3000, MC680Y0
  90.    for 68020 or better (implied by AMIGA3000), MC68000 for 68000 only, and
  91.    WIDE for 64 bit ints (for 32 bit clean pointers).
  92.  
  93.    Extensions like gettext and readline cannot currently be added as they
  94.    use stdio and malloc whereas CLISP uses the low-level and unbuffered
  95.    dos.library routines for i/o and AllocMem() etc. for all memory.  Don't
  96.    mess with it. Using UNIX-like (open) or ANSI (fopen) stdio would require
  97.    a large rewrite of several source files.
  98.  
  99. 9. Edit
  100.  
  101.     src/config.lsp
  102.     src/timezone.lsp
  103.  
  104.    See README for the one line to modify in timezone.lsp. In config.lsp,
  105.    you may wish to set your favourite editor or restrict the load-path.
  106.  
  107. 10. Remove
  108.  
  109.    every $ from the file src/ari68020.mit.d and rename it src/ari68020.d
  110.     sed > ari68020.d -e "s/$//" ari68020.mit.d
  111.    Quote $ according to your shell conventions and sed version.
  112.  
  113. 11. Copy,
  114.  
  115.    rename or link src/ari68000.mit.d to src/ari68000.d
  116.  
  117. 12. Type
  118.  
  119.     make    (while in a make.* directory)    (-low)
  120.     make HIGH=1                (-high)
  121.     make WIDE=1                (-wide)
  122.  
  123.    and wait for things to happen. One night on a B2000, more than one hour
  124.    on an A4000/40.
  125.  
  126.    Hint: use FIFO: (by Matt Dillon) in order to get a logfile.
  127.     NewShell FIFO:shell/rwkecs
  128.     Run >nil: remcli shell
  129.     Run >nil: cat FIFO:shell/rmt >>compile.log
  130.     echo "Log going into compile.log."
  131.    Or use KingCon, ConsoleBuffer or else the Recorder program from the
  132.    hacks204 archive by Andy Finkel (doesn't seem to work with 3.0).
  133.  
  134. 13. Patches
  135.  
  136.    Gcc-2.3.3 -O2 -fomit-frame-pointer put several bugs in the compiler
  137.    output. I previously corrected two of them by hand-patching the assembly
  138.    files. Gcc-2.5.7 produced correct output but for 68020 and above machines
  139.    only. Gcc-2.5.8 produces few bugs and only in the -DWIDE version. Beta
  140.    versions of gcc-2.6.0 were not stable enough for compilation of the
  141.    -DWIDE version. I'm using Gcc-2.5.8.
  142.  
  143.    Here's what to patch in control.s:_C_go (before the second eql):
  144.         movel a5@(-12),sp@-
  145.         movel a5@(-16),sp@-
  146. #APP
  147. | Should only be incremented once!
  148. |       movel d1,a2
  149. |       addql #8,d1
  150. #NO_APP
  151.         movel d1,a2
  152.         addql #8,d1
  153.         movel a2@(4),sp@-
  154.         movel a2@,sp@-
  155.         movel d1,a5@(-28)
  156.         jbsr _eql
  157.  
  158.    Here's a patch for predtype.s:_equalp (case_string dotimespL loop):
  159.     movel a5@(-32),d1
  160.     movel d1,a1
  161.     addql #1,d1
  162.     moveb a1@,d0
  163. #APP
  164. | Save incremented address!
  165.     movel d1,a5@(-32)
  166. #NO_APP
  167.     movel d0,sp@-
  168.     jbsr a6@
  169.  
  170.    Nobody gurantees there aren't more bugs not uncovered by the tests.
  171.  
  172. 14. Type
  173.  
  174.     make interpreted.mem    a memory image with everything
  175.                  uncompiled (size 1.7MB)
  176.     make lispinit.mem    makes all *.fas files and
  177.                  a memory image with everything
  178.                  compiled (size 500KB, 1MB for wide version)
  179.    The second step is the most time consuming.
  180.  
  181. 15. A test-suite
  182.  
  183.    The directory clisp/tests/ contains a large number of test files. While in
  184.    CLISP, do
  185.  
  186.     (cd "/tests/")
  187.     (load "tests")
  188.     (run-all-tests)
  189.  
  190.    and have a look at possibly resulting .erg files. Only alltest.erg and
  191.    array.erg should remain and report some limit or fixnum differences.
  192.  
  193. 16. Documentation
  194.  
  195.    Unluckily for an Amiga-only site, I generated the .man file on a UNIX
  196.    box and displayed it in an EMACS buffer (M-x man) from where I saved it.
  197.    I'd like to know about better ways to do this.
  198.  
  199.  
  200. 17. Known compiler warnings
  201.  
  202.    This gives you an idea of what not to look at. Some warnings, especially
  203.    in LISPARIT.D vary among the versions.
  204.  
  205. /src/array.d: In function `C_make_array':
  206. /src/array.d:2445: warning: `fillpointer' may be used uninitialized in this function
  207. /src/array.d: In function `C_adjust_array':
  208. /src/array.d:2742: warning: `fillpointer' may be used uninitialized in this function
  209. /src/charstrg.d: In function `test_index_arg':
  210. /src/charstrg.d:1418: warning: `i' may be used uninitialized in this function
  211. /src/charstrg.d: In function `test_string_limits':
  212. /src/charstrg.d:1508: warning: `start' may be used uninitialized in this function
  213. /src/charstrg.d:1509: warning: `end' may be used uninitialized in this function
  214. /src/charstrg.d: In function `test_1_stringsym_limits':
  215. /src/charstrg.d:1587: warning: `start' may be used uninitialized in this function
  216. /src/charstrg.d:1588: warning: `end' may be used uninitialized in this function
  217. /src/charstrg.d: In function `test_2_stringsym_limits':
  218. /src/charstrg.d:1659: warning: `start1' may be used uninitialized in this function
  219. /src/charstrg.d:1660: warning: `end1' may be used uninitialized in this function
  220. /src/charstrg.d:1689: warning: `start2' may be used uninitialized in this function
  221. /src/charstrg.d:1690: warning: `end2' may be used uninitialized in this function
  222. /src/charstrg.d: In function `C_substring':
  223. /src/charstrg.d:2322: warning: `start' may be used uninitialized in this function
  224. /src/charstrg.d:2323: warning: `end' may be used uninitialized in this function
  225. /src/control.d: In function `C_tagbody':
  226. /src/control.d:1439: warning: variable `body' may be clobbered by `longjmp' or `vfork'
  227. /src/eval.d: In function `invoke_handlers':
  228. /src/eval.d:686: warning: variable `other_ranges' may be clobbered by `longjmp' or `vfork'
  229. /src/eval.d:689: warning: variable `FRAME' may be clobbered by `longjmp' or `vfork'
  230. /src/eval.d:702: warning: variable `i' may be clobbered by `longjmp' or `vfork'
  231. /src/eval.d: In function `funcall_iclosure':
  232. /src/eval.d:2371: warning: argument `closure' may be clobbered by `longjmp' or `vfork'
  233. /src/eval.d:2372: warning: argument `args_pointer' may be clobbered by `longjmp' or `vfork'
  234. /src/eval.d:2373: warning: argument `argcount' may be clobbered by `longjmp' or `vfork'
  235. /src/eval.d: In function `eval':
  236. /src/eval.d:2849: warning: variable `_SetSignal_re' may be clobbered by `longjmp' or `vfork'
  237. /src/eval.d:2849: warning: variable `_n1' may be clobbered by `longjmp' or `vfork'
  238. /src/eval.d:2846: warning: argument `form' may be clobbered by `longjmp' or `vfork'
  239. /src/eval.d: In function `eval_no_hooks':
  240. /src/eval.d:2906: warning: argument `form' may be clobbered by `longjmp' or `vfork'
  241. /src/eval.d: In function `interpret_bytecode_':
  242. /src/eval.d:5750: warning: variable `closure' may be clobbered by `longjmp' or `vfork'
  243. /src/eval.d:5755: warning: variable `byteptr' may be clobbered by `longjmp' or `vfork'
  244. /src/eval.d:5763: warning: variable `closureptr' may be clobbered by `longjmp' or `vfork'
  245. /src/eval.d:5746: warning: argument `codeptr' may be clobbered by `longjmp' or `vfork'
  246. /src/hashtabl.d: In function `hashcode':
  247. /src/hashtabl.d:438: warning: statement with no effect
  248. /src/hashtabl.d: In function `C_class_tuple_gethash':
  249. /src/hashtabl.d:1326: warning: statement with no effect
  250. /src/io.d: In function `C_bit_vector_reader':
  251. /src/io.d:3155: warning: `ch' may be used uninitialized in this function
  252. /src/io.d: In function `C_vector_reader':
  253. /src/io.d:3245: warning: `el' may be used uninitialized in this function
  254. /src/lisparit0.d: In function `divu_3232_3232_':
  255. /src/lisparit0.d:1130: warning: statement with no effect
  256. /src/lisparit0.d: In function `make_random_state':
  257. /src/lisparit0.d:22269: warning: assignment makes integer from pointer without a cast
  258. /src/pathname.d: In function `parse_logical_word':
  259. /src/pathname.d:1027: warning: `ch' may be used uninitialized in this function
  260. /src/rexx.d: In function `C_rexx_put':
  261. /src/rexx.d:89: warning: `vargs' may be used uninitialized in this function
  262. /src/spvw.d: In function `speicher_laenge':
  263. /src/spvw.d:2364: warning: control reaches end of non-void function
  264. /src/spvw.d: In function `alive':
  265. /src/spvw.d:3556: warning: control reaches end of non-void function
  266. /src/spvw.d: In function `gc_compact_from_varobject_page':
  267. /src/spvw.d:5786: warning: `p2' may be used uninitialized in this function
  268. /src/spvw.d:5787: warning: `l2' may be used uninitialized in this function
  269. /src/spvw.d: In function `gc_compact_from_cons_page':
  270. /src/spvw.d:5840: warning: `p2' may be used uninitialized in this function
  271. /src/spvw.d:5841: warning: `l2' may be used uninitialized in this function
  272. /src/spvw.d: In function `asciz_out':
  273. /src/spvw.d:7859: warning: initialization discards `const' from pointer target type
  274. /src/spvw.d: In function `main':
  275. /src/spvw.d:9580: warning: variable `argv_memneed' may be clobbered by `longjmp' or `vfork'
  276. /src/spvw.d:9582: warning: variable `argv_stackneed' may be clobbered by `longjmp' or `vfork'
  277. /src/spvw.d: In function `loadmem':
  278. /src/spvw.d:11526: warning: empty body in an else-statement
  279. /src/stream.d: In function `make_file_stream':
  280. /src/stream.d:8793: warning: `art' may be used uninitialized in this function
  281.  
  282.    Additionaly for the -low and -00 versions:
  283. /src/lisparit0.d: In function `I_to_UL':
  284. /src/lisparit0.d:1954: warning: comparison is always 1 due to limited range of data type
  285. /src/lisparit0.d: In function `I_to_L':
  286. /src/lisparit0.d:2001: warning: comparison is always 1 due to limited range of data type
  287. /src/lisparit0.d:2030: warning: comparison is always 0 due to limited range of data type
  288. /src/lisparit0.d: In function `I_to_UQ':
  289. /src/lisparit0.d:2092: warning: comparison is always 1 due to limited range of data type
  290. /src/lisparit0.d: In function `LF_I_scale_float_LF':
  291. /src/lisparit0.d:16261: warning: comparison is always 1 due to limited range of data type
  292. /src/lisparit0.d:16288: warning: comparison is always 0 due to limited range of data type
  293.  
  294.  
  295. Authors:
  296. --------
  297.  
  298.     Bruno Haible            
  299.     Michael Stoll
  300.  
  301. Email: haible@ma2s2.mathematik.uni-karlsruhe.de
  302.  
  303. Amiga Port by:
  304. --------------
  305.  
  306.     Jörg Höhle
  307.  
  308. Email: Joerg.Hoehle@gmd.de
  309.