Build error on latest trunk: meson, python, zstd [FIXED]

C++ compiler for the host machine: mipsel-openwrt-linux-musl-g++ (gcc 8.4.0 "mipsel-openwrt-linux-musl-g++ (OpenWrt GCC 8.4.0 r13520-68b94f0fb4) 8.4.0")
C++ linker for the host machine: mipsel-openwrt-linux-musl-g++ ld.bfd 2.31.1
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: mipsel
Host machine cpu: mt7620
Target machine cpu family: mipsel
Target machine cpu: mt7620
Program python3 found: YES (/etc/openwrt/WE826/staging_dir/host/bin/python)
Could not introspect Python (['/etc/openwrt/WE826/staging_dir/host/bin/python', '-c', "import sysconfig\nimport json\nimport sys\n\ninstall_paths = sysconfig.get_paths(scheme='posix_prefix', vars={'base': '', 'platbase': '', 'installed_base': ''})\n\ndef links_against_libpython():\n from distutils.core import Distribution, Extension\n cmd = Distribution().get_command_obj('build_ext')\n cmd.ensure_finalized()\n return bool(cmd.get_libraries(Extension('dummy', [])))\n\nprint (json.dumps ({\n 'variables': sysconfig.get_config_vars(),\n 'paths': sysconfig.get_paths(),\n 'install_paths': install_paths,\n 'version': sysconfig.get_python_version(),\n 'platform': sysconfig.get_platform(),\n 'is_pypy': 'pypy' in sys.builtin_module_names,\n 'link_libpython': links_against_libpython(),\n}))\n"]): exit code 1
Program stdout:

Program stderr:

Traceback (most recent call last):
File "", line 20, in
File "", line 8, in links_against_libpython
ModuleNotFoundError: No module named 'distutils.core'

../../../../build_dir/target-mipsel_24kc_musl/zstd-1.4.5/build/meson/ ERROR: <ExternalProgram 'python3' -> ['/etc/openwrt/WE826/staging_dir/host/bin/python']> is not a valid python or it is missing setuptools

I did both on my ubuntu:
apt-get install python3-distutils
apt-get install python-setuptools #May be, this one is redundant.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.