Potential issue - gcc/glibc locale related

Greg Schafer gschafer at zip.com.au
Mon Sep 9 16:52:11 PDT 2002

On Sat, Sep 07, 2002 at 05:16:55PM +0200, Jeroen Coumans wrote:
> On Saturday 07 September 2002 07:31, Greg Schafer wrote:
> > Because the book currently suggests that you optionally don't have to
> > install the localedata, it may be appropriate for the book to include
> > the switch in the gcc instructions for chapter 6:-
> >
> >         --enable-clocale=gnu
> I think that's a good idea. I never install locales, and I think lots of 
> other people neither (esp. if you're native tongue is english). 

Ok, rather than stuffing around :-) I went straight to the source and asked
on the libstdc++ list. According to one of the maintainers (Benjamin Kosnik)
the ABI does indeed change :-(  This is not a huge problem in itself for LFS
due to the nature of how we generally compile everything ourselves. But if
we want to ensure proper C++ ABI compatibility then we should fix this.

The thread starts here:-


So, in my ongoing quest to ensure LFS is taken seriously as a distribution,
I recommend we include --enable-clocale=gnu in the GCC Ch 6 instructions.

I'll file an LFS bug soon (unless there is any objection).

Just so there is no confusion, here are some facts:-

 * if one strictly follows the book and does the "make localedata/install-locales"
   thing for glibc, there is no problem (as --enable-clocale=gnu will be correctly
   determined by the libstdc++ configure script)

 * if one skips the "make localedata/install-locales" thing and only installs
   a few locales by hand using localedef, then as long as one of those locales
   is "de_DE", there is no problem.

 * if one skips the "make localedata/install-locales" thing and doesn't install
   any locales or doesn't install the "de_DE" locale, then --enable-clocale=generic
   will be chosen by the libstdc++ configure script (NOT what we want)

 * if one passes --enable-clocale=gnu to the Ch 6 GCC instructions, then the correct
   locale model will always be chosen, no matter if/what/when/which locales are
   installed or not. This is the safest thing to do.

> > Coz if we don't, some folk are going to end up with "generic".
> > Although, I don't think this is a big problem, but I have fears there
> > may be some sort of ABI incomptibility in the C++ libs.
> >
> > The reason I discovered this is I don't generally install any locales
> > and happened to notice that some libstdc++ tests were unexpectedly
> > (XPASS) passing for some folk but not for me.
> Does this mean I must recompile glibc _again_ and also every c++ 
> program? With all your updates (keep m coming, btw!) we should need a 
> "how to upgrade your glibc/when to reinstall LFS"-hint! :)

No, it doesn't affect glibc. It only affects libstdc++. So if you are going
to recompile anything, just recompiling GCC should do the trick. But to be
honest, I don't think it is worth worrying about. Just make sure to add the
switch at your next LFS compile which will only be a few months away if you're
serious about your LFS :-)

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list