Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913655 - x11-libs/libxcb-1.16 - UnicodeEncodeError: 'latin-1' codec can't encode character '\u201c' in position 68: ordinal not in range(256)
Summary: x11-libs/libxcb-1.16 - UnicodeEncodeError: 'latin-1' codec can't encode chara...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL: https://gitlab.freedesktop.org/xorg/l...
Whiteboard:
Keywords:
: 916504 917349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-04 18:12 UTC by Martin Mokrejš
Modified: 2024-04-15 15:32 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 Martin Mokrejš 2023-09-04 18:12:24 UTC
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing libtool commands

  Package: libxcb 1.16

  Configuration
    XDM support.........: yes
    sendmsg fd passing..: yes
    Build unit tests....: yes
      with html results.: yes
    XCB buffer size.....: 16384

  X11 extensions
    Composite...........: yes
    Damage..............: yes
    Dbe.................: yes
    Dpms................: yes
    Dri2................: yes
    Dri3................: yes
    GenericEvent........: no
    Glx.................: yes
    Randr...............: yes
    Record..............: yes
    Render..............: yes
    Resource............: yes
    Screensaver.........: yes
    selinux.............: no
    Shape...............: yes
    Shm.................: yes
    Sync................: yes
    Xevie...............: no
    Xfixes..............: yes
    Xfree86-dri.........: yes
    xinerama............: yes
    xinput..............: yes
    xkb.................: yes
    xprint..............: no
    xtest...............: yes
    xv..................: yes
    xvmc................: yes

  Used CFLAGS:
    CPPFLAGS............: 
    CFLAGS..............: -O2 -pipe -march=native -ftree-vectorize

  Installation:
    Prefix..............: /usr

>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16 ...
 * abi_x86_64.amd64: running multilib-minimal_abi_src_compile
make -j5 
Making all in src
make[1]: Entering directory '/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16-abi_x86_64.amd64/src'
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/xproto.xml
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/bigreq.xml
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/xc_misc.xml
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/composite.xml
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/damage.xml
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/dbe.xml
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/dpms.xml
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/dri2.xml
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/dri3.xml
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/present.xml
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/glx.xml
Traceback (most recent call last):
  File "/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py", line 3395, in <module>
    module.generate()
  File "/usr/lib/python3.11/site-packages/xcbgen/state.py", line 131, in generate
    item.out(name)
  File "/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py", line 3212, in c_request
    _man_request(self, name, void=not self.reply, aux=False)
  File "/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py", line 2676, in _man_request
    f.write('%s \\- %s\n' % (func_name, brief))
UnicodeEncodeError: 'latin-1' codec can't encode character '\u201c' in position 68: ordinal not in range(256)
make[1]: *** [Makefile:1425: composite.c] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16-abi_x86_64.amd64/src'
make: *** [Makefile:799: all-recursive] Error 1
 * ERROR: x11-libs/libxcb-1.16::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=x11-libs/libxcb-1.16::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-libs/libxcb-1.16::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-libs/libxcb-1.16/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/libxcb-1.16/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16-abi_x86_64.amd64'
 * S: '/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16'
Comment 1 Martin Mokrejš 2023-09-04 18:12:52 UTC
# emerge --info '=x11-libs/libxcb-1.16::gentoo'
Portage 3.0.49 (python 3.11.4-final-0, default/linux/amd64/17.1/no-multilib, gcc-13, glibc-2.37-r3, 6.4.11 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.4.11-x86_64-Intel-R-_Core-TM-_i7-7820HQ_CPU_@_2.90GHz-with-glibc2.37
KiB Mem:    32735940 total,   9475068 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 04 Sep 2023 18:00:01 +0000
Head commit of repository gentoo: 595a71f7c0afb880a1c08503b9090bf862f52c06
Head commit of repository jgenco: 661ac9fc23a0768a0363a86177581d85099dc39e

Head commit of repository randall: 1878db2875a45dfa0a8c37a1f38035da7deb5cbc

Head commit of repository stefantalpalaru: ca35128a9734b5cbf691bacfd6b06819c4484e46

sh bash 5.2_p15-r6
ld GNU ld (Gentoo 2.39 p5) 2.39.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r6::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.36.0::gentoo
dev-lang/python:           2.7.18_p112::stefantalpalaru, 3.10.12::gentoo, 3.11.4::gentoo, 3.12.0_beta4_p1::gentoo
dev-lang/rust:             1.70.0::gentoo
dev-util/cmake:            3.27.4::gentoo
dev-util/meson:            1.1.0::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.37::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.69-r5::gentoo, 2.71-r7::gentoo
sys-devel/automake:        1.14.1-r2::gentoo, 1.15.1-r2::gentoo, 1.16.5-r1::gentoo
sys-devel/binutils:        2.39-r4::gentoo, 2.40-r6::gentoo, 2.41-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           14.0.6-r4::gentoo, 15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/gcc:             10.3.0::gentoo, 11.3.0::gentoo, 12.2.1_p20230304::gentoo, 13.2.0::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             14.0.6-r1::gentoo, 15.0.7::gentoo, 16.0.6::gentoo
sys-devel/llvm:            14.0.6-r4::gentoo, 15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.4::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

jgenco
    location: /var/db/repos/jgenco
    sync-type: git
    sync-uri: https://github.com/jgenco/jgenco-overlay
    masters: gentoo
    volatile: False

randall
    location: /var/db/repos/randall
    sync-type: git
    sync-uri: https://github.com/ran-dall/portage-overlay
    masters: gentoo
    volatile: False

stefantalpalaru
    location: /var/db/repos/stefantalpalaru
    sync-type: git
    sync-uri: https://github.com/stefantalpalaru/gentoo-overlay
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 NPSL Nero-EULA-US AdobeFlash-10.3 AdobeFlash-11.x OPERA-2014 RAR Intel-SDP intel-ucode Skype-TOS vmware linux-firmware fasta vienna-rna unafold GRL MSttfEULA hplip-plugin meme mRNAmarkup ApE ICS ipw3945 finchtv modeller gmap master-pdf-editor abyss swiss-prot Aladdin AVASYS truecrypt-3.0 pyvcf Non-profit-OSL-3.0 estscan bcca_2010 oncotator Adobe blat staden CeCILL-1.1 phrap STRIDE cctbx-2.0 bh-luxi ARIADNE unRAR all-rights-reserved trf annovar_personal_only stampy-academic BSD-BroadInstitute UPennState freedist free-noncomm blasr sun-jlfgr FLI-Jena PSTT netperf sun-jsr67 xv vim.org OSGi-Specification-2.0 colt mod_fastcgi googleearth google-chrome ACE AFL churchill genscan no-source-code linux-fw-redistributable ISSL JSON MPEG-4 Apache-2.0 BSD MIT BSD-2 FSFAP unicode Subversion OPERA-2018 ms-teams-pre TeamViewer PSF-2.4 merlin android julius CROSSOVER-3 lha PUEL-11 supermicro microsoft-edge"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /usr/share/maven-bin-3.6/conf /usr/share/maven-bin-3.8/conf /usr/share/maven-bin-3.9/conf /var/lib/hsqldb /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/php/phpdbg-php8.2/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 /etc/vmware-installer"
CXXFLAGS="-O2 -pipe -march=native -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=native -ftree-vectorize"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -ftree-vectorize"
GENTOO_MIRRORS="http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en_US en_GB en cs"
MAKEOPTS="-j5"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 amr amrenc aom apache apache2 archive armadillo asm audit av1 avx avx2 berkdb blas bluetooth bluray bmp boost bz2 bzip2 cairo caps ccid cdda cdio cdr cdrom cgi chromium cli codec2 coin cpudetection cracklib crypt cryptlib cryptsetup cups curl cxx dav1d dbus device-mapper dhcp directfb directx dri dri3 drm dvbpsi dvd dvda dxf dxva2 egl elogind emboss encode eselect-ldso eudev exif faad fax fbcon fdk ffmpeg fftw flac fontconfig foomatic fortran gbm gcrypt gd gdal gdbm geoip geolocation georeferencer geos gimp glpk gml gmp gnutls gpm gps grass gstreamer gtk gtk3 h.264 h.265 h264 h265 hal haptic hdf5 heif hevc hpijs hwdb iconv id3tag imaging innodb inotify iproute2 ipv6 java javafx javascript jce jpeg jpeg2k jpg js jscript kdrive keymap kms ladspa lapack laptop las lcms libaom libdrm libkms libnotify librtmp libsoxr libtesseract libtirpc libv4l libxml2 live lm-sensors lm_sensors lz4 lzma mad mariadb matroska mjpeg mmal mmx modemmanager mp3 mpeg mtp mysql ncurses netcdf networkmanager nfs nls nptl nptlonly nscd nss ntfsprogs nvenc objc ocr odbc ogdi ogg openal opencl opengl openh264 openmp openssl opus pam parport pbs pcre pcre16 pcsc pcsc-lite pdal pdf perl php png polar policykit polkit postgres ppds pppd python qemu qml qt3support qt4 qt5 rav1e readline rendering resolvconf romio rubberband scanner seccomp server session sha slideshow smartcard sndfile sndio split-usr sqlite srt sse sse2 sse3 sse4_1 sse4_2 ssh ssl sslv3 ssse3 startup-notification suexec svg svt-av1 syslog tcl tcpd test-rust threads tiff tk tkip tools truetype twolame udev unicode unwind upnp usb v4l v4l2 vaapi vidstab vim-syntax virtualbox vmaf vnc vorbis vp8 vp9 vpx vulkan wavpack wayland webp wifi x11 x264 x265 xa xattr xcb xephyr xft xls xml xmp xorg xrandr xv xvfb xvid xvmc zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" ALSA_CARDS="hdspm usb-usx2y" APACHE2_MODULES="alias authn_core authz_core socache_shmcb authz_host auth_basic auth_digest cgi cgid deflate dir env filter include info mem_cache mime mime_magic negotiation remoteip setenvif status userdir vhost_alias rewrite usertrack cache file_cache disk_cache charset_lite log_config log_forensic unixd" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="gpsclock navcom ntrip rtcm104v2 rtcm104v3 ublox nmea0183 nmea2000 aivdm passthrough" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US en-GB en cs" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" OPENMPI_RM="pbs" PHP_TARGETS="php5-4 php5-5" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python2_7 python3_9 python3_10 python3_11" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="vesa virtualbox vboxvideo vmware vmvga vmwgfx fbdev intel iris i915 i965 d3d12" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Matt Turner gentoo-dev 2023-09-04 22:02:51 UTC
Do you have no "UTF-8" locales enabled?
Comment 3 Martin Mokrejš 2023-09-04 22:43:10 UTC
# locale -a
C
cs_CZ.cp1250
cs_CZ.ibm852
cs_CZ.iso88592
cs_CZ.utf8
C.utf8
en_GB.utf8
en_US
en_US.iso88591
en_US.utf8
POSIX
#

# locale 
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=
#
Comment 4 Matt Turner gentoo-dev 2023-09-05 00:04:23 UTC
Thanks, that looks reasonable. The only thing I notice when comparing with the output on my system

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=

is that my system has the .UTF-8 suffixes and yours doesn't.

My /etc/locale.conf contains

> LANG=en_US.UTF-8

I wonder if adding the .UTF-8 suffix there (if it's missing) resolves the issue?
Comment 5 Martin Mokrejš 2023-09-05 06:47:07 UTC
Indeed, export LC_ALL="en_US.UTF-8" fixes that. I think I poked over several similar issues with LOCALE="C" over the past months/years with this machine. Recently https://bugs.gentoo.org/910170 . I think the automated build tests should cover such basic locales too.
Comment 6 Matt Turner gentoo-dev 2023-09-28 02:10:56 UTC
Could you try applying https://gitlab.freedesktop.org/xorg/proto/xcbproto/-/merge_requests/44 to xcb-proto and then rebuilding libxcb?

Thanks!
Comment 7 Martin Mokrejš 2023-09-28 21:03:09 UTC
No, it did not help. First I made sure I can still repeat the original issue with libxcb. I can. Then I got the 44.patch applied to x11-base/xcb-proto-1.16.0, then retried installation of libxcb and I hit the same error still.

# export LANG=en_US
# emerge -1 x11-base/xcb-proto
...
>>> Emerging (1 of 1) x11-base/xcb-proto-1.16.0::gentoo
>>> Downloading 'http://ftp.fi.muni.cz/pub/linux/gentoo/distfiles/35/xcb-proto-1.16.0.tar.xz'
--2023-09-28 22:58:20--  http://ftp.fi.muni.cz/pub/linux/gentoo/distfiles/35/xcb-proto-1.16.0.tar.xz
Resolving ftp.fi.muni.cz... 147.251.48.205, 2001:718:801:230::cd
Connecting to ftp.fi.muni.cz|147.251.48.205|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 151612 (148K) [application/x-xz]
Saving to: '/mnt/large/usr/portage/distfiles/xcb-proto-1.16.0.tar.xz.__download__'

/mnt/large/usr/port 100%[===================>] 148.06K   253KB/s    in 0.6s    

2023-09-28 22:58:21 (253 KB/s) - '/mnt/large/usr/portage/distfiles/xcb-proto-1.16.0.tar.xz.__download__' saved [151612/151612]

 * xcb-proto-1.16.0.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                               [ ok ]
>>> Unpacking source...
>>> Unpacking xcb-proto-1.16.0.tar.xz to /var/tmp/portage/x11-base/xcb-proto-1.16.0/work
>>> Source unpacked in /var/tmp/portage/x11-base/xcb-proto-1.16.0/work
>>> Preparing source in /var/tmp/portage/x11-base/xcb-proto-1.16.0/work/xcb-proto-1.16.0 ...
 * =========================================================================================================================================================================================================================================
 * Applying user patches from /etc/portage/patches ...
 * Applying xcb-proto-1.16.0_Use_simply_quote_signs_44.patch ...
patching file src/composite.xml
patching file src/shm.xml
patching file src/composite.xml                                                                                                                                                                                                      [ ok ]
 * User patches applied.
 * =========================================================================================================================================================================================================================================
 * Running elibtoolize in: xcb-proto-1.16.0/
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/x11-base/xcb-proto-1.16.0/work/xcb-proto-1.16.0 ...
/var/tmp/portage/x11-base/xcb-proto-1.16.0/work/xcb-proto-1.16.0/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share --disable-silent-rules --docdir=/usr/share/doc/xcb-proto-1.16.0 --htmldir=/usr/share/doc/xcb-proto-1.16.0/html --libdir=/usr/lib64

...

# emerge -1 x11-libs/libxcb
...
>>> Emerging (1 of 1) x11-libs/libxcb-1.16::gentoo
 * libxcb-1.16.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                    [ ok ]
 * Checking whether python3_12 is suitable ...
 *   dev-lang/python:3.12[xml(+)] ...                                                                                                                                                                                                [ ok ]
 *   python_check_deps ...
 *     >=x11-base/xcb-proto-1.16.0[python_targets_python3_12(-)] ...                                                                                                                                                                 [ !! ]
 * Checking whether python3_11 is suitable ...
 *   dev-lang/python:3.11[xml(+)] ...                                                                                                                                                                                                [ ok ]
 *   python_check_deps ...
 *     >=x11-base/xcb-proto-1.16.0[python_targets_python3_11(-)] ...                                                                                                                                                                 [ ok ]
 * Using python3.11 to build (via PYTHON_COMPAT iteration)
...
/usr/bin/python3.11 /var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py	-c "libxcb 1.16" -l "X Version 11" \
	-s "3" -p / \
	 \
	//usr/share/xcb/dpms.xml
Traceback (most recent call last):
  File "/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py", line 3395, in <module>
    module.generate()
  File "/usr/lib/python3.11/site-packages/xcbgen/state.py", line 131, in generate
    item.out(name)
  File "/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py", line 3212, in c_request
    _man_request(self, name, void=not self.reply, aux=False)
  File "/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16/src/c_client.py", line 2676, in _man_request
    f.write('%s \\- %s\n' % (func_name, brief))
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2018' in position 81: ordinal not in range(256)
make[1]: *** [Makefile:1425: composite.c] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16-abi_x86_64.amd64/src'
make: *** [Makefile:799: all-recursive] Error 1
 * ERROR: x11-libs/libxcb-1.16::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=x11-libs/libxcb-1.16::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-libs/libxcb-1.16::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-libs/libxcb-1.16/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/libxcb-1.16/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16-abi_x86_64.amd64'
 * S: '/var/tmp/portage/x11-libs/libxcb-1.16/work/libxcb-1.16'
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-29 20:14:34 UTC
*** Bug 916504 has been marked as a duplicate of this bug. ***
Comment 9 Matt Turner gentoo-dev 2023-11-15 03:05:19 UTC
*** Bug 917349 has been marked as a duplicate of this bug. ***
Comment 10 Enrique Domínguez 2023-11-18 03:08:06 UTC
known,
https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/72
they list utf-8 in
/usr/share/xcb/composite.xml
/usr/share/xcb/shm.xml
but no with (¿?)
/usr/share/xcb/xinput.xml
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-18 03:28:45 UTC
(In reply to Enrique Domínguez from comment #10)
> known,
> https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/72
> they list utf-8 in
> /usr/share/xcb/composite.xml
> /usr/share/xcb/shm.xml
> but no with (¿?)
> /usr/share/xcb/xinput.xml

Yes, that was already linked above. Please just use a UTF 8 locale.
Comment 12 Tiago Sousa 2023-12-06 15:04:24 UTC
Quick fix for me was: PYTHONUTF8=1 emerge -1av libxcb

Pretty annoying to have packages enforcing locales instead of gracefully falling back to whatever is available. From what I understand, upstream realizes the issue and has done some commits to fix it, so here's hoping for 1.17.
Comment 13 Sam 2024-04-03 12:21:31 UTC
(In reply to Tiago Sousa from comment #12)
> Quick fix for me was: PYTHONUTF8=1 emerge -1av libxcb

Bumped into this issue on one of my machines. This did the trick. Thanks, Tiago!
Comment 14 Larry the Git Cow gentoo-dev 2024-04-15 15:32:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e4408ce383c4a041baf120c14465f4f50c2a42a

commit 6e4408ce383c4a041baf120c14465f4f50c2a42a
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2024-04-15 15:19:49 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2024-04-15 15:32:46 +0000

    x11-libs/libxcb: Version bump to 1.17.0
    
    Closes: https://bugs.gentoo.org/913655
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 x11-libs/libxcb/Manifest             |  1 +
 x11-libs/libxcb/libxcb-1.17.0.ebuild | 56 ++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)