Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322545 - >=dev-python/docutils-0.7_pre6334 fails to install in C/POSIX locale
Summary: >=dev-python/docutils-0.7_pre6334 fails to install in C/POSIX locale
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
: 323241 323361 323637 327095 327863 328721 330505 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-03 07:21 UTC by Juergen Rose
Modified: 2010-11-15 07:24 UTC (History)
17 users (show)

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


Attachments
the build.log of 'emerge -v --oneshot docutils' (build.log,38.47 KB, text/plain)
2010-06-07 16:29 UTC, Dan A. Dickey
Details
updated build.log with /etc/env.d/02locate created (build.log,38.47 KB, text/plain)
2010-06-07 17:42 UTC, Dan A. Dickey
Details
different build.log (build.log,69.16 KB, text/plain)
2010-07-08 10:32 UTC, Alexander Koryushkin
Details
emerge info + emerge -pqv (emerge.inf,8.02 KB, text/plain)
2010-07-08 13:16 UTC, Geoff Madden
Details
build log dev-python/docutils-0.7_pre6334 (build.log,38.45 KB, text/plain)
2010-07-08 13:17 UTC, Geoff Madden
Details
environment file (environment,187.49 KB, text/plain)
2010-07-08 13:17 UTC, Geoff Madden
Details
ko_KR.UTF-8 build log (build.log,69.18 KB, text/plain)
2010-11-10 07:02 UTC, sagnwook Kim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2010-06-03 07:21:55 UTC
'emerge docutils' fails with:
...
copying docutils/writers/s5_html/themes/medium-white/pretty.css -> build-3.1/lib/docutils/writers/s5_html/themes/medium-white
copying docutils/writers/s5_html/themes/medium-white/framing.css -> build-3.1/lib/docutils/writers/s5_html/themes/medium-white
PYTHONPATH=../build-3.1/lib python3.1 ../build-3.1/lib/tools/buildhtml.py --stylesheet-path=../html4css1.css --traceback ..
/// Processing directory: ..
    ::: Processing: FAQ.txt
Traceback (most recent call last):
  File "../build-3.1/lib/tools/buildhtml.py", line 244, in <module>
    Builder().run()
  File "../build-3.1/lib/tools/buildhtml.py", line 186, in run
    self.visit(recurse, root, dirs+files)
  File "../build-3.1/lib/tools/buildhtml.py", line 211, in visit
    prune = self.process_txt(directory, name)
  File "../build-3.1/lib/tools/buildhtml.py", line 237, in process_txt
    settings=settings)
  File "/var/tmp/portage/dev-python/docutils-0.7_pre6334/work/docutils-0.7_pre6334/build-3.1/lib/docutils/core.py", line 357, in publish_file
    enable_exit_status=enable_exit_status)
  File "/var/tmp/portage/dev-python/docutils-0.7_pre6334/work/docutils-0.7_pre6334/build-3.1/lib/docutils/core.py", line 641, in publish_programmatically
    output = pub.publish(enable_exit_status=enable_exit_status)
  File "/var/tmp/portage/dev-python/docutils-0.7_pre6334/work/docutils-0.7_pre6334/build-3.1/lib/docutils/core.py", line 203, in publish
    self.settings)
  File "/var/tmp/portage/dev-python/docutils-0.7_pre6334/work/docutils-0.7_pre6334/build-3.1/lib/docutils/readers/__init__.py", line 68, in read
    self.input = self.source.read()
  File "/var/tmp/portage/dev-python/docutils-0.7_pre6334/work/docutils-0.7_pre6334/build-3.1/lib/docutils/io.py", line 258, in read
    data = self.source.read()
  File "/usr/lib64/python3.1/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20915: ordinal not in range(128)
 * ERROR: dev-python/docutils-0.7_pre6334 failed:
 *   buildhtml.py failed


Reproducible: Always




root@orca:/root(18)# emerge --info =dev-python/docutils-0.7_pre6334
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11.1-r0, 2.6.34-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.34-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_W3520_@_2.67GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 03 Jun 2010 06:30:19 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.7b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula googleearth"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -msse4 -mcx16 -msahf -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -msse4 -mcx16 -msahf -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1"
LINGUAS="de fr"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/lib/layman/science /var/lib/layman/x11 /var/lib/layman/zugaina /var/lib/layman/java-overlay /var/lib/layman/sunrise /var/lib/layman/arcon /usr/local/portage /var/lib/cpan"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit R X Xaw3d a52 aac abiword acl acpi afs alsa amd64 ao apache2 applet archive arpack asf aspell assistant audacious audiofile automap automount bash-completion berkdb blas blast bluetooth boo boost branding bzip2 cairo cdda cddb cdf cdio cdparanoia cdr cg cgi chm cli consolekit corba cracklib crypt css cuda cups curl cxx daap db dbase dbi dbm dbus designer devhelp device-mapper dga dia djvu doc dri ds2490 dts dv dvb dvd dvdr dvi dynamicplugin eds elf emacs emboss empathy encode epiphany evo examples exif expat extensions extra extras fam fame ffmpeg fftw firefox fits flac fltk foomaticdb fortran fpx fts3 fuse galago gcj gd gdal gdbm gedit geoip geolocation geos gif gimp ginac git glade glib glitz gml gmp gmtsuppl gnokii gnome gnome-keyring gnome-print gnuplot gnutls gphoto2 gpm grammar graphics graphtft graphviz grass gs gsl gsm gstreamer gtk guile hal harness hddtemp hdf hdf5 hdri hlapi http httpd hvm iconv icq icu id3 ide imagemagick imap innodb inotify ipod ipv6 ithreads jabber jadetex java java5 java6 jbig john jpeg jpeg2k kdrive kerberos kpathsea kqemu kvm ladspa lame lapack latex latex3 lcms ldap lensfun libffi libgda libnotify libsamplerate lm_sensors lua lzo mad mail maildir mailwrapper mapnik math matroska mikmod mkl mmx mmxext mng modules mono moonlight motif mozdevelop mozilla mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networking networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numarray numeric nvidia obex objc ocaml octave odbc ogdi ogg ole openexr opengl openmp overview pae pam pango pcre pda pdf perl plotutils plugins png podcast policykit posix postgres postscript ppds pppd preview-latex proj projectx pstricks pulseaudio pymol python python-bindings qemu qhull qt3support qt4 quicktime readline reflection reiserfs rle romio rpc rrdcgi rrdtool samba sasl science sdl secure-delete semantic-desktop server session sip slang slp smbclient smp sms sndfile snmp soup sox speex spell spl sql sqlite sse sse2 ssl startup-notification stlport subtitles subversion suexec svg swig sysfs szip t1lib tcl tcpd tex tex4ht texmacs theora thinkpad threads thunderbird tidy tiff tk tntc tools truetype udev unicode usb userlocales utempter v4l2 virtualbox vorbis wav webdav webdav-serf webkit wmf wxwidgets x264 xattr xcb xemacs xext xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc zlib zvbi" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse                evdev               " KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy gsf harness ide identity j2ee java mobility nb php profiler ruby websvccommon xml" QEMU_SOFTMMU_TARGETS="i386 ppc ppc64 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby18 jruby" USERLAND="GNU" VIDEO_CARDS="nv nvidia nouveau vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


root@orca:/root(19)# emerge -pqv =dev-python/docutils-0.7_pre6334
[ebuild     U ] dev-python/docutils-0.7_pre6334 [0.6] USE="emacs -glep"
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-03 14:13:34 UTC
We don't support using non-UTF-8 locale.
Comment 2 Juergen Rose 2010-06-03 14:31:48 UTC
I think, that I do not change the locale settings for user root. So if I check the locale settings for root I get:
root@orca:/root(28)# locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

So I believe, that are the default settings at a gentoo system. Should not emerge to be able to handle these default settings? 
Comment 3 Nikolaj Šujskij 2010-06-03 19:04:42 UTC
I get the same error and my system-wide locale is "ru_RU.UTF-8"
Comment 4 Robert Lowe 2010-06-04 00:22:37 UTC
(In reply to comment #3)
> I get the same error and my system-wide locale is "ru_RU.UTF-8"
> 

I was getting this error with my locale set to "POSIX", I edited /etc/locale.gen and rebuilt the en_US.UTF-8 locale and set my system locale_US.UTF-8, after which docutils built just fine. 

Have you tried regenerating the ru_RU.UTF-8 locale?  Or perhaps docutils only works west of the Balkans ;)
Comment 5 Ivan 2010-06-04 22:41:49 UTC
(In reply to comment #4)
> I was getting this error with my locale set to "POSIX", I edited
> /etc/locale.gen and rebuilt the en_US.UTF-8 locale and set my system
> locale_US.UTF-8, after which docutils built just fine. 

Well, my locale is en_AU.UTF-8 and I got the same error...
Comment 6 Reuben Farrelly 2010-06-06 10:03:41 UTC
+1, breakage here too...
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-07 13:52:49 UTC
Please create /etc/portage/bashrc for testing purposes:
echo locale >> /etc/portage/bashrc

Next attach build log of dev-python/docutils.
Comment 8 Marc-Antoine Perennou 2010-06-07 14:13:31 UTC
using paludis, typing
locale >> /etc/paludis/bashrc
solved the thing
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-07 14:17:08 UTC
(In reply to comment #8)
> using paludis, typing
> locale >> /etc/paludis/bashrc
> solved the thing

`locale` command only shows current locale, it doesn't solve anything.
Comment 10 Marc-Antoine Perennou 2010-06-07 14:42:34 UTC
(In reply to comment #9)
> `locale` command only shows current locale, it doesn't solve anything.
> 

What I mean is that putting into /etc/paludis/bashrc the output of the "locale" command made the build success, whilst it failed without
Comment 11 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-07 15:38:48 UTC
OK. I'm assuming that other users also didn't have locale set correctly.
(Portage users can set LC_ALL="${language_code}.UTF-8" in /etc/make.conf.)
Comment 12 Dan A. Dickey 2010-06-07 16:14:07 UTC
Ok,
So I set:
LC_ALL="en_us.UTF-8"
in my /etc/make.conf, reran a 'emerge -v --oneshot docutils',
and it still failed here.
Any more suggestions?

I don't think you should have quite closed this yet.
Comment 13 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-07 16:16:53 UTC
(In reply to comment #12)

See comment #7 and attach build log.
Comment 14 Dan A. Dickey 2010-06-07 16:29:40 UTC
Created attachment 234437 [details]
the build.log of 'emerge -v --oneshot docutils'

I commented the LC_ALL setting in /etc/make.conf out,
ran 'locale >> /etc/portage/bashrc', and re-ran the emerge.
Previously, I had no /etc/portage/bashrc.  Now, it looks like:
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

Thank you for your help with this.
Comment 15 Dan A. Dickey 2010-06-07 16:37:29 UTC
Is this using python3.1 to build?  Looks like it.
Is it supposed to?  Did it before?
Just a few thoughts I had..
Comment 16 Dan A. Dickey 2010-06-07 16:39:43 UTC
(In reply to comment #15)
> Is this using python3.1 to build?  Looks like it.
> Is it supposed to?  Did it before?
> Just a few thoughts I had..
> 

Sorry for the red herring here... it is building with both 2.6 and 3.1
but failing in the 3.1 portion of the build.
Comment 17 Nikolaj Šujskij 2010-06-07 16:45:18 UTC
(In reply to comment #11)
> OK. I'm assuming that other users also didn't have locale set correctly.

 We have.

> (Portage users can set LC_ALL="${language_code}.UTF-8" in /etc/make.conf.)

 I really don't think that locale should be set in /etc/make.conf, do you?
Comment 18 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-07 17:26:00 UTC
When you set LC_ALL, then you don't need to set other LC_* variables. LC_ALL overrides other variables. You should set e.g. en_US.UTF-8, not POSIX locale.

Locale should be set e.g. in /etc/make.conf or /etc/env.d/02locale, not in /etc/portage/bashrc.

You should ensure that /etc/locale.gen contains appropriate lines. Example:
en_US.UTF-8 UTF-8

You should run locale-gen after changing /etc/locale.gen.

Please read http://www.gentoo.org/doc/en/utf-8.xml.
Comment 19 Dan A. Dickey 2010-06-07 17:42:25 UTC
Created attachment 234445 [details]
updated build.log with /etc/env.d/02locate created

Ok, I read through the doc you recommended - thanks for that!

I then:
  - deleted /etc/portage/bashrc
  - created /etc/env.d/02locale with the following single line in it:
LANG="en_us.UTF-8"
  - ran env-update, logged out & back in.

Then ran 'emerge -v --oneshot docutils' again.  Which failed.
I'm attaching the new build.log from that.
Comment 20 Dan A. Dickey 2010-06-07 17:44:19 UTC
P.S. - the output of locale now shows:
# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_us.UTF-8
LC_CTYPE="en_us.UTF-8"
LC_NUMERIC="en_us.UTF-8"
LC_TIME="en_us.UTF-8"
LC_COLLATE="en_us.UTF-8"
LC_MONETARY="en_us.UTF-8"
LC_MESSAGES="en_us.UTF-8"
LC_PAPER="en_us.UTF-8"
LC_NAME="en_us.UTF-8"
LC_ADDRESS="en_us.UTF-8"
LC_TELEPHONE="en_us.UTF-8"
LC_MEASUREMENT="en_us.UTF-8"
LC_IDENTIFICATION="en_us.UTF-8"
LC_ALL=
Comment 21 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-07 17:48:55 UTC
(In reply to comment #20)
> P.S. - the output of locale now shows:
> # locale
> locale: Cannot set LC_CTYPE to default locale: No such file or directory
> locale: Cannot set LC_MESSAGES to default locale: No such file or directory
> locale: Cannot set LC_ALL to default locale: No such file or directory

You should add appropriate line to /etc/locale.gen and run locale-gen.
See comment #18 or UTF-8 documentation.

(In reply to comment #19)
>   - created /etc/env.d/02locale with the following single line in it:
> LANG="en_us.UTF-8"

Also add the following line to this file:
LC_ALL="en_US.UTF-8"

Next run env-update, log out and log in.
Comment 22 Dan A. Dickey 2010-06-07 17:58:36 UTC
(In reply to comment #21)

Wow.  Somedays I just shoot myself in the foot.  :)

Look closely at my previous posts.. I set "en_us.UTF-8".
lower case.
I changed it to "en_US.UTF-8" as I have in my locale.gen file,
redid the mumbo jumbo, ran the emerge - it works!

I now also just went and added the LC_ALL setting to 02locale,
redid the stuff, ran the emerge again - it still works!

So - works for me now.

Arfrever - thank you for the excellent gentoo utf-8 document,
and also thank you for being persistent and patient with me.
Comment 23 Nikolaj Šujskij 2010-06-07 19:11:15 UTC
(In reply to comment #21)
> Also add the following line to this file:
> LC_ALL="en_US.UTF-8"

 The document you've mentioned do not recommend setting LC_ALL
Comment 24 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-09 03:34:51 UTC
*** Bug 323241 has been marked as a duplicate of this bug. ***
Comment 25 Diego Stamigni 2010-06-09 08:11:13 UTC
(In reply to comment #23)
> (In reply to comment #21)
> > Also add the following line to this file:
> > LC_ALL="en_US.UTF-8"
> 
>  The document you've mentioned do not recommend setting LC_ALL
> 

adding the proper LC_ALL to /etc/env.d/02locale solved for me.
Comment 26 Juergen Rose 2010-06-09 08:27:17 UTC
What is the difference in setting LC_ALL or LANG in /etc/env.d/02locate?
What is recommended?
Comment 27 Ivan 2010-06-09 10:50:12 UTC
(In reply to comment #18)
> When you set LC_ALL, then you don't need to set other LC_* variables. LC_ALL
> overrides other variables. You should set e.g. en_US.UTF-8, not POSIX locale.
> 
> Locale should be set e.g. in /etc/make.conf or /etc/env.d/02locale, not in
> /etc/portage/bashrc.
> 
> You should ensure that /etc/locale.gen contains appropriate lines. Example:
> en_US.UTF-8 UTF-8
> 
> You should run locale-gen after changing /etc/locale.gen.
> 
> Please read http://www.gentoo.org/doc/en/utf-8.xml.
> 

If you read http://www.gentoo.org/doc/en/guide-localization.xml it says:

"Warning: Using LC_ALL is strongly discouraged as it can't be overridden later on. Please use it only when testing and never set it in a startup file. "

So you're now telling us to override the documentation there?

I myself have had a bug being caused (can't remember which one though) by me setting LC_ALL; see also http://bugs.gentoo.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__all__&product=&content=LC_ALL
Comment 28 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-09 20:16:34 UTC
*** Bug 323361 has been marked as a duplicate of this bug. ***
Comment 29 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-12 13:27:47 UTC
*** Bug 323637 has been marked as a duplicate of this bug. ***
Comment 30 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-07-06 12:06:18 UTC
*** Bug 327095 has been marked as a duplicate of this bug. ***
Comment 31 Burak 2010-07-07 07:34:05 UTC
It still does not compile for my case. I keep on getting the same error.
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
Comment 32 Alexander Koryushkin 2010-07-08 10:32:16 UTC
Created attachment 237997 [details]
different build.log

LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=ru_RU.UTF-8
Comment 33 Geoff Madden 2010-07-08 13:07:49 UTC
I had tried all the suggestions in this thread ,on both my machines x86_64 & x86
and still get the same error ie: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 211: ordinal not in range (128). Methinks there is a problem here, will include my build & environment logs.
Comment 34 Geoff Madden 2010-07-08 13:16:05 UTC
Created attachment 238027 [details]
emerge info + emerge -pqv
Comment 35 Geoff Madden 2010-07-08 13:17:00 UTC
Created attachment 238029 [details]
build log dev-python/docutils-0.7_pre6334
Comment 36 Geoff Madden 2010-07-08 13:17:37 UTC
Created attachment 238031 [details]
environment file
Comment 37 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-07-08 13:19:32 UTC
(In reply to comment #36)

This shows:
declare -x LC_ALL="POSIX"
Comment 38 Geoff Madden 2010-07-10 09:35:06 UTC
True that is what is revealed, and the locale command shows everything set as posix .I read the document about locales but there isn't any info on how to make a change from posix to my locale en_AU. Any help appreciated.
Geoff
Comment 39 Geoff Madden 2010-07-10 09:52:59 UTC
(In reply to comment #37)
> (In reply to comment #36)
> 
> This shows:
> declare -x LC_ALL="POSIX"
> 

regard #38 I manged to get my lang changed V 02locale ,but the rest of the locales show up as POSIX
Comment 40 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-07-12 10:13:19 UTC
*** Bug 327863 has been marked as a duplicate of this bug. ***
Comment 41 fkhp 2010-07-13 07:41:50 UTC
(In reply to comment #40)
> *** Bug 327863 has been marked as a duplicate of this bug. ***
> 
still fails to build:
.......
copying docutils/writers/odf_odt/__init__.py -> build-3.1/lib/docutils/writers/odf_odt
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
copying aux dirs
warning: copy_build_py_2to3: byte-compiling is disabled, skipping.

running build_scripts
creating build-3.1/scripts-3.1
.......
copying docutils/writers/s5_html/themes/big-black/__base__ -> build-3.1/lib/docutils/writers/s5_html/themes/big-black
PYTHONPATH=../build-3.1/lib python3.1 ../build-3.1/lib/tools/buildhtml.py --stylesheet-path=../html4css1.css --traceback ..
/// Processing directory: ..
    ::: Processing: THANKS.txt
Traceback (most recent call last):
  File "../build-3.1/lib/tools/buildhtml.py", line 244, in <module>
    Builder().run()
  File "../build-3.1/lib/tools/buildhtml.py", line 186, in run
    self.visit(recurse, root, dirs+files)
  File "../build-3.1/lib/tools/buildhtml.py", line 211, in visit
    prune = self.process_txt(directory, name)
  File "../build-3.1/lib/tools/buildhtml.py", line 237, in process_txt
    settings=settings)
  File "/var/tmp/paludis/dev-python-docutils-0.7/work/docutils-0.7/build-3.1/lib/docutils/core.py", line 357, in publish_file
    enable_exit_status=enable_exit_status)
  File "/var/tmp/paludis/dev-python-docutils-0.7/work/docutils-0.7/build-3.1/lib/docutils/core.py", line 641, in publish_programmatically
    output = pub.publish(enable_exit_status=enable_exit_status)
  File "/var/tmp/paludis/dev-python-docutils-0.7/work/docutils-0.7/build-3.1/lib/docutils/core.py", line 203, in publish
    self.settings)
  File "/var/tmp/paludis/dev-python-docutils-0.7/work/docutils-0.7/build-3.1/lib/docutils/readers/__init__.py", line 68, in read
    self.input = self.source.read()
  File "/var/tmp/paludis/dev-python-docutils-0.7/work/docutils-0.7/build-3.1/lib/docutils/io.py", line 258, in read
    data = self.source.read()
  File "/usr/lib64/python3.1/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1546: ordinal not in range(128)

!!! ERROR in dev-python/docutils-0.7::gentoo:
!!! In src_compile at line 6200
!!! buildhtml.py failed
Comment 42 fkhp 2010-07-13 07:42:57 UTC
# emerge --info docutils
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.5.0, glibc-2.11.2-r0, 2.6.34-ccs-r1 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.34-ccs-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 12 Jul 2010 22:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2, 4.5.0
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=core2 -march=core2 -O2 -msse4.1 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-mtune=core2 -march=core2 -O2 -msse4.1 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache collision-protect distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.netnitco.net/ "
LANG="zh_CN.UTF-8"
LC_ALL="zh_CN.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="zh_CN en_US zh en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/local/portage /var/lib/layman/x11 /var/lib/layman/vmware /var/lib/layman/gentoo-china /var/lib/layman/gentoo-taiwan /var/lib/layman/sunrise /var/lib/layman/gnome /var/lib/layman/mozilla"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac accessibility acl acpi alsa amd64 ao apache2 bash-completion berkdb branding bzip2 cairo caps cdr cjk cli consolekit cracklib crypt cups cxx dbus djvu doc dri dts dvd dvdr eds emboss encode esd evo examples exif fam ffmpeg firefox flac fortran gdbm gdu gif gimp gnome gnome-keyring gphoto2 gpm gstreamer gtk guile i18n iconv icu introspection ipv6 jadetex java jpeg jpeg2k latex lcms ldap libnotify mad midi mikmod mmap mmx mng modules mp3 mp4 mpeg mudflap multilib mysql nas nautilus ncurses networkmanager nfs nls nntp nptl nptlonly nsplugin nvidia ogg opengl openmp pam pango pch pcre pda pdf perl php png policykit ppds pppd python qt3support qt4 readline reflection samba scsi sdl session smp snmp spell spl sqlite sse sse2 sse3 ssl ssse3 startup-notification suid svg sysfs tcpd threads tiff tk truetype unicode usb v4l2 vim-syntax vorbis x264 xattr xcb xml xmp xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ens1370 hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN en_US zh en" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vmwgfx vmwlegacy nouveau nvidia nv vmware vesa svga" XTABLES_ADDONS="cui gfw zhang ipset" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-python/docutils-0.7_pre6334 was built with the following:
USE="(multilib) -emacs -glep" 

gentoo ~ # 
Comment 43 fkhp 2010-07-13 09:14:49 UTC
there are utf-8 chars in the configuration, so ascii.py might not be able to deal with it. so blindly guess should use utf-8.py instead of ascii.py.
Comment 44 fkhp 2010-07-13 09:23:17 UTC
gentoo ~ # ls /usr/lib64/python3.1/encodings/utf*8*
/usr/lib64/python3.1/encodings/utf_8.py   /usr/lib64/python3.1/encodings/utf_8_sig.py
/usr/lib64/python3.1/encodings/utf_8.pyc  /usr/lib64/python3.1/encodings/utf_8_sig.pyc
/usr/lib64/python3.1/encodings/utf_8.pyo  /usr/lib64/python3.1/encodings/utf_8_sig.pyo
gentoo ~ # ls /usr/lib64/python2.6/encodings/utf*8*
/usr/lib64/python2.6/encodings/utf_8.py   /usr/lib64/python2.6/encodings/utf_8_sig.py
/usr/lib64/python2.6/encodings/utf_8.pyc  /usr/lib64/python2.6/encodings/utf_8_sig.pyc
/usr/lib64/python2.6/encodings/utf_8.pyo  /usr/lib64/python2.6/encodings/utf_8_sig.pyo
gentoo ~ # 
Comment 45 fkhp 2010-07-13 09:28:03 UTC
it seems should use ascii.py or utf_8.py according to the locale of the system.
Comment 46 fkhp 2010-07-13 09:39:18 UTC
as most locales have utf-8 charmap, so it seems utf_8.py should be preffered.
Comment 47 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-07-15 19:40:04 UTC
*** Bug 327863 has been marked as a duplicate of this bug. ***
Comment 48 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-07-29 22:59:32 UTC
*** Bug 328721 has been marked as a duplicate of this bug. ***
Comment 49 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-07-31 13:07:22 UTC
Reassigning to avoid spamming maintainers.
Comment 50 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-07-31 13:08:20 UTC
*** Bug 330505 has been marked as a duplicate of this bug. ***
Comment 51 Ivan 2010-07-31 13:16:26 UTC
Why is this closed?  It still won't build here...
Comment 52 sagnwook Kim 2010-11-10 06:46:16 UTC
same ascii.py bug here.

emerge --info =dev-python/docutils-0.7
Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r10 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.31-gentoo-r10-i686-Intel-R-_Core-TM-2_Quad_CPU_Q9400_@_2.66GHz-with-gentoo-1.12.13
Timestamp of tree: Tue, 26 Oct 2010 08:30:02 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.4.6, 2.6.4-r1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.2, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.kaist.ac.kr/gentoo/ ftp://ftp.lecl.net/pub/gentoo/ http://ftp.daum.net/gentoo/ http://ftp.lecl.net/pub/gentoo/ http://ftp.kaist.ac.kr/pub/gentoo/ ftp://ftp.daum.net/gentoo/ http://ftp.jaist.ac.jp/pub/Linux/Gentoo/ ftp://ftp.jaist.ac.jp/pub/Linux/Gentoo/ "
LANG="ko_KR.UTF-8"
LC_ALL="ko_KR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ko"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/local/portage/layman/gentoo-kr"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl alsa aoss asf bash-completion berkdb bzip2 cairo cjk cli cracklib crypt cups cxx dbus dri firefox flac fortran gdbm gif glitz gnome gpm gstreamer gtk hal iconv immqt-bc ipv6 java jpeg modules mp3 mp4 mudflap ncurses new-login nls nptl nptlonly opengl openmp pam pcre pdf perl png pppd python qt3support readline scim session sqlite ssl svg symlink sysfs tcpd threads tiff truetype unicode vorbis win32codecs x86 xorg 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 mmap_emul 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 cgi cgid 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ko" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

and as you can see, my locale is set as ko_KR.UTF-8

I've read the utf-8 doc. and mine is set properly.
Comment 53 sagnwook Kim 2010-11-10 07:02:05 UTC
Created attachment 253845 [details]
ko_KR.UTF-8 build log

my build.log goes here. 

Thank you for your help (in advance).
Comment 54 sagnwook Kim 2010-11-10 07:06:24 UTC
very sorry for the frequent posts...

but mine and Alexander's russian UTF-8 setting makes similar build logs, that are different from en_US guys..
Comment 55 sagnwook Kim 2010-11-15 07:24:15 UTC
When i re-localed my system to en_US.UTF-8 from ko_KR.UTF-8,
I could successfully emerge the docutils.

Then I switched back to ko_KR.UTF-8.
No problem so far.

However, I still think this is a bug.