Ken Moffat ken at kenmoffat.uklinux.net
Fri Feb 4 03:00:31 PST 2005

On Thu, 3 Feb 2005, Maru Dubshinki wrote:

> I had no problems installing the first toolchain, although I did get
> many error1s and 2s relating to travelling in directories, I don't
> think they are relevant.

 Depends what you mean by "many", and whether or not the packages all
ended normally [ that is, they returned a status of 0 after each command
- in future you can check that by entering "echo $?" immediately after
any command you're not sure about ].

> My problems start after I installed TCL, and tried to do Expect.  I
> extracted the package to a separate directory in $LFS/source, and did
> the ./configure command precisely as formatted.  It ran for a while
> and the final output looked like this:
> checking for timezone... yes
> checking for siglongjmp... yes
> checking for memcpy... yes
> checking if WNOHANG requires _POSIX_SOURCE... no
> checking if any value exists for WNOHANG... configure: error: Expect
> can't be cross compiled

 This is your error - it thinks you are trying to cross-compile it for a
different processor or operating system.

> This deeply puzzled me as $_POSIX_SOURCE either doesn't exist on my

 You are misunderstanding the configure script.  It's probably testing
if -D_POSIX_SOURCE has to be passed to the compiler to compile using
WNOHANG [ WNOHANG should be in the headers, in one or more versions of
wait.h - I don't have a build using this version of the book, so I can't
tell you categorically where the header should be, but you might want to
review what you did to install headers earlier on. ]

> system, or is blank (echo $_POSIX_SOURCE returns a blank line.).  So,
> I reextracted everything, and tried again, but this time I tried
> commenting out the offending lines in the configure shell file that
> dealt with WNOHANG.  This only resulted in several many errors saying
> the command 'fi' is not recognized. And when I search-and-replaced
> 'fi' after a check of Apt and Google returned no recognizable Linux
> commands like that, it just choked.

OMG.  Editing the configure script is a late-stage option to debug the
problem, not normally required, and you have to understand shell
scripts, and what configure does. 'fi' is the end of if ... then ...
else ... fi structures.

> So I'm at a loss.
> And yes, I did apply the expect-5.42.1-spawn-1.patch.
> ~Maru
> Microsoft delenda est.

 At a guess, something *might* be wrong with the toolchain.  Blow away
your edited expect directory, untar and patch expect again, and rerun
configure.  Then take a look at the log [ probably, config.log ] to see
what it says about your system, particularly anything about host or
target.  If your machine is x86, it should be recognised as
i686-pc-linux-gnu or something similar.

 If there is a config.guess script, run that to see what it reports.

 das eine Mal als Tragödie, das andere Mal als Farce

More information about the lfs-support mailing list