Gaby,

On Tue, 12 Sep 2006 I wrote:
> |
> | I don't have access to a mac right now, but I can confirm
> | that the following commands build Axiom just fine on
> | axiom-developer.org with both noweb and gcl pre-installed.
>

Here is another report:

I have successfully built the Axiom Silver build.improvements
branch on a Sun 280R (sparc, 64bit) Solaris 10 06/06 system with
a full GNU toolchain installed.

bash-2.05$ gcc --version
gcc (GCC) 4.1.1

bash-2.05$ ld --version
GNU ld version 2.17

bash-2.05$ make --version
GNU Make 3.80

bash-2.05$ awk --version
GNU Awk 3.1.5

etc.

I built and installed GCL separately from the Axiom build.
I really like this option. :-) I think it makes the whole
build easier.

bash-2.05$ svn co https://svn.sourceforge.net/svnroot/axiom/ \
             branches/build-improvements axiom.build-improvements

bash-2.05$ svn co https://svn.sourceforge.net/svnroot/axiom/ \
         branches/build-improvements axiom.build-improvements

bash-2.05$ tar xzvf axiom.build-improvements/zips/gcl-2.6.8pre.tgz

But it wasn't quite so easy... A patch is necessary to build GCL.

bash-2.05$ cp gcl-2.6.8pre gcl-2.6.8pre_orig

----------
bash-2.05$ diff -Naur gcl-2.6.8pre_orig gcl-2.6.8pre
diff -Naur gcl-2.6.8pre_orig/h/solaris.defs gcl-2.6.8pre/h/solaris.defs
--- gcl-2.6.8pre_orig/h/solaris.defs    2004-07-15 12:28:44.000000000
-0400
+++ gcl-2.6.8pre/h/solaris.defs 2006-09-12 13:15:58.280649000 -0400
@@ -1,15 +1,18 @@

-# notes for redhat 6.0
-#  the configure should select the compiler
GCC=/usr/bin/i386-glibc20-linux-gcc
-#  However for the gcl-tk directory, you must use plain 'gcc' since
-#  that must link with the tcl tk libs which have been compiled with
it.
-#  so after configure change to GCC=gcc in the gcl-tk/makefile
+# notes for Solaris

+# Machine dependent makefile definitions for Solaris 9, 10
+# running a full GNU toolchain. This might not work on a
+# pure Sun configuration.

-# Machine dependent makefile definitions for intel 386,486 running
linux
+# Modified: Sept 12, 2006 Bill Page

 LBINDIR=/usr/local/bin

+# We need these flags to get the right options for sockio.h
+# and memalign
+CFLAGS := ${CFLAGS} -DBSD_COMP=bsd_comp -DGNUMALLOC=gnumalloc
+
 #OFLAG =  -g -Wall
 #OFLAG =  -g -Wall -fomit-frame-pointer -Werror
 #LIBS  = -lm

---------

Probably the GCL build should to be updated to properly detect at
least the two major toolchain configurations on Sun Solaris systems:
Sun native and GNU. Over time, these seem to be converging but there
are still significant differences.

Apparently GCL must be built in its own source directory. When I
tried to build GCL using lndir to ghost the source tree, GCL built
and ran but it would not properly perform a compiler::link function.
It returned an error message contain ~A format character where a
file name should have been. 

bash-2.05$ cd gcl-2.6.8pre
bash-2.05$ ./configure --disable-emacsdir --disable-tkconfig \
                       --disable-tclconfig --disable-xgcl

bash-2.05$ nohup make&

bash-2.05$ tail -f nohup.out

bash-2.05$ su

bash-2.05# make install

------------

Some patches were also necessary to the Axiom sources.

bash-2.05$ cp axiom.build-improvements \
              axiom.build-improvements_orig

To work around problems with X11 include file paths in the first
part of the build, I set the following environment variable:

bash-2.05$ export CPATH=/usr/openwin/share/include

"CPATH specifies a list of directories to be searched as if
specified with -I, but after any paths given with -I options
on the command line."

A better solution might be to include the 'AXIOM_X11_CFFLAGS'
variable in the CFLAGS option in those builds that reference
the X11 libraries and include files. Something like this:

----------
bash-2.05$ diff -Nau
axiom.build-improvements_orig/src/lib/Makefile.pamphlet \
    axiom.build-improvements/src/lib/Makefile.pamphlet
--- axiom.build-improvements_orig/src/lib/Makefile.pamphlet
2006-09-12 14:48:19.390563000 -0400
+++ axiom.build-improvements/src/lib/Makefile.pamphlet  2006-09-12
16:13:52.104054000 -0400
@@ -17,7 +17,7 @@
 OUT=${OBJ}/${SYS}/lib
 DOCINT=${INT}/doc/src/lib
 DOCMNT=${MNT}/${SYS}/doc/src/lib
-INC= $(axiom_src_srcdir)/include
+INC= $(axiom_src_srcdir)/include ${AXIOM_X11_CFLAGS}

 AR=    ${OUT}/bsdsignal.o  ${OUT}/cursor.o ${OUT}/edin.o     \
         ${OUT}/fnct_key.o   ${OUT}/halloc.o ${OUT}/openpty.o  \

------------

Warning: I have not tested the above patch yet.

This patch corrects and error in building debugsys

-----------
diff -Naur -x .svn -x Makefile -x '*.in' -x '*.dvi' -x '*.log' -x
'*.tex' -x '*.
toc' -x '*.aux' -x '*.mk' -x '*.lisp' -x '*.c' -x nohup.out
axiom.build-improvem
ents_orig/src/interp/debugsys.lisp.pamphlet
axiom.build-improvements/src/interp/
debugsys.lisp.pamphlet
--- axiom.build-improvements_orig/src/interp/debugsys.lisp.pamphlet
2006-09-
12 14:33:52.828375000 -0400
+++ axiom.build-improvements/src/interp/debugsys.lisp.pamphlet
2006-09-12 15:00
:03.637137000 -0400
@@ -79,6 +79,18 @@
 The [[*build-version*]] variable is only introduced into the system
 from the Makefile. Since this isn't going thru the Makefile when
 loaded by hand we need to establish a value.
+
+These names must be adjusted if necessary to reflect the
+platform name. So:
+
+      (thesymb "/obj/linux/interp/sockio.o")
+
+is wrong but
+
+       (thesymb (concatenate 'string "/obj/" *sys* "/interp/sockio.o"))
+
+is ok.  (Sept 12, 2006  Bill Page)
+
 <<*>>=
 (setq *build-version* "debug")
 (build-interpsys
@@ -169,7 +181,6 @@
       (thesymb "/int/interp/simpbool.clisp")
       (thesymb "/int/interp/slam.clisp")
       (thesymb (concatenate 'string "/obj/" *sys* "/interp/sockio.o"))
-      (thesymb "/obj/linux/interp/sockio.o")
       (thesymb "/int/interp/spad.lisp")
       (thesymb "/int/interp/spaderror.lisp")
       (thesymb "/int/interp/template.clisp")

This patch adds the X11 libraries to sman and friends.

--------

diff -Naur -x .svn -x Makefile -x '*.in' -x '*.dvi' -x '*.log' -x
'*.tex' -x '*.
toc' -x '*.aux' -x '*.mk' -x '*.lisp' -x '*.c' -x nohup.out
axiom.build-improvem
ents_orig/src/sman/Makefile.pamphlet
axiom.build-improvements/src/sman/Makefile.
pamphlet
--- axiom.build-improvements_orig/src/sman/Makefile.pamphlet
2006-09-12 14:15
:44.112706000 -0400
+++ axiom.build-improvements/src/sman/Makefile.pamphlet 2006-09-12
13:51:33.2870
37000 -0400
@@ -10,6 +10,9 @@
 \tableofcontents
 \eject
 \section{Environment variables}
+The LDFLAGS must include the AXIOM_X11_LDFLAGS so that
+the loader can find the X11 libraries on non-standard
+configurations.  (Sept 12, 2006 Bill Page)
 <<environment>>=
 # this is where we are compiling from
 IN=     $(axiom_src_srcdir)/sman
@@ -33,7 +36,8 @@
 # this is where the documentation ends up
 DOC=    ${MNT}/${SYS}/doc/src/sman
 CFLAGS=        ${CCF}
-LDFLAGS= -L${LIB} -lspad ${LDF}
+# LDFLAGS= -L${LIB} -lspad ${LDF}
+LDFLAGS= -L${LIB} -lspad ${LDF} -lspad ${AXIOM_X11_LDFLAGS}

 DOCFILES=${DOC}/session.c.dvi ${DOC}/nagman.c.dvi ${DOC}/sman.c.dvi \
          ${DOC}/spadclient.c.dvi
@@ -45,7 +49,7 @@
 <<session>>=
 ${OUTLIB}/session: ${SMANOBJS} ${MIDOBJ}/session.o
        @ echo 1 linking session
-       @ ${CC} -o ${OUTLIB}/session ${MIDOBJ}/session.o ${SMANOBJS}
+       @ ${CC} -o ${OUTLIB}/session ${MIDOBJ}/session.o ${SMANOBJS}
${LDFLAGS}

 ${MID}/session.c: ${IN}/session.c.pamphlet
        @ echo 2 making ${MID}/session.c from ${IN}/session.c.pamphlet
@@ -71,7 +75,7 @@
 <<nagman>>=
 ${OUT}/nagman: ${SMANOBJS} ${MIDOBJ}/nagman.o
        @ echo 5 linking nagman
-       @ ${CC} -o ${OUT}/nagman ${MIDOBJ}/nagman.o ${SMANOBJS}
+       @ ${CC} -o ${OUT}/nagman ${MIDOBJ}/nagman.o ${SMANOBJS}
${LDFLAGS}

 ${MID}/nagman.c: ${IN}/nagman.c.pamphlet
        @ echo 6 making ${MID}/nagman.c from ${IN}/nagman.c.pamphlet
@@ -95,7 +99,7 @@
 <<spadclient>>=
 ${OUTLIB}/spadclient: ${SMANOBJS} ${MIDOBJ}/spadclient.o
        @ echo 9 linking spadclient
-       @ ${CC} -o ${OUTLIB}/spadclient ${MIDOBJ}/spadclient.o
${SMANOBJS}
+       @ ${CC} -o ${OUTLIB}/spadclient ${MIDOBJ}/spadclient.o
${SMANOBJS} ${LD
FLAGS}

 ${MID}/spadclient.c: ${IN}/spadclient.c.pamphlet
        @ echo 10 making ${MID}/spadclient.c from
${IN}/spadclient.c.pamphlet
@@ -119,7 +123,7 @@
 <<sman>>=
 ${OUT}/sman: ${SMANOBJS} ${MIDOBJ}/sman.o
        @ echo 13 linking sman
-       @ ${CC} -o ${OUT}/sman ${MIDOBJ}/sman.o ${SMANOBJS}
+       @ ${CC} -o ${OUT}/sman ${MIDOBJ}/sman.o ${SMANOBJS} ${LDFLAGS}

 ${MID}/sman.h: ${IN}/sman.c.pamphlet
        @ echo 00 making ${MID}/sman.h from ${IN}/sman.c.pamphlet

---------

With the new build.improvements branch we can now do an out-of-source
build for Axiom. :)

bash-2.05$ mkdir axiom.build
bash-2.05$ cd axiom.build
bash-2.05$ ../axiom.build-improvements/configure
bash-2.05$ nohup make&
bash-2.05$ tail -f nohup.out

To perform the install we need another simple patch:

---------
bash-2.05$ diff -Nau axiom.build-improvements_orig/Makefile.pamphlet \
  axiom.build-improvements/Makefile.pamphlet
--- axiom.build-improvements_orig/Makefile.pamphlet     2006-09-12
14:11:30.204909000 -0400
+++ axiom.build-improvements/Makefile.pamphlet  2006-09-12
15:31:00.802527000 -0400
@@ -625,7 +625,11 @@
 @
 \subsection{install}
 <<install>>=
+.PHONY:        install
 install:
+       $(PATH_EXPORTS) $(MAKE) do-install
+
+do-install:
        @echo 78 installing Axiom in ${DESTDIR}
        @mkdir -p ${DESTDIR}
        @cp -pr ${MNT} ${DESTDIR}

----------
bash-2.05$ su
bash-2.05# make install

78 installing Axiom in /usr/local/axiom
79 Axiom installation finished.

Please add /usr/local/axiom/mnt/solaris9/bin to your PATH variable
Start Axiom with the command axiom

make[1]: Leaving directory `/export/home/dmprod/axiom.build'

bash-2.05$ export PATH=/usr/local/axiom/mnt/solaris9/bin:$PATH
bash-2.05$ AXIOMsys
GCL (GNU Common Lisp)  2.6.8 CLtL1    Sep 12 2006 05:57:14
Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl)
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.
Temporary directory for compiler files set to /tmp/
                        AXIOM Computer Algebra System
          Version: Axiom (build improvements branch) -- 2006-09-12
            Timestamp: Wednesday September 13, 2006 at 00:52:01
------------------------------------------------------------------------
-----
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave AXIOM and return to shell.
------------------------------------------------------------------------
-----

   Re-reading compress.daase   Re-reading interp.daase
   Re-reading operation.daase
   Re-reading category.daase
   Re-reading browse.daase
(1) ->

----------

Regards,
Bill Page.


_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to