axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] [build-improvements] add support for --with-gcl


From: Gabriel Dos Reis
Subject: [Axiom-developer] [build-improvements] add support for --with-gcl
Date: 27 Aug 2006 21:24:27 -0500

Hi the patchlet below adds support for --with-gcl.

By default, configure will try to detect the presence of a gcl command
in the build environment, and use it.  You can instruct Axiom not to
autotect through the configure option --without-gcl.  Of course, you
can also explicitly tell Axiom the availability of GCL throught
--with-gcl.  All this follows standard GNU build tools semantics.

When I tried this, I had
  * an outright segmentation fault with a _separately_ installed
    GCL-2.6.8pre.  That SIGSEV was preceeded by failure to load
    sysdef.lsp from GCL-2.6.8pre installation.  Investigation revealed
    that indeed, that file is missing from the installation
    repository.  That seems a plain bug from GCL part.

  * a C compile failure, with a _separately_ installed GCL-2.6.7.
    Here is a snippet of the build log:
    [...]
      =====================================
      === algebra bootstrap complete ======
      =====================================
      compiling AHYP.spad to AHYP.NRLIB
      AHYP.NRLIB/AHYP.c:2:24: error: cmpinclude.h: No such file or directory
      In file included from AHYP.NRLIB/AHYP.c:3:
      AHYP.NRLIB/AHYP.h:4: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'LI2'

   The root of the error seems to be a failure of the C compiler (GCC)
   to locate the GCL-specific include file cmpinclude.h.  That file is
   present in the installation location

     /usr/local/lib/gcl-2.6.7/h

   so there seems to be a bug in the way the C compiler is called to
   compile the generated C codes -- that should add
   -I/usr/local/lib/gcl-2.6.7/h.  That is either a GCL bug (very
   likely), or an Axiom bug (not sure). 


Trying to fix all of that before commitring led me to learn about GCL
more than I wanted.  Consequently I postponed the investigation --
hopefully, those more familiar with GCL than me will come up with 
recommendations. 


Notice that none of the above problems manifests if one uses GCL as
part of the Axiom sources.  Consequently, until the above issues
are fixed, be sure to specify --without-gcl when invoking configure.

Built and tested on an i686-pc-linux-gnu.

-- Gaby

2006-08-27  Gabriel Dos Reis  <address@hidden>

        * Makefile.pamphlet (GCLVERSION): Define as Autoconf-substituted
        variable. 
        * Makefile.in: Regenerate.

        * configure.ac.pamphlet: Add support for --with-gcl, auto-detect.
        * configure.ac: Regenerate.
        * configure: Likewise.

*** Makefile.pamphlet   (revision 15812)
--- Makefile.pamphlet   (local)
*************** lsp/Makefile.pamphlet file and get the c
*** 793,799 ****
  forget to erase the lsp/Makefile the wrong patches will be applied.
  
  <<GCLVERSION>>=
! GCLVERSION=gcl-2.6.8pre
  @
  
  \subsubsection{The [[GCLOPTS]] configure variable}
--- 793,799 ----
  forget to erase the lsp/Makefile the wrong patches will be applied.
  
  <<GCLVERSION>>=
! address@hidden@
  @
  
  \subsubsection{The [[GCLOPTS]] configure variable}
*** configure.ac.pamphlet       (revision 15812)
--- configure.ac.pamphlet       (local)
*************** else
*** 267,272 ****
--- 267,316 ----
      AC_SUBST(NOWEAVE)
  fi
  
+ ## -----------------------
+ ## -- Which GCL to use? --
+ ## -----------------------
+ ##
+ ## By default, we assume that GCL is not present in the build
+ ## environment, so we should roll our own.  That is a reasonable
+ ## assumption since GCL does not seem to be as widespread as one
+ ## would like to think.
+ 
+ axiom_use_gcl=
+ AC_ARG_WITH([gcl], [assume GCL is present in the build environment],
+             [case $withval in
+                 yes|no) axiom_use_gcl=$withval ;;
+                 *) AC_MSG_ERROR([erroneous value for --with-gcl]) ;;
+              esac])
+ 
+ ## Check for GCL only if we're told to or if we should guess
+ if test x$axiom_use_gcl != xno; then
+     AC_CHECK_PROG([GCL], [gcl], [gcl])
+ else
+     ## Make sure GCL is Autoconf-substituted in generated files
+     AC_SUBST(GCL)
+     :
+ fi
+ 
+ ## If we were told to use system-installed GCL, but the 'gcl' command
+ ## is missing from the build environment, then something is wrong.
+ if test -z $GCL; then
+     if test x$axiom_use_gcl = xyes; then
+         AC_MSG_ERROR([--with-gcl is specified but GCL is missing])
+     fi
+ 
+     ## gcl-2.6.8pre is the most recent version we use.
+     axiom_gcl_version=gcl-2.6.8pre
+     GCL=$axiom_build_bindir/gcl
+ 
+     ## FIXME: add gcl to axiom_required_build_utils
+ 
+ else
+     axiom_gcl_version=gcl-system
+ fi
+ AC_SUBST(axiom_gcl_version)
+ 
+ 
  AC_SUBST(axiom_required_build_utils)
  @
  




reply via email to

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