Opened 18 years ago
Closed 18 years ago
#1892 closed defect (fixed)
"host pollution" of expect in ch5 breaks binutils testsuite in ch6
Reported by: | Owned by: | Jeremy Huntwork | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Book | Version: | 6.2 |
Severity: | normal | Keywords: | |
Cc: |
Description
If there is a stty binary in /usr/local/bin on the host (default install of coreutils), that gets picked up by expect's configure script:
if test -r /usr/local/bin/stty ; then STTY_BIN=/usr/local/bin/stty else STTY_BIN=/bin/stty fi
This gets compiled into libexpect and utimately breaks dejagnu in ch6 because we have created a symlink to /tools/bin/stty in /bin but not in /usr/local/bin.
I see two possible fixes:
- ln -s /bin/stty /usr/local/bin in the Essential Symlinks
Don't like that as it pollutes the final LFS environment.
- Fix Expect's configure.status and/or Makefile with a sed between the ./configure and the make.
(Probably should check first that /bin/stty actually exists on the host.)
Change History (4)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
I like the approach. It ought to work (though a test run on the originally affected host may have to wait a while). The explanatory text in patch is great.
comment:3 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Confirmed; and here's how:
- Start up the LiveCD.
- Copy /bin/stty to /usr/local/bin
- Compile tcl/expect/dejagnu like you would in chapter 5.
- Remove /usr/local/bin/stty
- Compile the calc example that comes with the dejagnu source (make sure your PATH is set to use the new testsuite tools):
cd example/calc make make check
- The check will fail and calc.log will contain something like the following:
sh: /usr/local/bin/stty: No such file or directory calc: ERROR: Can't start /path/to/dejagnu-1.4.4/example/calc/calc
Adding these two lines to the book commands would 'fix' this behavior:
That would produce the following in the 'configure' script:
If you like this fix, I made a patch: http://linuxfromscratch.org/~jhuntwork/chapter05-expect.patch