openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.01k stars 3.49k forks source link

Python3: apt install libreadline-dev readline/host not found #24598

Open peterwillcn opened 3 months ago

peterwillcn commented 3 months ago

Ubuntu 22.04.4 LTS apt install libreadline-dev readline/host https://github.com/openwrt/packages/commit/d257ffe609e6e226d64139bb1b802cba852c6cfb

The necessary bits to build these optional modules were not found:
readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

The following modules found by detect_modules() in setup.py have not
been built, they are *disabled* by configure:
_ctypes_test         _testbuffer          _testcapi
_testclinic          _testimportmultiple   _testinternalcapi
_testmultiphase      _xxtestfuzz

Traceback (most recent call last):
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/./setup.py", line 1621, in <module>
    main()
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/./setup.py", line 1591, in main
    setup(# PyPI Metadata (PEP 301)
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/Lib/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/Lib/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/Lib/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/Lib/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/Lib/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/Lib/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/Lib/distutils/command/build_ext.py", line 343, in run
    self.build_extensions()
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/./setup.py", line 522, in build_extensions
    self.summary(mods_built, mods_disabled)
  File "/home/openwrt/master/openwrt/build_dir/target-aarch64_generic_musl/Python-3.11.7/./setup.py", line 600, in summary
    raise RuntimeError("Failed to build some stdlib modules")
SapeNeCo commented 3 months ago

I had exactly this problem because of the frr package: https://forum.openwrt.org/t/error-no-stdlib-modules-for-python3-11-7/204150/6

crispyoz commented 3 months ago

I have the same issue since yesterday. Using OpenWrt 23.05.3 build system. Was working fine until yesterday, perhaps the day before. Restored my back up build system from 7th July, same issue. Issue is triggered when I include nmap or ncat, which have always been included in my build. Selecting these packages causes python to be included. I changed the package to Python 3.11.1 (from 3.11.7), resolved this issue but created others.

/home/chris/openwrt23/staging_dir/host/bin/install -c -m 644 pyconfig.h /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/include/python3.11/pyconfig.h /home/chris/openwrt23/staging_dir/host/bin/install -c -m 644 Modules/config.c /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/config-3.11/config.c /home/chris/openwrt23/staging_dir/host/bin/install -c -m 644 ./Modules/config.c.in /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/config-3.11/config.c.in /home/chris/openwrt23/staging_dir/host/bin/install -c -m 644 Makefile /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/config-3.11/Makefile /home/chris/openwrt23/staging_dir/host/bin/install -c -m 644 ./Modules/Setup /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/config-3.11/Setup /home/chris/openwrt23/staging_dir/host/bin/install -c -m 644 Modules/Setup.bootstrap /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/config-3.11/Setup.bootstrap /home/chris/openwrt23/staging_dir/host/bin/install -c -m 644 Modules/Setup.stdlib /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/config-3.11/Setup.stdlib /home/chris/openwrt23/staging_dir/host/bin/install -c -m 644 Modules/Setup.local /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/config-3.11/Setup.local /home/chris/openwrt23/staging_dir/host/bin/install -c -m 644 Misc/python.pc /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/pkgconfig/python-3.11.pc /home/chris/openwrt23/staging_dir/host/bin/install -c -m 644 Misc/python-embed.pc /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/pkgconfig/python-3.11-embed.pc /home/chris/openwrt23/staging_dir/host/bin/install -c ./Modules/makesetup /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/config-3.11/makesetup /home/chris/openwrt23/staging_dir/host/bin/install -c ./install-sh /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/config-3.11/install-sh /home/chris/openwrt23/staging_dir/host/bin/install -c python-config.py /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/config-3.11/python-config.py /home/chris/openwrt23/staging_dir/host/bin/install -c python-config /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/bin/python3.11-config _PYTHON_PROJECT_BASE=/home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7 _PYTHON_HOST_PLATFORM=linux-mipsel PYTHONPATH=/home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/build/lib.linux-mipsel-3.11:./Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_linux python3.11 ./setup.py install \ --prefix=/usr \ --install-scripts=/usr/bin \ --install-platlib=/usr/lib/python3.11/lib-dynload \ --root=/home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/ running install running build running build_ext

The following modules found by detect_modules() in setup.py have not been built, they are disabled by configure: _ctypes_test _testbuffer _testcapi
_testclinic _testimportmultiple _testinternalcapi _testmultiphase _xxtestfuzz

running build_scripts copying and adjusting /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/Tools/scripts/pydoc3 -> build/scripts-3.11 copying and adjusting /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/Tools/scripts/idle3 -> build/scripts-3.11 copying and adjusting /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/Tools/scripts/2to3 -> build/scripts-3.11 changing mode of build/scripts-3.11/pydoc3 from 644 to 755 changing mode of build/scripts-3.11/idle3 from 644 to 755 changing mode of build/scripts-3.11/2to3 from 644 to 755 renaming build/scripts-3.11/pydoc3 to build/scripts-3.11/pydoc3.11 renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11 renaming build/scripts-3.11/2to3 to build/scripts-3.11/2to3-3.11 running install_lib creating /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/lib-dynload/pycache copying build/lib.linux-mipsel-3.11/pycache/_sysconfigdatalinux_.cpython-311.pyc -> /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/lib-dynload/pycache__ copying build/lib.linux-mipsel-3.11/_sysconfigdata_linux.py -> /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/lib-dynload changing mode of /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/lib-dynload/resource.cpython-311.so to 755 changing mode of /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/lib-dynload/ossaudiodev.cpython-311.so to 755 changing mode of /home/chris/openwrt23/build_dir/target-mipsel_24kc_musl/Python-3.11.7/ipkg-install/usr/lib/python3.11/lib-dynload/_statistics.cpython-311.so to 755

SapeNeCo commented 3 months ago

I went to git packages and found these commits: Снимок экрана от 2024-07-17 13-38-11 There is an assumption that it is them. Especially the last one

SapeNeCo commented 3 months ago

YES!! The problem was in this commit: https://git.openwrt.org/?p=feed/packages.git;a=commit;h=d257ffe609e6e226d64139bb1b802cba852c6cfb I downloaded all the packages and modified the python3 files, removing the changes from this commit.

zhanwwan commented 3 months ago

any fixs?

BKPepe commented 3 months ago

Ping @neheb , if he has any thoughts.

neheb commented 3 months ago

Hmm seems I made a comment elsewhere. The issue is probably fixed after @hauke ‘s fix for the ncurses pc file. I can’t reproduce locally to be clear.