gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: GCL 2.6.7 on a Mac


From: Camm Maguire
Subject: [Gcl-devel] Re: GCL 2.6.7 on a Mac
Date: 30 Dec 2005 18:48:52 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

Thanks for your feedback, Matt!

I'm going to try to eliminate the gettext dependency and do the
/usr/local/bin powerpc-macosx.h patch for 2.6.8 before release.
Should be as simple as adding --with-included-gettext to the binutils
subconfigure commands in configure.in.  Will keep you posted.

Take care,

Matt Kaufmann <address@hidden> writes:

> Hi, Camm 
> 
> Thanks for your help!  I have successfully built GCL 2.6.8pre on my desktop
> Power Mac G5 running MAC OS 10.4.2, without fink, and have successfully run 
> the
> ACL2 regression suite.  I followed instructions for building GCL on Mac OS X
> based on Robert Krug's instructions, but modified according to your
> suggestions, that I have placed here
> 
> http://www.cs.utexas.edu/users/moore/acl2/v2-9/installation.html#Obtaining-GCL
> 
> -- more specifically, here:
> 
> http://www.cs.utexas.edu/users/moore/acl2/v2-9/installation.html#gcl-mac
> 
> The rest of this email is just about a couple of gettext issues, in case 
> you're
> interested.  Actually, since most ACL2 users use GCL only inside emacs, I'd be
> delighted if there were a way to build GCL without the dependency on gettext.
> Anyhow, please let me know if there's a more appropriate place to report these
> issues.
> 
> The first issue, shown below was solved by doing the build in a terminal,
> rather than in a shell running inside Carbon Emacs, where after
> 
> ./configure --disable-csharp
> 
> and then
> 
> make
> 
> I had gotten the following error.
> 
> ======================================================================
> 
> Making all in misc
> WARNING: Warnings can be ignored. :-)
> if test "emacs" != no; then \
>   set x; \
>   list='start-po.el po-mode.el po-compat.el'; for p in $list; do \
>     if test -f "$p"; then d=; else d="./"; fi; \
>     set x "$@" "$d$p"; shift; \
>   done; \
>   shift; \
>   EMACS="emacs" /bin/sh ../../build-aux/elisp-comp "$@" || exit 1; \
> else : ; fi
> Cannot open load file: /Applications/Downloaded 
> Software/Emacs.app/Contents/MacOS/libexec/fns-21.2.1.el
> make[3]: *** [elc-stamp] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all] Error 2
> make: *** [all-recursive] Error 1
> bbh:/Applications/Downloads/gettext/gettext-0.14.5 kaufmann$ 
> 
> ======================================================================
> 
> The other problem was that executables such as msgfmt were installed in
> /usr/local/bin, which wasn't on my path.  I'm not sure how to inform users
> that this needs to be put on $PATH (which fixed the problem).
> 
> Thanks --
> -- Matt
>    Cc: address@hidden, address@hidden, address@hidden,
>          Aurelien Chanudet <address@hidden>
>    From: Camm Maguire <address@hidden>
>    Date: 14 Dec 2005 11:04:42 -0500
>    User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
>    Content-Type: text/plain; charset=us-ascii
>    X-SpamAssassin-Status: No, hits=-2.4 required=5.0
>    X-UTCS-Spam-Status: No, hits=-128 required=180
> 
>    Greetings!  And thank you for this!
> 
>    My currently preferred solution for macosx is to use version 2.6.8pre
>    from cvs.  I know this sounds unstable, but this is merely a minor
>    bugfix branch against 2.6.7 (i.e. not the far more significantly
>    modified 2.7.0) and should be released shortly pending testing.  This
>    branch includes the fix for your tiny3.lisp example below, the fix to
>    plt and a few other files Robert mentions in his notes, and an upgrade
>    of Aurelien's macosx binutils support to the latest binutils version.
>    We've been caught by a macosx version change -- all works now on the
>    latest macosx, but for now we have no testbed for the older system.
> 
>    As for fink, this is a good point which warrants discussion.  I
>    thought it was virtually standard.  If not, I think we should make GCL
>    not depend on gettext if possible.  In either case, whatever
>    environment variables we decide are needed to build gcl on the mac
>    should be pushed to the various command lines via configure.
> 
>    For example, I use at present
> 
>    export PATH=/sw/bin:/sw/sbin:/usr/local/bin:$PATH # I don't think these 
> are actually
>    export LIBRARY_PATH=/sw/lib
>    export C_INCLUDE_PATH=/sw/include
>    export CPPFLAGS="-no-cpp-precomp"
> 
>    The first three are likely only needed for gettext.  The last was
>    needed to handle at least earlier versions of the apple gcc -- is this
>    still required?  Well, I just tried it and apparently it is not
>    required any longer on the latest macosx, but a proper treatment would
>    conditionalize it on the older apple gcc being present.
> 
>    So I guess my recommendation boils down to this, which might be
>    simplified further before 2.6.8 is released:
> 
>    With fink:
>    export PATH=/sw/bin:/sw/sbin:/usr/local/bin:$PATH # I don't think these 
> are actually
>    export LIBRARY_PATH=/sw/lib
>    export C_INCLUDE_PATH=/sw/include
>    export CVSROOT=:pserver:address@hidden:/sources/gcl
>    cvs -z9 -q co -d gcl-2.6.8pre -r Version_2_6_8pre
>    cd gcl-2.6.8pre && ./configure && make
> 
>    Without fink:
>    <robert's gettext instructions>
>    <robert's h/powerpc-macosx.defs patch>
>    export CVSROOT=:pserver:address@hidden:/sources/gcl
>    cvs -z9 -q co -d gcl-2.6.8pre -r Version_2_6_8pre
>    cd gcl-2.6.8pre && ./configure && make
> 
> 
>    Thoughts/suggestions most welcome.  Aurelien -- any ideas you have on
>    robustifying this before 2.6.8 is released are especially appreciated.
> 
>    Take care,
> 
> 
> 
> 
>    Matt Kaufmann <address@hidden> writes:
> 
>    > Howdy!
>    > 
>    > This email is in two parts.  For one, I thought I'd report that I have
>    > successfully followed instructions supplied by Robert Krug in order to 
> build
>    > GCL 2.6.7 on a Mac (OS X) -- in my case, a 1.67GHz PowerPC G4 notebook.  
> In
>    > case you're interested, below are his notes, which I plan to put up on 
> the web
>    > in a couple of days.  Do you imagine an update to GCL 2.6.7 soon that 
> makes the
>    > extra edits unnecessary?
>    > 
>    > Underneath Robert's notes, I have placed a file tiny3.lisp that I 
> derived from
>    > a failed certification using an ACL2 (development version as of 10/23) 
> built on
>    > that GCL on that Mac (books/workshops/1999/simulator/tiny.lisp).  I've 
> done
>    > LOTS of trimming of tiny.lisp to create tiny3.lisp, which causes the 
> error in
>    > GCL (i.e., without ACL2).  (The good news is that this seems to be the 
> only
>    > problem with the full regression suite.)  Here is a log showing the 
> error:
>    > 
>    > ======================================================================
>    > 
>    > 
> matt-kaufmanns-powerbook-g4-15:~/acl2/current/books/workshops/1999/simulator 
> kaufmann$ gcl
>    > GCL (GNU Common Lisp)  2.6.7 CLtL1    Dec 12 2005 12:23:55
>    > Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
>    > Binary License:  GPL due to GPL'ed components: (READLINE BFD UNEXEC)
>    > Modifications of this banner must retain notice of a compatible license
>    > Dedicated to the memory of W. Schelter
>    > 
>    > Use (help) to get some basic information on how to use GCL.
>    > 
>    > >(compile-file "tiny3.lisp")
>    > 
>    > Compiling tiny3.lisp.
>    > End of Pass 1.  
>    > End of Pass 2.  
>    > OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
>    > Finished compiling tiny3.lisp.
>    > #p"tiny3.o"
>    > 
>    > >(load "tiny3.o")
>    > 
>    > Loading tiny3.o
>    > error: unknown relocation entry
>    > 
>    > Error: Cannot get relocated section contents
>    > 
>    > Fast links are on: do (si::use-fast-links nil) for debugging
>    > Error signalled by EVAL.
>    > Broken at LOAD.  Type :H for Help.
>    > >>
>    > 
>    > ========================= Robert's notes =========================
>    > 
>    > The normal build process for GCL 2.6.7 on Mac OS X assumes that
>    > you have installed Fink on your Mac.  (If you do not know what
>    > this is, don't worry; you probably don't have it or want it.)
>    > Here is the process which worked on my Mac.
>    > 
>    > Building Gcl 2.6.7 On Os X 10.4.3 Without Fink
>    > 
>    > 1. First, get and install the gettext library.
>    >    You can get it at:
>    >    ftp.gnu.org/gnu/<Latest Version>
>    >    As of this writing, 0.14 was the latest version.
>    >    If you download a newer version you will need to adjust
>    >    the tar command below to refer to the file you downloaded.
>    > 
>    >    To Build It:
>    >    A. Untar it in a convenient location:   
>    >       tar zxf gettext-0.14.tar.gz
>    >       (If you downloaded this from within a web browser,
>    >        you may have to use
>    >        tar xf Gettext-0.14.Tar
>    >        instead.)
>    >    B. Connect to the gettext directory and configure:
>    >       cd gettext-0.14
>    >       ./configure --disable-csharp
>    >    C. Build and install the library:
>    >       make
>    >       sudo make install
>    > 
>    > 2. Build And Install Gcl.  (First, obtain from ftp://ftp.gnu/org/, cd 
> gnu, cd gcl,
>    >    get gcl-2.6.7.tar.gz, tar xfz gcl-2.6.7.tar.gz)
>    > 
>    >    A. cd <Gcl Directory>
>    > 
>    >    B. You Now Need To Patch Several Files:
>    >       h/powerpc-macosx.h
>    >       Replace the line:
>    >       extern char *my_sbrk(int incr);
>    >       with:
>    >       void *my_sbrk(int incr);
>    > 
>    >       o/unexmacosx.c
>    >       Replace the line:
>    >       char *my_sbrk (int incr)
>    >       with:
>    >       void *my_sbrk (int incr)
>    > 
>    >       h/powerpc-macosx.defs
>    >       Replace the line:
>    >       LIBS := `echo $(LIBS) | sed -e 's/-lncurses/ /'` 
> /sw/lib/libintl.dylib
>    >       With:
>    >       LIBS := `echo $(LIBS) | sed -e 's/-lncurses/ /'` 
> /usr/local/lib/libintl.dylib
>    > 
>    >    C. Configure and start to build gcl
>    >       ./configure
>    >       make
>    > 
>    >       This Make Will Fail, But Do Not Fear!
>    > 
>    >    D.  Patch o/plt.h
>    >        Remove the underscores in front of
>    >        _getc and _putc
>    >  
>    >    E. Build and install gcl
>    >       make
>    >       sudo make install
>    > 
>    > ============================ file tiny3.lisp ============================
>    > 
>    > (in-package "USER")
>    > 
>    > (defvar *user-stobj-alist*)
>    > 
>    > (DEFUN PROGC (ST)
>    >   (THE (UNSIGNED-BYTE 10)
>    >     (AREF (THE (SIMPLE-ARRAY (UNSIGNED-BYTE 10) (1)) (SVREF ST 0)) 0)))
>    > (DEFUN UPDATE-PROGC (V ST)
>    >   (DECLARE (TYPE (UNSIGNED-BYTE 10) V))
>    >   (PROGN
>    >     (SETF (AREF (THE (SIMPLE-ARRAY (UNSIGNED-BYTE 10) (1))
>    >            (SVREF ST 0))
>    >          0)
>    >    (THE (UNSIGNED-BYTE 10) V))
>    >     ST))
>    > (DEFUN MEMI (I ST)
>    >   (DECLARE (TYPE (INTEGER 0 268435455) I))
>    >   (THE (SIGNED-BYTE 32)
>    >     (AREF (THE (SIMPLE-ARRAY (SIGNED-BYTE 32) (*)) (SVREF ST 1))
>    >    (THE (INTEGER 0 268435455) I))))
>    > (DEFUN UPDATE-MEMI (I V ST)
>    >   (DECLARE (TYPE (INTEGER 0 268435455) I) (TYPE (SIGNED-BYTE 32) V))
>    >   (PROGN
>    >     (SETF (AREF (THE (SIMPLE-ARRAY (SIGNED-BYTE 32) (*))
>    >            (SVREF ST 1))
>    >          (THE (INTEGER 0 268435455) I))
>    >    (THE (SIGNED-BYTE 32) V))
>    >     ST))
>    > (DEFUN DTOS (ST)
>    >   (THE (UNSIGNED-BYTE 10)
>    >     (AREF (THE (SIMPLE-ARRAY (UNSIGNED-BYTE 10) (1)) (SVREF ST 2)) 0)))
>    > (DEFUN UPDATE-DTOS (V ST)
>    >   (DECLARE (TYPE (UNSIGNED-BYTE 10) V))
>    >   (PROGN
>    >     (SETF (AREF (THE (SIMPLE-ARRAY (UNSIGNED-BYTE 10) (1))
>    >            (SVREF ST 2))
>    >          0)
>    >    (THE (UNSIGNED-BYTE 10) V))
>    >     ST))
>    > (DEFUN CTOS (ST)
>    >   (THE (UNSIGNED-BYTE 10)
>    >     (AREF (THE (SIMPLE-ARRAY (UNSIGNED-BYTE 10) (1)) (SVREF ST 3)) 0)))
>    > (DEFUN UPDATE-CTOS (V ST)
>    >   (DECLARE (TYPE (UNSIGNED-BYTE 10) V))
>    >   (PROGN
>    >     (SETF (AREF (THE (SIMPLE-ARRAY (UNSIGNED-BYTE 10) (1))
>    >            (SVREF ST 3))
>    >          0)
>    >    (THE (UNSIGNED-BYTE 10) V))
>    >     ST))
>    > 
>    > (defmacro Int32 (x) `(the   (signed-byte 32) ,x))
>    > (defmacro Nat10 (x) `(the (unsigned-byte 10) ,x))
>    > (defmacro MAX_NAT<10>   ()  1023)
>    > 
>    > (defmacro fix|10| (x)
>    >   `(Nat10 (logand (MAX_NAT<10>) ,x)))
>    > 
>    > (defmacro +<32> (x y)
>    >   `(Int32 (+ ,x ,y)))
>    > 
>    > (defmacro +|10| (x y)
>    >   `(Nat10 (logand (+<32> ,x ,y) (MAX_NAT<10>))))
>    > 
>    > (defun pushus (val st)
>    >   (declare (type (signed-byte 32) val))
>    >   (let ((dtos (dtos st)))
>    >     (declare (type (unsigned-byte 10) dtos))
>    >     (let ((st (update-memi dtos (Int32 val) st)))
>    >       (update-dtos (+|10| dtos -1) st))))
>    > 
>    > (defun next (st)
>    >   (let ((progc (progc st))
>    >  (dtos  (dtos st))
>    >  (ctos  (ctos st)))
>    >     (declare (type (unsigned-byte 10) progc dtos ctos))
>    > 
>    >     (let ((ins (memi progc st)))
>    >       (declare (type (signed-byte 32) ins))
>    > 
>    >       (case ins
>    > 
>    >  (2 (let ((st (update-progc (+|10| progc 2) st)))
>    >      (pushus (memi (+|10| progc 1) st) st)))
>    > 
>    >  (4 (update-progc (fix|10| (memi (+|10| progc 1) st)) st))
>    > 
>    >  (5 (let ((nprogc (if (= (memi (+|10| dtos 1) st) 0)
>    >                       (fix|10| (memi (+|10| progc 1) st))
>    >                     (+|10| progc 2))))
>    >       (declare (type (unsigned-byte 10) nprogc))
>    >       (let ((st (update-progc nprogc st)))
>    >         (update-dtos (+|10| dtos 1) st))))
>    > 
>    >  (7 (let ((nadd (fix|10| (memi (+|10| ctos 1) st))))
>    >       (declare (type (unsigned-byte 10) nadd))
>    >       (let ((st (update-progc nadd st)))
>    >        (update-ctos (+|10| ctos 1) st))))
>    > 
>    >  (9 (let ((st (update-progc (+|10| progc 1) st)))
>    >      (pushus (memi (+|10| dtos 1) st) st)))
>    > 
>    >  (otherwise st)))))
>    > 
>    > ======================================================================
>    > 
>    > Thanks --
>    > -- Matt
>    > 
>    > 
>    > 
> 
>    -- 
>    Camm Maguire                                               address@hidden
>    ==========================================================================
>    "The earth is but one country, and mankind its citizens."  --  Baha'u'llah
> 
> 
> 
> 

-- 
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]