python / cpython

The Python programming language
https://www.python.org
Other
63.19k stars 30.26k forks source link

Error when trying to build Python 3.11.2 in Debian 11 #101893

Closed DarkoDarkShadow closed 1 month ago

DarkoDarkShadow commented 1 year ago

Hello, I tried to build Python 3.11.2 in Debian 11 from source, but when I run "make test" it results in a failure, here's what I get:

Traceback (most recent call last):
  File "/home/darko/Software/Python 3.11.2/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
KeyError: '/psm_fc8c1629'
0:04:38 load avg: 8.55 running: test_tools (3 min 36 sec)
0:05:01 load avg: 7.05 [434/434/1] test_tools passed (3 min 59 sec)
creating the script to be frozen at /tmp/tmp9zwcr2uc/app.py
copying the source tree into /tmp/tmp9zwcr2uc/cpython...
configuring python in /tmp/tmp9zwcr2uc/python-build...
building python in /tmp/tmp9zwcr2uc/python-build...
installing python into /tmp/tmp9zwcr2uc/python-installation...
freezing /tmp/tmp9zwcr2uc/app.py...

== Tests result: FAILURE ==

418 tests OK.

1 test failed:
    test_webbrowser

15 tests skipped:
    test_devpoll test_gdb test_ioctl test_kqueue test_launcher
    test_msilib test_ossaudiodev test_startfile test_tix test_tk
    test_ttk_guionly test_winconsoleio test_winreg test_winsound
    test_zipfile64
0:05:01 load avg: 7.05
0:05:01 load avg: 7.05 Re-running failed tests in verbose mode
0:05:01 load avg: 7.05 Re-running test_webbrowser in verbose mode (matching: test_synthesize)
test_synthesize (test.test_webbrowser.ImportTest.test_synthesize) ... ERROR

======================================================================
ERROR: test_synthesize (test.test_webbrowser.ImportTest.test_synthesize)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/darko/Software/Python 3.11.2/Lib/test/test_webbrowser.py", line 303, in test_synthesize
    webbrowser.get(sys.executable)
  File "/home/darko/Software/Python 3.11.2/Lib/webbrowser.py", line 66, in get
    raise Error("could not locate runnable browser")
webbrowser.Error: could not locate runnable browser

----------------------------------------------------------------------
Ran 1 test in 0.006s

FAILED (errors=1)
test test_webbrowser failed
1 test failed again:
    test_webbrowser

== Tests result: FAILURE then FAILURE ==

418 tests OK.

1 test failed:
    test_webbrowser

15 tests skipped:
    test_devpoll test_gdb test_ioctl test_kqueue test_launcher
    test_msilib test_ossaudiodev test_startfile test_tix test_tk
    test_ttk_guionly test_winconsoleio test_winreg test_winsound
    test_zipfile64

1 re-run test:
    test_webbrowser

Total duration: 5 min 1 sec
Tests result: FAILURE then FAILURE
make: *** [Makefile:1816: test] Error 2

I installed every dependece following the README file and https://devguide.python.org/getting-started/setup-building.html#build-dependencies.

merwok commented 1 year ago

This failure is strange, the test is registering a fake browser using the path of the Python interpreter itself then trying to get it — that should always work, it does not depend on the presence of real browsers.

Could you use the debugger to look at what’s happening? (add a line with breakpoint() in the get function and print local variables — see the docs for pdb if you haven’t used it yet)

vstinner commented 1 month ago

No activity for 1 year. Original reporter didn't reply to questions. I close the issue.