GCC 3.0 20010614 bootstrap failure due to locale collation problems
Phil Richards
pgr@derived-software.demon.co.uk
Fri Jun 15 04:09:00 GMT 2001
Summary: if LC_COLLATE is honoured by sed, and LC_COLLATE is set to a non-"C"
value when LC_ALL isn't set, then "make bootstrap" of 3.0 fails
My platform: Mandrake GNU/Linux 8.0
Did "configure --prefix=$HOME/gcc3 --enable-threads", and "make bootstrap"
(in separate build directory). Bootstrap build failed during build of
libstdc++-v3/libsupc++ directory with:
In file included from ../../../../gcc-3.0-20010614/libstdc++-v3/libsupc++/eh_alloc.cc:39:
../include/bits/gthr.h:29:2: invalid preprocessing directive #_GLIBCPP_ifndef
[...lots of similar...]
Had a dig around, and discovered that the gthr.h file was generated by
gcc-3.0-20010614/libstdc++-v3/configure using the line:
sed '/^#/s/\([A-Z_][A-Z_]*\)/_GLIBCPP_\1/g' <$d/gthr.h-in >$d/gthr.h
Problem is that these character patterns are locale-sensitive (Mandrake
sets my LC_COLLATE to en_GB, but doesn't set LC_ALL), so that when applied
to:
#define ABC 1
the result is:
#_GLIBCPP_define _GLIBCPP_ABC 1
(sed is GNU sed 3.02, GLIBC 2.2.2)
Setting LC_COLLATE (or LC_ALL) to "C" makes things work correctly again.
Configure checks (and fixes) only if LC_ALL is set (plus some others),
not LC_COLLATE. (This has to be done for the "make bootstrap", not just the
configure.)
(Note: Also tried without --enable-threads, same problem. This didn't [seem]
to occur on the previous tarball 20010527, which was configured the same way.)
Phil, pgr at derived-software dot demon dot co dot uk
More information about the Gcc-bugs
mailing list