[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: gcl-2.5.0
From: |
Matt Kaufmann |
Subject: |
[Gcl-devel] Re: gcl-2.5.0 |
Date: |
Sat, 10 Aug 2002 10:32:10 -0500 (CDT) |
Hi --
Thank you for the quick reply. The following example illustrates the problem.
Gordon pointed out to me that perhaps we simply need to compile GCL 2.4.0 for
Debian 3.0 (it was compiled using an earlier version). I'm just a GCL user --
in fact I've never even compiled GCL myself -- so I may have missed something
basic. Please let me know if you need more info.
odin.cs.utexas.edu% cat foo.lisp
(in-package "USER")
(defun foo (name)
(with-open-file
(file name :direction :input)
nil))
odin.cs.utexas.edu% gcl-2.4.0
GCL (GNU Common Lisp) Version(2.4.0) Mon Oct 29 16:42:35 CST 2001
Licensed under GNU Library General Public License
Contains Enhancements by W. Schelter
>(compile (defun foo (name)
(with-open-file
(file name :direction :input)
nil)))
Compiling gazonk0.lsp.
End of Pass 1.
End of Pass 2.
OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
Finished compiling gazonk0.lsp.
Loading gazonk0.o
symbol "_setjmp" is not in base imagestart address -T 82905e0 Finished loading
gazonk0.o
#<compiled-function FOO>
>(bye)
odin.cs.utexas.edu% gcl-2.4.0
GCL (GNU Common Lisp) Version(2.4.0) Mon Oct 29 16:42:35 CST 2001
Licensed under GNU Library General Public License
Contains Enhancements by W. Schelter
>(compile-file "foo.lisp")
Compiling foo.lisp.
End of Pass 1.
End of Pass 2.
OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
Finished compiling foo.lisp.
#p"foo.o"
>(load "foo.o")
Loading foo.o
symbol "_setjmp" is not in base imagestart address -T 82905e0 Finished loading
foo.o
688
>(bye)
odin.cs.utexas.edu% nm foo.o
U Cnil_body
00000000 t L1
U Lclose
00000010 d Lnk2
00000250 t LnkT2
00000000 d VVi
U _setjmp
U bds_top
U call_or_link
U do_init
U endp1
U frs_limit
U frs_overflow
U frs_top
U ihs_top
U in_signal_handler
00000270 T init_code
U lex_env
U make_cons
U nlj_active
U nlj_fr
U nlj_tag
U unwind
U vs_base
U vs_limit
U vs_overflow
U vs_top
odin.cs.utexas.edu% nm --dynamic /lib/libc* | grep setjmp
000291d0 T __sigsetjmp
000292a0 T _setjmp
00029260 T setjmp
000704a8 T __setjmp
00052a18 T _setjmp
000704a8 T __setjmp
00052a18 T _setjmp
000291d0 T __sigsetjmp
000292a0 T _setjmp
00029260 T setjmp
nm: /lib/libc5-compat: Is a directory
odin.cs.utexas.edu%
-- Matt
Cc: address@hidden, address@hidden, address@hidden
From: Camm Maguire <address@hidden>
Date: 10 Aug 2002 10:24:00 -0400
Greetings!
Matt Kaufmann <address@hidden> writes:
> Hi, Gordon --
>
> Thanks for the attempt. I'm afraid there is still a problem. GCL 2.5.0
died
> with "Illegal instruction" when loading a file. Below is a transcript
showing
> the unsuccessful attempt with GCL 2.5.0 followed by a corresponding
successful
> attempt using GCL 2.4.0.
>
> Let me know if you'd like me to try to construct a smaller example.
>
> -- Matt
> glenmorangie.cs.utexas.edu% gcl-2.5.0
> GCL (GNU Common Lisp) Version(2.5.0) Fri Aug 9 15:33:00 CDT 2002
> Licensed under GNU Library General Public License
> Contains Enhancements by W. Schelter
> Loading init.lsp
> Loading acl2r.lisp
> Finished loading acl2r.lisp
> Loading acl2-init.lisp
> Loading acl2.lisp
> Loading acl2-fns.lisp
> Finished loading acl2-fns.lisp
> Compiling acl2-fns.lisp.
> End of Pass 1.
>
> ;; Note: Tail-recursive call of GET-TYPE-FROM-DCLS was replaced by
iteration.
> ;; Note: Tail-recursive call of COLLECT-TYPES was replaced by iteration.
> ;; Note: Tail-recursive call of REV1@ was replaced by iteration.
> ;; Note: Tail-recursive call of ACL2-READ-CHARACTER-STRING was replaced by
iteration.[GC for 50 RELOCATABLE-BLOCKS pages..(T=1).GC finished]
>
> End of Pass 2.
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling acl2-fns.lisp.
> Loading acl2-fns.o
> start address -T 0x8315000 Finished loading acl2-fns.o
> [GC for 33 SYMBOL pages..(T=1).GC finished]
> Finished loading acl2.lisp
> Finished loading acl2-init.lisp
> Loading enable-eval.lisp
> Disabling evaluation inside breaks.
> Finished loading enable-eval.lisp
> Finished loading init.lsp
>
> >(load "axioms.lisp")
>
> Loading axioms.lisp
> Illegal instruction
> glenmorangie.cs.utexas.edu% gcl-2.4.0
> GCL (GNU Common Lisp) Version(2.4.0) Mon Oct 29 16:42:35 CST 2001
> Licensed under GNU Library General Public License
> Contains Enhancements by W. Schelter
> Loading init.lsp
> Loading acl2r.lisp
> Finished loading acl2r.lisp
> Loading acl2-init.lisp
> Loading acl2.lisp
> Loading acl2-fns.lisp
> Finished loading acl2-fns.lisp
> Compiling acl2-fns.lisp.
> End of Pass 1.
>
> ;; Note: Tail-recursive call of GET-TYPE-FROM-DCLS was replaced by
iteration.
> ;; Note: Tail-recursive call of COLLECT-TYPES was replaced by iteration.
> ;; Note: Tail-recursive call of REV1@ was replaced by iteration.
> ;; Note: Tail-recursive call of ACL2-READ-CHARACTER-STRING was replaced by
iteration.
> End of Pass 2.
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling acl2-fns.lisp.
> Loading acl2-fns.o
> symbol "_setjmp" is not in base imagestart address -T 82ea000 Finished
loading acl2-fns.o
^^^^^^
Here is the problem. It exists in 2.4.0 as well as the current cvs,
both of which are apparently using the original custom relocation
code as opposed to libbfd. libbfd would stop here too, but with
clearer output, and a genuine job stopping error.
Luckily, this is rather easy to fix, though I'd like to trace its
origin rather than just hacking around it. libc labels is setjmp
symbol appended with a @@GLIBC.., while the compiler puts a plain
setjmp reference into compiled objects. ldso is smart enough to
figure this out, and Dr. Schelter had worked around one known case in
the custom relocation code you are apparently using. Unfortunately,
wither newer libc, setjmp, _setjmp, __sigsetjmp, ... are all appearing
at times, and need to be mapped to the same place. The current libbfd
strategy is to map *each* symbol with a @@GLIBC to its plain
counterpart, which may or may not catch the example you have. You can
check out 'nm acl2-fn.o' and 'nm --dynamic /lib/libc...... |grep
setjmp' to get an idea.
Going forward, I'd ideally like the following:
1) the full configure and make output
2) some small stand-alone lisp which shows the problem, maybe just
acl2-fns.lisp if it can be compiled with no external references.
3) the output of the two nm commands listed above.
If you'd like to try your hand at a patch, the relevant files are
1) rsym-elf.c and sfaslelf.c for the custom relocation
2) sfasli.c and sfaslbfd.c for the bfd relocations.
Lastly, if you don't use save-image and use the system ld to link the
final image, you can configure to use dlopen, but this is 'deprecated'
:-).
Take care,
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=1).GC finished]
> Finished loading acl2.lisp
> Finished loading acl2-init.lisp
> Loading enable-eval.lisp
> Disabling evaluation inside breaks.
> Finished loading enable-eval.lisp
> Finished loading init.lsp
>
> >(load "axioms.lisp")
>
> Loading axioms.lisp
> [GC for 33 SYMBOL pages..(T=1).GC finished]
> [GC for 200 CONS pages..(T=2).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=1).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=1).GC finished]
> [GC for 200 CONS pages..(T=2).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=2).GC finished]
> [GC for 200 CONS pages..(T=2).GC finished]
> [GC for 200 CONS pages..(T=2).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=3).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=2).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=2).GC finished]
> Finished loading axioms.lisp
> T
>
> >
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah