Installation of Expect First apply a patch: patch -Np1 -i ../expect-&expect-patch-version;.patch This fixes a bug in Expect that can result in bogus failures during the GCC test suite run. Now prepare Expect to be compiled: ./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no Build, test, and install the package: make make test make install Note that also here some of the tests might fail, and that this is not a problem here either. You can now remove the source directories of both Tcl and Expect.