Задать вопрос
@Incredibeli

Почему не проходит test_float при сборке python 3.13.2 для сборки lfs и что делать?

Во время сборки python для LFS произошла ошибка в test_float. Всё что смог нарыть по ошибке снизу. GPT пишет, что проблема с локалями -- дескать они не установлены или locale-archive сломан -- но, как я понял, у меня с ними всё в порядке. Как я не менял LC_ переменные ничего не менияется. В интернетах решения тоже особо не нашёл -- там только есть похожие проблемы.

Работа make
sing random seed: 556068666
0:00:00 load avg: 4.91 Run 44 tests sequentially in a single process
0:00:00 load avg: 4.91 [ 1/44] test_array
0:00:03 load avg: 4.91 [ 2/44] test_base64
0:00:05 load avg: 4.83 [ 3/44] test_binascii
0:00:06 load avg: 4.83 [ 4/44] test_binop
0:00:06 load avg: 4.83 [ 5/44] test_bisect
0:00:06 load avg: 4.83 [ 6/44] test_bytes
0:00:11 load avg: 4.69 [ 7/44] test_bz2
0:01:14 load avg: 5.03 [ 8/44] test_cmath -- test_bz2 passed in 1 min 3 sec
0:01:15 load avg: 5.03 [ 9/44] test_codecs
0:02:26 load avg: 5.36 [10/44] test_collections -- test_codecs passed in 1 min 11 sec
0:02:28 load avg: 5.36 [11/44] test_complex
0:02:28 load avg: 5.36 [12/44] test_dataclasses
0:02:29 load avg: 5.36 [13/44] test_datetime
0:02:46 load avg: 5.34 [14/44] test_decimal
0:02:55 load avg: 5.13 [15/44] test_difflib
0:02:57 load avg: 5.13 [16/44] test_embed
0:03:07 load avg: 5.04 [17/44] test_float
test test_float failed
0:03:08 load avg: 5.04 [18/44] test_fstring -- test_float failed (1 error)
/sources/Python-3.13.2/Lib/test/test_fstring.py:1655: SyntaxWarning: invalid escape sequence '\N'
  self.assertEqual(f'{b"\N{OX}"=}', 'b"\\N{OX}"=b\'\\\\N{OX}\'')
0:03:10 load avg: 4.95 [19/44] test_functools
0:03:11 load avg: 4.95 [20/44] test_generators
0:03:11 load avg: 4.95 [21/44] test_hashlib
0:03:12 load avg: 4.95 [22/44] test_heapq
0:03:13 load avg: 4.95 [23/44] test_int
0:03:14 load avg: 4.95 [24/44] test_itertools
0:03:20 load avg: 4.95 [25/44] test_json
0:03:28 load avg: 5.12 [26/44] test_long
0:03:31 load avg: 5.03 [27/44] test_lzma
0:03:44 load avg: 5.02 [28/44] test_math
0:03:47 load avg: 5.02 [29/44] test_memoryview
0:03:50 load avg: 5.10 [30/44] test_operator
0:03:51 load avg: 5.10 [31/44] test_ordered_dict
0:03:53 load avg: 5.10 [32/44] test_patma
0:03:54 load avg: 5.10 [33/44] test_pickle
0:04:02 load avg: 5.16 [34/44] test_pprint
0:04:02 load avg: 5.16 [35/44] test_re
0:04:03 load avg: 5.16 [36/44] test_set
0:04:10 load avg: 5.22 [37/44] test_sqlite3
0:04:11 load avg: 5.22 [38/44] test_statistics -- test_sqlite3 skipped
0:04:21 load avg: 5.26 [39/44] test_str
0:04:23 load avg: 5.26 [40/44] test_struct
0:04:24 load avg: 5.26 [41/44] test_tabnanny
0:04:25 load avg: 5.24 [42/44] test_time
0:04:28 load avg: 5.24 [43/44] test_xml_etree
0:04:47 load avg: 5.35 [44/44] test_xml_etree_c

Total duration: 4 min 57 sec
Total tests: run=8,919 skipped=191
Total test files: run=44/44 failed=1 skipped=1
Result: FAILURE
make: *** [Makefile:902: profile-run-stamp] Error 2


Конкретно проверял ошибку самого теста
(lfs chroot) root:/sources/Python-3.13.2# LD_LIBRARY_PATH=/sources/Python-3.13.2 ./python -m test test_float -v
== CPython 3.13.2 (main, May 19 2025, 02:29:15) [GCC 14.2.0]
== Linux-6.12.28-1-MANJARO-x86_64-with-glibc2.41 little-endian
== Python build: release shared
== cwd: /sources/Python-3.13.2/build/test_python_worker_1835815æ
== CPU count: 8
== encodings: locale=ANSI_X3.4-1968 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests

Using random seed: 2640718974
0:00:00 load avg: 2.75 Run 1 test sequentially in a single process
0:00:00 load avg: 2.75 [1/1] test_float
test_getformat (test.test_float.FormatFunctionsTestCase.test_getformat) ... ok
test_format (test.test_float.FormatTestCase.test_format) ... ok
test_format_testfile (test.test_float.FormatTestCase.test_format_testfile) ... ok
test_issue35560 (test.test_float.FormatTestCase.test_issue35560) ... ok
test_issue5864 (test.test_float.FormatTestCase.test_issue5864) ... ok
test_error_message (test.test_float.GeneralFloatCases.test_error_message) ... ok
test_float (test.test_float.GeneralFloatCases.test_float) ... ok
test_float_ceil (test.test_float.GeneralFloatCases.test_float_ceil) ... ok
test_float_containment (test.test_float.GeneralFloatCases.test_float_containment) ... ok
test_float_floor (test.test_float.GeneralFloatCases.test_float_floor) ... ok
test_float_memoryview (test.test_float.GeneralFloatCases.test_float_memoryview) ... ok
test_float_mod (test.test_float.GeneralFloatCases.test_float_mod) ... ok
test_float_pow (test.test_float.GeneralFloatCases.test_float_pow) ... ok
test_float_with_comma (test.test_float.GeneralFloatCases.test_float_with_comma) ... ERROR
test_floatasratio (test.test_float.GeneralFloatCases.test_floatasratio) ... ok
test_floatconversion (test.test_float.GeneralFloatCases.test_floatconversion) ... ok
test_hash (test.test_float.GeneralFloatCases.test_hash) ... ok
test_hash_nan (test.test_float.GeneralFloatCases.test_hash_nan) ... ok
test_is_integer (test.test_float.GeneralFloatCases.test_is_integer) ... ok
test_keyword_args (test.test_float.GeneralFloatCases.test_keyword_args) ... ok
test_keywords_in_subclass (test.test_float.GeneralFloatCases.test_keywords_in_subclass) ... ok
test_noargs (test.test_float.GeneralFloatCases.test_noargs) ... ok
test_non_numeric_input_types (test.test_float.GeneralFloatCases.test_non_numeric_input_types) ... ok
test_underscores (test.test_float.GeneralFloatCases.test_underscores) ... ok
test_ends (test.test_float.HexFloatTestCase.test_ends) ... ok
test_from_hex (test.test_float.HexFloatTestCase.test_from_hex) ... ok
test_invalid_inputs (test.test_float.HexFloatTestCase.test_invalid_inputs) ... ok
test_roundtrip (test.test_float.HexFloatTestCase.test_roundtrip) ... ok
test_subclass (test.test_float.HexFloatTestCase.test_subclass) ... ok
test_whitespace (test.test_float.HexFloatTestCase.test_whitespace) ... ok
test_double_specials_do_unpack (test.test_float.IEEEFormatTestCase.test_double_specials_do_unpack) ... ok
test_float_specials_do_unpack (test.test_float.IEEEFormatTestCase.test_float_specials_do_unpack) ... ok
test_serialized_float_rounding (test.test_float.IEEEFormatTestCase.test_serialized_float_rounding) ... ok
test_inf_as_str (test.test_float.InfNanTest.test_inf_as_str) ... ok
test_inf_from_str (test.test_float.InfNanTest.test_inf_from_str) ... ok
test_inf_signs (test.test_float.InfNanTest.test_inf_signs) ... ok
test_nan_as_str (test.test_float.InfNanTest.test_nan_as_str) ... ok
test_nan_from_str (test.test_float.InfNanTest.test_nan_from_str) ... ok
test_nan_signs (test.test_float.InfNanTest.test_nan_signs) ... ok
test_repr (test.test_float.ReprTestCase.test_repr) ... ok
test_short_repr (test.test_float.ReprTestCase.test_short_repr) ... ok
test_None_ndigits (test.test_float.RoundTestCase.test_None_ndigits) ... ok
test_format_specials (test.test_float.RoundTestCase.test_format_specials) ... ok
test_inf_nan (test.test_float.RoundTestCase.test_inf_nan) ... ok
test_inf_nan_ndigits (test.test_float.RoundTestCase.test_inf_nan_ndigits) ... ok
test_large_n (test.test_float.RoundTestCase.test_large_n) ... ok
test_matches_float_format (test.test_float.RoundTestCase.test_matches_float_format) ... ok
test_overflow (test.test_float.RoundTestCase.test_overflow) ... ok
test_previous_round_bugs (test.test_float.RoundTestCase.test_previous_round_bugs) ... ok
test_small_n (test.test_float.RoundTestCase.test_small_n) ... ok

======================================================================
ERROR: test_float_with_comma (test.test_float.GeneralFloatCases.test_float_with_comma)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sources/Python-3.13.2/Lib/contextlib.py", line 85, in inner
    return func(*args, **kwds)
  File "/sources/Python-3.13.2/Lib/test/test_float.py", line 162, in test_float_with_comma
    if not locale.localeconv()['decimal_point'] == ',':
           ~~~~~~~~~~~~~~~~~^^
  File "/sources/Python-3.13.2/Lib/locale.py", line 110, in localeconv
    d = _localeconv()
UnicodeDecodeError: 'locale' codec can't decode byte 0xa0 in position 0: decoding error

----------------------------------------------------------------------
Ran 50 tests in 0.218s

FAILED (errors=1)
test test_float failed
test_float failed (1 error)

== Tests result: FAILURE ==

1 test failed:
    test_float

Total duration: 296 ms
Total tests: run=50
Total test files: run=1/1 failed=1
Result: FAILURE
  • Вопрос задан
  • 52 просмотра
Подписаться 1 Простой Комментировать
Пригласить эксперта
Ответы на вопрос 1
ky0
@ky0
Миллиардер, филантроп, патологический лгун
Надо лезть не в GPT, а в код - смотреть, что там происходит и дебажить. Если вы этого не можете - очевидно, LFS для вас рановат. Ковыряться в тестах непонятно какого окружения тут за вас никто не будет.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы