gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Re: gcl-2.5.0


From: Camm Maguire
Subject: Re: [Gcl-devel] Re: gcl-2.5.0
Date: 10 Aug 2002 14:39:11 -0400

Greetings, and thanks for your report!

With a fresh cvs checkout, and default ./configure && make (on my box
uses libbfd, but should also work without), your tests below work
fine:

=============================================================================
intech19:/fix/t2/camm/b/gcl$ unixport/saved_gcl
GCL (GNU Common Lisp)  Version(2.5.0) Sat Aug 10 13:43:25 EDT 2002
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
start address -T 0x841f8c0 Finished loading gazonk0.o
#<compiled-function FOO>

>(by)
intech19:/fix/t2/camm/b/gcl$ unixport/saved_gcl
GCL (GNU Common Lisp)  Version(2.5.0) Sat Aug 10 13:43:25 EDT 2002
Licensed under GNU Library General Public License
Contains Enhancements by W. Schelter

>(compile-file "foo.lisp")

The source file foo.lisp is not found.
NIL

>(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
start address -T 0x841f8c0 Finished loading ../foo.o
648

>(by)
=============================================================================

A couple of thoughts:

1) Latest stable release is 2.4.3.  Should not affect this, but has
   other bug fixes incorporated.
2) You use 2.4.0 both times in your test below?
3) A recompile may be necessary if your new libc labels setjmp
   differently.  Another advantage of using the debian package
   (i.e. to take advantage of the dependecy info), but actually right
   now the libc dependency is a >= so it wouldn't have helped at
   present.  I'll try to remember to add a bidirectional libc
   dependency to the package, so that your upgrade would bring along
   an appropriate gcl automatically in the future.  My guess is that
   new compiles put in _setjmp with the new libc, but your gcl was
   built with a libc that referred to setjmp.  You can nm your
   saved_gcl to confirm.  So recompiling any stable release after
   2.4.0, or a cvs snapshot, seems like it will work for you.
4) Did you mention that a cvs snapshot passed the acl2 regression
   tests?  (with your common lisp patch)? Or is this just a particular
   binary build question? I'd like to know if current
   gcl breaks acl2.  I'll also try to add an ANSI_LISP C define to
   escape the common-lisp package setup.
5) If acl2 does pass, my guess is that it will now pass on at elast 9
   of the Debian architecutres, with all 11 in near sight. Is this
   important to you?  Is acl2 something that a general audience might
   find useful?  Have you considered packaging it for Debian?  If it
   were setup in this way, we could test acl2 compiles with gcl
   upgrades periodically, as we do now with maxima.
6) Is gcl central to acl2 in some way?  Do you prefer it to the other
   lisps?  If so why?  If not, why are you interested in it?  Just
   trying to make sure gcl is providing some service, and to make sure
   we preserve that service as we go forward.

Take care,

Matt Kaufmann <address@hidden> writes:

> 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
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]