Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Python and locale error building packages?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
shimitar
Guru
Guru


Joined: 23 Nov 2003
Posts: 334
Location: Italy, Torino

PostPosted: Wed Nov 13, 2024 7:45 am    Post subject: [SOLVED] Python and locale error building packages? Reply with quote

I am unable to properly run:
Code:

emerge -uv --deep --newuse --with-bdeps=y @world


A few packages fails with errors mostly like:
Code:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.12/rst2man", line 8, in <module>
    sys.exit(rst2man())
             ^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/docutils/core.py", line 760, in rst2man
    rst2something('manpage', 'Unix manual (troff)', 'user/manpage.html')
  File "/usr/lib/python3.12/site-packages/docutils/core.py", line 739, in rst2something
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python3.12/locale.py", line 615, in setlocale
    return _setlocale(category, locale)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
locale.Error: unsupported locale setting


It's always a python and locale related error.

My locale.gen is:
Code:

it_IT.UTF-8 UTF-8


i have run multiple times:
Code:

willy-pc /etc/portage # locale-gen
 * Generating 2 locales (this might take a while) with 8 jobs
 *  (2/2) Generating C.UTF-8 ...                                                                                                                                                       [ ok ]
 *  (1/2) Generating it_IT.UTF-8 ...                                                                                                                                                   [ ok ]
 * Generation complete
 * Adding locales to archive ...   


updated the env & such, to no avail.

In my make.conf i have:
Code:

CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3"

COMMON_FLAGS="-O2 -pipe -march=skylake -mabm -madx -maes -mavx -mavx2 -mbmi -mbmi2 -mclflushopt -mcx16 -mf16c -mfma -mfsgsbase -mfxsr -mhle -mlzcnt -mmmx -mmovbe -mpclmul -mpopcnt -mprfchw -mrdrnd -mrdseed -mrtm -msahf -msgx -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mxsave -mxsavec -mxsaveopt -mxsaves --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=8192
"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
LANG=it

USE="-gpm -webengine networkmanager samba scanner zeroconf"

SANE_BACKENDS="net"
ABI_X86="32 64"


and i am on profile:
Code:

willy-pc /etc/portage # eselect profile show
Current /etc/portage/make.profile symlink:
  default/linux/amd64/23.0/split-usr/desktop/plasma


What is missing here?
_________________
Willy Gardiol
willy@gardiol.org


Last edited by shimitar on Thu Nov 14, 2024 9:21 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31349
Location: here

PostPosted: Wed Nov 13, 2024 8:28 am    Post subject: Reply with quote

What does the locale and eselect locale list commands return?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
shimitar
Guru
Guru


Joined: 23 Nov 2003
Posts: 334
Location: Italy, Torino

PostPosted: Wed Nov 13, 2024 12:05 pm    Post subject: Reply with quote

Code:

willy-pc /etc/portage # locale
LANG=C.UTF8
LC_CTYPE="C.UTF8"
LC_NUMERIC="C.UTF8"
LC_TIME="C.UTF8"
LC_COLLATE="C.UTF8"
LC_MONETARY="C.UTF8"
LC_MESSAGES="C.UTF8"
LC_PAPER="C.UTF8"
LC_NAME="C.UTF8"
LC_ADDRESS="C.UTF8"
LC_TELEPHONE="C.UTF8"
LC_MEASUREMENT="C.UTF8"
LC_IDENTIFICATION="C.UTF8"
LC_ALL=
willy-pc /etc/portage # eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   C.utf8
  [3]   POSIX
  [4]   it_IT.utf8
  [5]   C.UTF8 *
  [ ]   (free form)

_________________
Willy Gardiol
willy@gardiol.org
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1960

PostPosted: Wed Nov 13, 2024 1:23 pm    Post subject: Reply with quote

shimitar wrote:
In my make.conf i have:
Code:
...
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
LANG=it

Please change these to "LC_MESSAGES=C.UTF8" and remove "LANG=it"
Then, run eselect locale set 4
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1041

PostPosted: Wed Nov 13, 2024 3:48 pm    Post subject: Reply with quote

in /etc/portage/make.conf

LANG="it"

should be

LANG="it_IT.utf8"
_________________
LRS 64/32
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31349
Location: here

PostPosted: Wed Nov 13, 2024 7:05 pm    Post subject: Reply with quote

sabayonino wrote:
in /etc/portage/make.conf

LANG="it"

should be

LANG="it_IT.utf8"

I think is useless set LANG=it in make.conf if you use eselect locale.
Perhaps it's better to set L10N, which is related to the language support of the packages you install.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
shimitar
Guru
Guru


Joined: 23 Nov 2003
Posts: 334
Location: Italy, Torino

PostPosted: Thu Nov 14, 2024 9:21 am    Post subject: Reply with quote

Thank you!
it worked just fine!
_________________
Willy Gardiol
willy@gardiol.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum