tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 4.0.1 build on 1.4T



>> In case it matters, here's a (severely cut-down) summary of the
>> failure [of a 4.0.1 build on a 1.4T host]: [...]
> i'd expect it to work.  i wonder what is up.

I expected it to work too. :)

> what's in the config.log?  it has several sections, and the
> interesting stuff is usually in the middle somewhere..

Thanks for the pointer.

This - including all the strange "no" decisions - turns out to be
fairly easily explicable.  <unistd.h> includes in its preprocessed
output

struct timeval;

int      select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *));

which errors because fd_set has not been defined yet.  <unistd.h> does
include <sys/types.h>, but the definition of fd_set in <sys/types.h> is
conditional on a condition more stringent than the condition <unistd.h>
uses to determine whether to include the declaration of select().

Thus, it appears that 1.4T simply has buggy include files which send
4.0.1's configure script off into a tailspin by producing errors due to
not what configure is trying to test but rather something else.
Apparently whoever added the _XOPEN_SOURCE >= 500 test I find in
unistd.h didn't test it thoroughly enough to catch the mismatch between
that test and the one in sys/types.h (not surprising; trying to test
all possible combinations of various flag defines is very tedious).

I'm not sure what the right fix is.  I don't think it's entirely fair
to blame configure for failing from buggy include files, though I could
have wished for a less obscure failure mode.  I could just copy the
test from unistd.h to sys/types.h, but that duplicates the code for a
relatively complicated test, thus asking for maintenance headaches.
However, I'm not sure what else to do; I could add a flag indicating
whether fd_set has been defined and suppress select() if so, but that
fails in the wrong direction when someone uses the _XOPEN_SOURCE >= 500
case.

I think I'll have to just copy the test and leave comments indicating
that it's duplicated.  This also makes me question how worthwhile it is
to try to make 4.0.1 cross-build from 1.4T; I may just drop that idea
and forget the whole thing.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index