Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 225309 - sys-libs/glibc - /etc/locale.gen not present on fresh system
Summary: sys-libs/glibc - /etc/locale.gen not present on fresh system
Status: RESOLVED DUPLICATE of bug 236770
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-08 08:33 UTC by sam logen
Modified: 2008-12-07 22:13 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sam logen 2008-06-08 08:33:08 UTC
Hello.  While following the Gentoo handbook and installing Gentoo on my computer, I couldn't complete the step here under "Optional: glibc Locales" because I couldn't find locale.gen in /etc:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6

I skipped this step, and just now the program K3B complained that the system locale charset is ANSI_X3.4-1968.  I went to the gentoo linux localization guide to fix this.

http://www.gentoo.org/doc/en/guide-localization.xml

Before I followed their instructions, I issued "env | grep -i LC_" but there was no output.  Their instructions say to edit "/etc/env.d/02locale" with appropriate locale settings.  Again I couldn't find the file "/etc/env.d/02locale", so I created it.

In short, I believe that either the "/etc/locale.gen" or "/etc/env.d/02locale" files are missing from the initial installation (the stage 3 tarball?).


Reproducible: Always
Comment 1 sam logen 2008-06-08 08:33:48 UTC
# emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-Base-r8-Core i686)
=================================================================
System uname: 2.6.24-Base-r8-Core i686 AMD Athlon(tm) XP 3000+
Timestamp of tree: Sat, 07 Jun 2008 05:46:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -pipe -fomit-frame-pointer -msse -mfpmath=sse -mmmx -m3dnow -march=athlon-xp"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-Os -pipe -fomit-frame-pointer -msse -mfpmath=sse -mmmx -m3dnow -march=athlon-xp"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://cudlug.cudenver.edu/gentoo/ ftp://mirror.fslutd.org/linux/distributions/gentoo/ "
LANG="en_US@ISO-8859-1"
LC_ALL="en_US@ISO-8859-1"
LINGUAS="en en_GB en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/armagetron"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X a52 aac acl acpi alsa ao arts audiofile awe32 berkdb bzip2 cairo cddb cdparanoia cdr cgi cli cpudetection cpufreq cracklib crypt css cups dbus directfb divx dri dts dv dvb dvd dvdr dvdread eds emboss encode esd evo fam fbcon fbcondecor fbsplash ffmpeg fftw firefox flac fontconfig fortran fpx gdbm geoip gif gimp glut gmedia gphoto2 gpm graphviz gs gstreamer hal hdri iconv ieee1394 imagemagick ipv6 isdnlog jack java jbig jikes joystick jpeg jpeg2k kde kerberos ladspa lame lash latex lcms ldap libburn libcaca libedit libnotify lirc live lm_sensors lzo mad matroska midi mikmod mmap mmx mmxext mng moviepack moviesounds mp2 mp3 mpeg mplayer mpu401 mudflap musepack mysql ncurses networkmanager nforce2 nls nptl nptlonly nsplugin nvidia offensive ogg openexr opengl openmp oss pae pam pcre pda pdf perl pmu png ppds pppd python qt3 qt3support qt4 quicktime rar rdesktop readline real realmedia reflection rtc samba scanner sdl sensord session slang snmp speex spell spl sse ssl suid svg szip tcpd theora threads thunderbird tiff truetype unicode usb v4l v4l2 vcd vnc vorbis wavpack win32codecs wmf wmp x264 x86 xattr xfs xine xml xorg xpm xrandr xscreensaver xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB en_US" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 2 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-06-08 08:53:24 UTC
If the "locale -a" command shows you a big list of locales including those you need, you are fine. You don't tell us here, if you compiled your glibc, or if it comes from a pure stage3, and you don't tell us, the if the stage you downloaded was eg, a 2008.0_beta2. I cannot believe that a stage3 did not have a /etc/locale.gen file. The 02locale file in /etc/env.d is optional, and not included by default installations, because we don't know what will be your global locale, you would put there. The question is, are you ok now, after setting your locale globally via 02locale?
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-06-08 13:56:18 UTC
It's quite possible that sys-libs/glibc-2.6.1-r0 doesn't own or write /etc/locale.gen. The file certainly isn't owned by any package on any of my systems.

This is in pkg_setup() for sys-libs/glibc-2.6.1:

    # users have had a chance to phase themselves, time to give em the boot
    if [[ -e ${ROOT}/etc/locale.gen ]] && [[ -e ${ROOT}/etc/locales.build ]] ; then
        eerror "You still haven't deleted ${ROOT}/etc/locales.build."
        eerror "Do so now after making sure ${ROOT}/etc/locale.gen is kosher."
        die "lazy upgrader detected"
    fi
Comment 4 sam logen 2008-06-09 03:38:59 UTC
(In reply to comment #2)
> If the "locale -a" command shows you a big list of locales including those you
> need, you are fine. You don't tell us here, if you compiled your glibc, or if
> it comes from a pure stage3, and you don't tell us, the if the stage you
> downloaded was eg, a 2008.0_beta2. I cannot believe that a stage3 did not have
> a /etc/locale.gen file. The 02locale file in /etc/env.d is optional, and not
> included by default installations, because we don't know what will be your
> global locale, you would put there. The question is, are you ok now, after
> setting your locale globally via 02locale?
> 

I did run an emerge --update system.  If that recompiled glibc, how would that have differed from any other install of glibc? In other words, why should a re-install or update delete a key Gentoo configure file?

I thought my emerge --info should provide you with all you need to know about my system state.  I installed Gentoo from the stable 2007 stages, not the 2008.0_beta2 packages.  I've just finished testing, and after editing 02locale to include:

LC_ALL="en_US.iso88591"
LANG="en_US.iso88591"

and running "env-update && source /etc/profile" then doing a reboot (was necessary), my programs no longer complain about my charset.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2008-06-09 04:19:02 UTC
you can still add the locale.gen file to /etc now to get the advantages of not building every single locale when you emerge glibc.

dirtyepic@halo ~ $ cat /etc/locale.gen
# /etc/locale.gen: list all of the locales you want to have on your system
#
# The format of each line:
# <locale> <charmap>
#
# Where <locale> is a locale located in /usr/share/i18n/locales/ and
# where <charmap> is a charmap located in /usr/share/i18n/charmaps/.
#
# All blank lines and lines starting with # are ignored.
#
# For the default list of supported combinations, see the file:
# /usr/share/i18n/SUPPORTED
#
# Whenever glibc is emerged, the locales listed here will be automatically
# rebuilt for you.  After updating this file, you can simply run `locale-gen`
# yourself instead of re-emerging glibc.

en_US ISO-8859-1
en_US.UTF-8 UTF-8

afterward run locale-gen and reap the benefits.
Comment 6 sam logen 2008-06-09 18:50:38 UTC
(In reply to comment #5)
> you can still add the locale.gen file to /etc now to get the advantages of not
> building every single locale when you emerge glibc.
> 
> dirtyepic@halo ~ $ cat /etc/locale.gen
> # /etc/locale.gen: list all of the locales you want to have on your system
> #
> # The format of each line:
> # <locale> <charmap>
> #
> # Where <locale> is a locale located in /usr/share/i18n/locales/ and
> # where <charmap> is a charmap located in /usr/share/i18n/charmaps/.
> #
> # All blank lines and lines starting with # are ignored.
> #
> # For the default list of supported combinations, see the file:
> # /usr/share/i18n/SUPPORTED
> #
> # Whenever glibc is emerged, the locales listed here will be automatically
> # rebuilt for you.  After updating this file, you can simply run `locale-gen`
> # yourself instead of re-emerging glibc.
> 
> en_US ISO-8859-1
> en_US.UTF-8 UTF-8
> 
> afterward run locale-gen and reap the benefits.
> 

Thank you for that.  Has it been determined if this file is not being installed, moved or deleted on other computers for one reason or another, or if this is just a fluke of my system install?
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2008-09-25 15:22:09 UTC
I can verify that the file doesnt exist on fresh x86 installation with glibc-2.6.1. 
Comment 8 SpanKY gentoo-dev 2008-12-07 22:13:00 UTC

*** This bug has been marked as a duplicate of bug 236770 ***