On the build farm, dejagnu sometimes fails to build:


ERROR: -------------------------------------------
ERROR: in testcase ./testsuite/runtest.libs/libs.exp
ERROR:  send: spawn id exp6 not open
ERROR:  tcl error code NONE
ERROR:  tcl error info:
send: spawn id exp6 not open
    while executing
"exp_send "interp delete test_case""
    invoked from within
"if [file exists $test] {
	verbose "Processing test $test" 2

	exp_send "interp create test_case\n"
	expect "interp create test_case*test_case*expect*>..."
    (procedure "process_test" line 9)
    invoked from within
"process_test $i "
    ("foreach" body line 2)
    invoked from within
"foreach i [lsort -dictionary [glob [testsuite file -source -test *.test]]] {
    if { [runtest_file_p $runtests $i] } { process_test $i }
    (file "./testsuite/runtest.libs/libs.exp" line 100)
    invoked from within
"source ./testsuite/runtest.libs/libs.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source ./testsuite/runtest.libs/libs.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name" msg"
I cannot reproduce this locally.

This "send: spawn id exp8 not open" has been noticed in LFS, at <https://wiki.linuxfromscratch.org/lfs/ticket/4871>. There it has been proposed to run the build out-of-source.

TODO: give '#:out-of-source? #true' a try.