Skip to content

Python3.13.4 doesn't build, Python3.13.3 builds #135136

Not planned
@Kadelka

Description

@Kadelka

Bug report

Bug description:

Tried to install Python3.13.4 from source. Installation fails testing the building. All modules o.k. except hashlib.py
The new Python3.12.11, Python3.11.13, Python3.10.18, Python3.9.23 can be built and installed without problems. The same holds true for Python3.13.3.
I do not find any log.file for errors.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Activity

added
type-bugAn unexpected behavior, bug, or error
on Jun 4, 2025
added
buildThe build process and cross-build
3.13bugs and security fixes
on Jun 4, 2025
ZeroIntensity

ZeroIntensity commented on Jun 4, 2025

@ZeroIntensity
Member

Hi, what do you mean by "Installation fails testing the building"? What shows up?

Kadelka

Kadelka commented on Jun 4, 2025

@Kadelka
Author

I configure with (o.K. for all other versions)
./configure --prefix=/usr/local --enable-ipv6 --enable-optimizations --enable-shared ; make
Then compilation with gcc, version 15.1.
Building of Modules o.K. with some warnings. Problem starts with

Next, run the profile task to generate the profile information.

LD_LIBRARY_PATH=/install/Python-3.13.4 ./python -m test --pgo --timeout=

0:01:21 load avg: 1.13 [20/43] test_hashlib
test test_hashlib failed
0:01:22 load avg: 1.13 [20/43] test_hashlib failed (2 failures)

(The other versions of Python don't fail here).

After make altinstall the program behaves strangely.

ZeroIntensity

ZeroIntensity commented on Jun 4, 2025

@ZeroIntensity
Member

Would you mind posting the tracebacks for the failures?

Kadelka

Kadelka commented on Jun 4, 2025

@Kadelka
Author

I don't know if this is what you mean: Compilation stops with

Total duration: 4 min 37 sec
Total tests: run=9,348 failures=2 skipped=185
Total test files: run=43/43 failed=1
Result: FAILURE
make: *** [Makefile:906: profile-run-stamp] Fehler 2

Is there any log I can publish?
I've replaced hashlib.py with hashlib.py from version 3.13.3 (I know this is ugly). Same problem.

StanFromIreland

StanFromIreland commented on Jun 4, 2025

@StanFromIreland
Member

It does build, it is just a test that fails.

Can you please give the test traceback and what system you are on, this may be a duplicate.

Kadelka

Kadelka commented on Jun 4, 2025

@Kadelka
Author

I Have Suse Leap 15.6 (Linux) with local gcc-15.1 (works fine). python indeed builds, the test in the Makefile fails:

gcc -fno-semantic-interposition -fprofile-generate -Xlinker -export-dynamic -o Programs/_testembed Programs/testembed.o -L. -lpython3.13 -ldl -lm
sed -e "s,/usr/bin/env python3,/usr/local/bin/python3.13," < ./Tools/scripts/idle3 > build/scripts-3.13/idle3.13
sed -e "s,/usr/bin/env python3,/usr/local/bin/python3.13," < ./Tools/scripts/pydoc3 > build/scripts-3.13/pydoc3.13
sed -e "s,@exename@,/usr/local/bin/python3.13," < ./Misc/python-config.in >python-config.py
LC_ALL=C sed -e 's,$(([A-Za-z0-9
]*)),${\1},g' < Misc/python-config.sh >python-config
Checked 112 modules (33 built-in, 78 shared, 1 n/a on linux-x86_64, 0 disabled, 0 missing, 0 failed on import)
make[2]: Verzeichnis „/home/install/Python-3.13.4“ wird verlassen
touch profile-gen-stamp
make[1]: Verzeichnis „/home/install/Python-3.13.4“ wird verlassen

Next, run the profile task to generate the profile information.
LD_LIBRARY_PATH=/install/Python-3.13.4 ./python -m test --pgo --timeout=
Using random seed: 1228288509
0:00:00 load avg: 1.28 Run 43 tests sequentially in a single process
0:00:00 load avg: 1.28 [ 1/43] test_array
0:00:04 load avg: 1.33 [ 1/43] test_array passed
0:00:04 load avg: 1.33 [ 2/43] test_base64
0:00:05 load avg: 1.33 [ 2/43] test_base64 passed
0:00:05 load avg: 1.33 [ 3/43] test_binascii
0:00:06 load avg: 1.33 [ 3/43] test_binascii passed
0:00:06 load avg: 1.33 [ 4/43] test_binop
0:00:06 load avg: 1.33 [ 4/43] test_binop passed
0:00:06 load avg: 1.33 [ 5/43] test_bisect
0:00:06 load avg: 1.33 [ 5/43] test_bisect passed
0:00:06 load avg: 1.33 [ 6/43] test_bytes
0:00:21 load avg: 1.26 [ 6/43] test_bytes passed
0:00:21 load avg: 1.26 [ 7/43] test_bz2
0:00:23 load avg: 1.32 [ 7/43] test_bz2 passed
0:00:23 load avg: 1.32 [ 8/43] test_cmath
0:00:24 load avg: 1.32 [ 8/43] test_cmath passed
0:00:24 load avg: 1.32 [ 9/43] test_codecs
0:00:28 load avg: 1.32 [ 9/43] test_codecs passed
0:00:28 load avg: 1.32 [10/43] test_collections
0:00:34 load avg: 1.27 [10/43] test_collections passed
0:00:34 load avg: 1.27 [11/43] test_complex
0:00:35 load avg: 1.27 [11/43] test_complex passed
0:00:35 load avg: 1.27 [12/43] test_dataclasses
0:00:37 load avg: 1.27 [12/43] test_dataclasses passed
0:00:37 load avg: 1.27 [13/43] test_datetime
0:00:51 load avg: 1.21 [13/43] test_datetime passed
0:00:51 load avg: 1.21 [14/43] test_decimal
0:01:07 load avg: 1.16 [14/43] test_decimal passed
0:01:07 load avg: 1.16 [15/43] test_difflib
0:01:11 load avg: 1.15 [15/43] test_difflib passed
0:01:11 load avg: 1.15 [16/43] test_float
0:01:12 load avg: 1.15 [16/43] test_float passed
0:01:12 load avg: 1.15 [17/43] test_fstring
0:01:17 load avg: 1.14 [17/43] test_fstring passed
0:01:17 load avg: 1.14 [18/43] test_functools
0:01:19 load avg: 1.13 [18/43] test_functools passed
0:01:19 load avg: 1.13 [19/43] test_generators
0:01:21 load avg: 1.13 [19/43] test_generators passed
0:01:21 load avg: 1.13 [20/43] test_hashlib
test test_hashlib failed
0:01:22 load avg: 1.13 [20/43] test_hashlib failed (2 failures)
0:01:22 load avg: 1.13 [21/43] test_heapq
0:01:24 load avg: 1.12 [21/43] test_heapq passed
0:01:24 load avg: 1.12 [22/43] test_int
0:01:26 load avg: 1.12 [22/43] test_int passed
0:01:26 load avg: 1.12 [23/43] test_itertools
0:01:47 load avg: 1.46 [23/43] test_itertools passed
0:01:47 load avg: 1.46 [24/43] test_json
0:02:00 load avg: 1.36 [24/43] test_json passed
0:02:00 load avg: 1.36 [25/43] test_long
0:02:10 load avg: 1.46 [25/43] test_long passed
0:02:10 load avg: 1.46 [26/43] test_lzma
0:02:11 load avg: 1.46 [26/43] test_lzma passed
0:02:11 load avg: 1.46 [27/43] test_math
0:02:24 load avg: 1.36 [27/43] test_math passed
0:02:24 load avg: 1.36 [28/43] test_memoryview
0:02:27 load avg: 1.36 [28/43] test_memoryview passed
0:02:27 load avg: 1.36 [29/43] test_operator
0:02:27 load avg: 1.36 [29/43] test_operator passed
0:02:27 load avg: 1.36 [30/43] test_ordered_dict
0:02:32 load avg: 1.33 [30/43] test_ordered_dict passed
0:02:32 load avg: 1.33 [31/43] test_patma
0:02:33 load avg: 1.33 [31/43] test_patma passed
0:02:33 load avg: 1.33 [32/43] test_pickle
0:03:00 load avg: 1.42 [32/43] test_pickle passed
0:03:00 load avg: 1.42 [33/43] test_pprint
0:03:01 load avg: 1.42 [33/43] test_pprint passed
0:03:01 load avg: 1.42 [34/43] test_re
0:03:05 load avg: 1.38 [34/43] test_re passed
0:03:05 load avg: 1.38 [35/43] test_set
0:03:29 load avg: 1.37 [35/43] test_set passed
0:03:29 load avg: 1.37 [36/43] test_sqlite3
0:03:34 load avg: 1.34 [36/43] test_sqlite3 passed
0:03:34 load avg: 1.34 [37/43] test_statistics
0:04:11 load avg: 1.32 [37/43] test_statistics passed in 37.6 sec
0:04:11 load avg: 1.32 [38/43] test_str
0:04:19 load avg: 1.27 [38/43] test_str passed
0:04:19 load avg: 1.27 [39/43] test_struct
0:04:22 load avg: 1.27 [39/43] test_struct passed
0:04:22 load avg: 1.27 [40/43] test_tabnanny
0:04:24 load avg: 1.25 [40/43] test_tabnanny passed
0:04:24 load avg: 1.25 [41/43] test_time
0:04:27 load avg: 1.25 [41/43] test_time passed
0:04:27 load avg: 1.25 [42/43] test_xml_etree
0:04:31 load avg: 1.23 [42/43] test_xml_etree passed
0:04:31 load avg: 1.23 [43/43] test_xml_etree_c
0:04:37 load avg: 1.37 [43/43] test_xml_etree_c passed

Total duration: 4 min 37 sec
Total tests: run=9,348 failures=2 skipped=185
Total test files: run=43/43 failed=1
Result: FAILURE

and then make stops.

make install

installs version 3.13.4, but this version does not behave correctly. After closing python the local program starts profiling.

ZeroIntensity

ZeroIntensity commented on Jun 4, 2025

@ZeroIntensity
Member

Maybe there are some old build artifacts that shouldn't be there? Try running make clean or using a fresh clone of 3.13 and then building.

Kadelka

Kadelka commented on Jun 4, 2025

@Kadelka
Author

With

./configure --prefix=/usr/local --enable-ipv6 --enable-shared ; make

(without --enable-optimizations) Python3.13.4 can be built without problems. Of course this is not a complete solution of this problem, since Python3.13.3 can be installed with --enable-optimizations

StanFromIreland

StanFromIreland commented on Jun 4, 2025

@StanFromIreland
Member

I could recreate, I nuked build/ and it was fine. Somehow my permissions had changed on a dir, magic maybe? make clean was useless as a result. I'll look into returning it to that state again, it caused some odd errors.

Edit: Thought: My system uses a non-utf8 locale, maybe this is the issue after it has been made default recently.

ZeroIntensity

ZeroIntensity commented on Jun 4, 2025

@ZeroIntensity
Member

Edit: Thought: My system uses a non-utf8 locale, maybe this is the issue after it has been made default recently.

Not on 3.13

Kadelka

Kadelka commented on Jun 4, 2025

@Kadelka
Author

Meanwhile the problem is solved, at least for me. The "solution" is strange. First I had to install Python3.13.4 with configuration
./configure --prefix=/usr/local --enable-ipv6 --enable-shared ; make ; make altinstall
then removing directory Python3.13.4, loading directory Python3.13.4 anew and then
./configure --prefix=/usr/local --enable-ipv6 --enable-optimization --enable-shared ; make ; make altinstall
installed python3.13 as intended.

I think, Makefile uses simultaneously two versions of python (the new built one and a system wide python) in the building process.

vstinner

vstinner commented on Jun 5, 2025

@vstinner
Member

Would you mind to run test_hashlib in verbose mode and copy/paste the output? Something like:

LD_LIBRARY_PATH=/install/Python-3.13.4 ./python -m test test_hashlib -v

9 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixesbuildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Python3.13.4 doesn't build, Python3.13.3 builds · Issue #135136 · python/cpython

      Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

      Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant