uclibc nls

Robert Connolly robert at linuxfromscratch.org
Sun Feb 20 23:05:55 PST 2005


Hi. The main problem with uclibc's nls is libintl. uClibc's iconv seems 
alright. I just recently noticed that the Gettext package will install 
libintl.so if nls is requested (the default) and no libintl or 
gettext-in-libc exists.

So, to get a fully working nls install with uClibc we need to move the Gettext 
package to just after adjusting in chapter 5, in chapter 6 
symlink /tools/lib/libintl.so to /lib, and install Gettext after GCC is 
installed in chapter 6.

The symlink will let binutils and gcc link to /lib/libintl.so, but after the 
new gcc is installed it won't search /tools/include for libintl.h, so Gettext 
must be installed again just after gcc. The second gettext will find a 
non-working libintl install because libintl.h isn't in the gcc search path, 
and so Gettext will once again build and install libintl.so. Upgrading 
Gettext later on might be trickier, but certainly possible.

It ends up looking like this:
checking whether NLS is requested... yes
checking for GNU gettext in libc... no
checking for iconv... yes
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... -lintl

Sound good? I don't know if there's any side effect to moving Gettext up so 
early, I can't think of any. I've made a lot of adaptations to get this to 
work. I'm going to start over with a fresh svn so that I can make the 
uclibc-nls one big svn commit.. I'll take out all the ${disable_nls} too. I 
should be done in maybe in 6-24 hours.

I've never used nls during an LFS install, maybe someone can test this after 
and confirm that it works.

robert



More information about the hlfs-dev mailing list