Hi!
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='http://abcl.org/releases/1.4.0/abcl-src-1.4.0.tar.gz' 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}" fi unarchive "${tarball}" "${dir}" cd "${dir}" case "$(uname)" in (Darwin) sed -e 's^"/usr/"^"'"${jdkhome}/"'"^' \ <customizations.lisp.in >customizations.lisp ;; (*) sed -e 's^"/home/peter/sun/jdk1.5.0_16/"^"'"${jdkhome}/"'"^' \ -e 's/fastjar/jar/' \ <customizations.lisp.in >customizations.lisp ;; esac 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)))
On Dec 9, 2018, at 22:50, Pascal Bourguignon pjb@informatimago.com wrote:
Hi!
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:
[…]
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)))
Seems like a reasonable suggestion: got a patch? The`build-from-lisp.bash` script was contributed by another developer, so it will take some time before I can look at this problem, whereas I can sheppard a definite patch much easier.
armedbear-devel@common-lisp.net