Mailing List Archive

Permanent workaround for x11-libs/libxcb build problem
Some machines (e.g. my laptop) experience problems when building the
package x11-libs/libxcb

=====================================================================
Traceback (most recent call last):
File "/var/tmp/portage/x11-libs/libxcb-1.16.1/work/libxcb-1.16.1/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.1/work/libxcb-1.16.1/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.1/work/libxcb-1.16.1/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.1/work/libxcb-1.16.1-abi_x86_64.amd64/src'
make: *** [Makefile:799: all-recursive] Error 1
ERROR: x11-libs/libxcb-1.16.1::gentoo failed (compile phase):
emake failed
=====================================================================

Every so often libxcb gets (re)built and this error pops up. It's
always vaguely familiar, so I dig through my gentoo list email, and
figure out that libxcb wants 'LC_ALL="C"' and set it for that one time.
I got tired of re-doing this all the time. This problem is a textbook
example for package.env. Two one-line files solve the error permanently.
Make sure that you've created directories "/etc/portage/package.env/"
and "/etc/portage/env/". Here are the two one-line files.

[thimk2][root][~] cat /etc/portage/env/libxcb.conf
LC_ALL="C"

[thimk2][root][~] cat /etc/portage/package.env/package.env
x11-libs/libxcb libxcb.conf

If you're already using package.env, add the line...
x11-libs/libxcb libxcb.conf
...to your existing package.env file.

--
Roses are red
Roses are blue
Depending on their velocity
Relative to you