Problem with build-from-lisp.bash

Pascal Bourguignon pjb at
Sun Dec 9 21:50:20 UTC 2018


The lisp commands to build abcl in the build-from-lisp.bash script have a problem: they’re mere progn forms.
When an error occurs, the lisp implementations will enter into the debugger and expect an interactive debugging.
This prevents building abcl in automatic scripts, such as:

function install_abcl_from_sources(){
    # Assume ccl is available.
    cd "${PREFIX}"/src/
    local url=''
    local tarball;tarball="$(basename "${url}")"
    local dir;dir="$(basename "${tarball}" .tar.gz)"
    local jdkhome;jdkhome="$(java_home)"
    local logbase;logbase="$(pwd)/${dir}"
    export JAVA_HOME="${jdkhome}"
    if [[ ! -e  "${tarball}" ]] ; then
        download "${url}"
    unarchive "${tarball}" "${dir}"
    cd "${dir}"
    case "$(uname)" in
        sed -e 's^"/usr/"^"'"${jdkhome}/"'"^' \
            < >customizations.lisp
        sed -e 's^"/home/peter/sun/jdk1.5.0_16/"^"'"${jdkhome}/"'"^' \
            -e 's/fastjar/jar/' \
            < >customizations.lisp
    chmod 755 ./build-from-lisp.bash
    printi 'Building abcl from lisp with ccl'
    ./build-from-lisp.bash ccl  > "${logbase}".build-from-lisp.log      2>&1 \
        && ( printi 'Installing abcl' ; install -m 755 abcl "${PREFIX}"/bin/  > "${logbase}".make-install.log   2>&1 ) \
        ||   printe 'Compiling abcl failed; check the logs.'

since errors aren’t detected, but just suspend the execution indefinitely.

Therefore, I would suggest to wrap those progn forms into a handler-case; for example, in the case of ccl:

(handler-case (progn $3 (ccl:quit)) (error (err) (princ err *error-output*) (terpri *error-output*) (finish-output *error-output*) (ccl:quit 1)))

__Pascal J. Bourguignon__

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the armedbear-devel mailing list