22.03.0 build fails when including luci-app-ksmbd

Hi I use to build ramips/mt7620/WT3020-8MB with some adds so that to have direct usb drive support. Its worked well since 19.07. Adds are : kmod-usb-storage, kmod-fs-vfat, blockd, usbutils, dosfstools and luci-app-ksmbd.
With 22.03.0 I can build a working std build as well as build incorporating all the above adds list except the luci-app-ksmbd which generates error when incorporated.
Looking into the general error log donnot show me an understandable reason. Can you help.

Part of the general error log as follow:

make[3]: Entering directory '/home/francis/openwrt/feeds/packages/libs/glib2'
rm -f /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5/.configured_*
rm -f /home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.glib2_installed
/home/francis/openwrt/staging_dir/host/bin/sed -e "s|@CC@|'gcc',|" -e "s|@CXX@|'g++',|" -e "s|@PKGCONFIG@|/home/francis/openwrt/staging_dir/host/bin/pkg-config|" -e "s|@CMAKE@|/home/francis/openwrt/staging_dir/host/bin/cmake|" -e "s|@PYTHON@|/home/francis/openwrt/staging_dir/host/bin/python3|" -e "s|@CFLAGS@|'-O2', '-I/home/francis/openwrt/staging_dir/host/include', '-I/home/francis/openwrt/staging_dir/hostpkg/include', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/host/include', '-I/home/francis/openwrt/staging_dir/host/include', '-I/home/francis/openwrt/staging_dir/hostpkg/include', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/host/include',|" -e "s|@CXXFLAGS@|'-I/home/francis/openwrt/staging_dir/host/include', '-I/home/francis/openwrt/staging_dir/hostpkg/include', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/host/include',|" -e "s|@LDFLAGS@|'-L/home/francis/openwrt/staging_dir/host/lib', '-L/home/francis/openwrt/staging_dir/hostpkg/lib', '-L/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/host/lib',|" -e "s|@PREFIX@|/home/francis/openwrt/staging_dir/hostpkg|" < /home/francis/openwrt/staging_dir/host/lib/meson/openwrt-native.txt.in > /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5/openwrt-native.txt
/home/francis/openwrt/staging_dir/host/bin/sed -e "s|@CC@|'mipsel-openwrt-linux-musl-gcc',|" -e "s|@CXX@|'mipsel-openwrt-linux-musl-g++',|" -e "s|@AR@|mipsel-openwrt-linux-musl-gcc-ar|" -e "s|@STRIP@|mipsel-openwrt-linux-musl-strip|" -e "s|@NM@|mipsel-openwrt-linux-musl-gcc-nm|" -e "s|@PKGCONFIG@|/home/francis/openwrt/staging_dir/host/bin/pkg-config|" -e "s|@CMAKE@|/home/francis/openwrt/staging_dir/host/bin/cmake|" -e "s|@PYTHON@|/home/francis/openwrt/staging_dir/host/bin/python3|" -e "s|@CFLAGS@|'-Os', '-pipe', '-mno-branch-likely', '-mips32r2', '-mtune=24kc', '-fno-caller-saves', '-fno-plt', '-fhonour-copts', '-Wno-error=unused-but-set-variable', '-Wno-error=unused-result', '-msoft-float', '-mips16', '-minterlink-mips16', '-ffile-prefix-map=/home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5=glib-2.70.5', '-Wformat', '-Werror=format-security', '-fstack-protector', '-Wl,-z,now', '-Wl,-z,relro', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include', '-ffunction-sections', '-fdata-sections', '-I/home/francis/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/usr/include', '-I/home/francis/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/include/fortify', '-I/home/francis/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/include', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include',|" -e "s|@CXXFLAGS@|'-Os', '-pipe', '-mno-branch-likely', '-mips32r2', '-mtune=24kc', '-fno-caller-saves', '-fno-plt', '-fhonour-copts', '-Wno-error=unused-but-set-variable', '-Wno-error=unused-result', '-msoft-float', '-mips16', '-minterlink-mips16', '-ffile-prefix-map=/home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5=glib-2.70.5', '-Wformat', '-Werror=format-security', '-fstack-protector', '-Wl,-z,now', '-Wl,-z,relro', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include', '-ffunction-sections', '-fdata-sections', '-I/home/francis/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/usr/include', '-I/home/francis/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/include/fortify', '-I/home/francis/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/include', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include', '-I/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include',|" -e "s|@LDFLAGS@|'-L/home/francis/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/usr/lib', '-L/home/francis/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/lib', '-znow', '-zrelro', '-L/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/lib', '-Wl,-rpath-link=/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/lib', '-L/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/lib', '-Wl,-rpath-link=/home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/lib', '-Wl,--gc-sections',|" -e "s|@ARCH@|"mips"|" -e "s|@CPU@|"generic"|" -e "s|@ENDIAN@|little|" < /home/francis/openwrt/staging_dir/host/lib/meson/openwrt-cross.txt.in > /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5/openwrt-cross.txt
/home/francis/openwrt/staging_dir/host/bin/python3 /home/francis/openwrt/staging_dir/host/bin/meson.py  --buildtype plain --native-file /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5/openwrt-native.txt --cross-file /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5/openwrt-cross.txt -Dselinux=disabled -Dlibmount=disabled -Dman=false -Ddtrace=false -Dsystemtap=false -Dsysprof=disabled -Dgtk_doc=false -Dbsymbolic_functions=true -Dforce_posix_threads=true -Dfam=false -Dtests=false -Dinstalled_tests=false -Doss_fuzz=disabled -Dglib_debug=disabled -Dglib_assert=false -Dglib_checks=true -Dlibelf=disabled -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=disabled /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5/openwrt-build /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5/openwrt-build/..
The Meson build system
Version: 0.61.4
Source dir: /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5
Build dir: /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5/openwrt-build
Build type: cross build
Project name: glib
Project version: 2.70.5
C compiler for the host machine: mipsel-openwrt-linux-musl-gcc (gcc 11.2.0 "mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19685-512e76967f) 11.2.0")
C linker for the host machine: mipsel-openwrt-linux-musl-gcc ld.bfd 2.37
C++ compiler for the host machine: mipsel-openwrt-linux-musl-g++ (gcc 11.2.0 "mipsel-openwrt-linux-musl-g++ (OpenWrt GCC 11.2.0 r19685-512e76967f) 11.2.0")
C++ linker for the host machine: mipsel-openwrt-linux-musl-g++ ld.bfd 2.37
C compiler for the build machine: gcc (gcc 10.2.1 "gcc (Debian 10.2.1-6) 10.2.1 20210110")
C linker for the build machine: gcc ld.bfd 2.35.2
C++ compiler for the build machine: g++ (gcc 10.2.1 "g++ (Debian 10.2.1-6) 10.2.1 20210110")
C++ linker for the build machine: g++ ld.bfd 2.35.2
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: mips
Host machine cpu: generic
Target machine cpu family: mips
Target machine cpu: generic
Compiler for C supports arguments -fno-strict-aliasing: YES 
Checking if "GNU C visibility attributes test" compiles: YES 
Compiler for C supports arguments -fvisibility=hidden: YES 
Message: Disabling GLib asserts
Has header "alloca.h" : YES 
Has header "crt_externs.h" : NO 
Has header "dirent.h" : YES 
Has header "float.h" : YES 
Has header "fstab.h" : NO 
Has header "grp.h" : YES 
Has header "inttypes.h" : YES 
Has header "limits.h" : YES 
Has header "locale.h" : YES 
Has header "mach/mach_time.h" : NO 
Has header "memory.h" : YES 
Has header "mntent.h" : YES 
Has header "poll.h" : YES 
Has header "pwd.h" : YES 
Has header "sched.h" : YES 
Has header "spawn.h" : YES 
Has header "stdatomic.h" : YES 
Has header "stdint.h" : YES 
Has header "stdlib.h" : YES 
Has header "string.h" : YES 
Has header "strings.h" : YES 
Has header "sys/auxv.h" : YES 
Has header "sys/event.h" : NO 
Has header "sys/filio.h" : NO 
Has header "sys/inotify.h" : YES 
Has header "sys/mkdev.h" : NO 
Has header "sys/mntctl.h" : NO 
Has header "sys/mnttab.h" : NO 
Has header "sys/mount.h" : YES 
Has header "sys/param.h" : YES 
Has header "sys/resource.h" : YES 
Has header "sys/select.h" : YES 
Has header "sys/statfs.h" : YES 
Has header "sys/stat.h" : YES 
Has header "sys/statvfs.h" : YES 
Has header "sys/sysctl.h" : NO 
Has header "sys/time.h" : YES 
Has header "sys/times.h" : YES 
Has header "sys/types.h" : YES 
Has header "sys/uio.h" : YES 
Has header "sys/vfs.h" : YES 
Has header "sys/vfstab.h" : NO 
Has header "sys/vmount.h" : NO 
Has header "sys/wait.h" : YES 
Has header "termios.h" : YES 
Has header "unistd.h" : YES 
Has header "values.h" : YES 
Has header "wchar.h" : YES 
Has header "xlocale.h" : NO 
Checking if "malloc.h" compiles: YES 
Has header "linux/netlink.h" : YES 
Checking if "statx() test" compiles: NO 
Header <locale.h> has symbol "LC_MESSAGES" : YES 
Checking whether type "struct stat" has member "st_mtimensec" : NO 
Checking whether type "struct stat" has member "st_mtim.tv_nsec" : YES 
Checking whether type "struct stat" has member "st_atimensec" : NO 
Checking whether type "struct stat" has member "st_atim.tv_nsec" : YES 
Checking whether type "struct stat" has member "st_ctimensec" : NO 
Checking whether type "struct stat" has member "st_ctim.tv_nsec" : YES 
Checking whether type "struct stat" has member "st_birthtime" : NO 
Checking whether type "struct stat" has member "st_birthtimensec" : NO 
Checking whether type "struct stat" has member "st_birthtim" : NO 
Checking whether type "struct stat" has member "st_birthtim.tv_nsec" : NO 
Checking whether type "struct stat" has member "st_blksize" : YES 
Checking whether type "struct stat" has member "st_blocks" : YES 
Checking whether type "struct statfs" has member "f_fstypename" : NO 
Checking whether type "struct statfs" has member "f_bavail" : YES 
Checking whether type "struct dirent" has member "d_type" : YES 
Checking whether type "struct statvfs" has member "f_basetype" : NO 
Checking whether type "struct statvfs" has member "f_fstypename" : NO 
Checking whether type "struct tm" has member "tm_gmtoff" : YES 
Checking whether type "struct tm" has member "__tm_gmtoff" : YES 
Compiler for C supports arguments -Wduplicated-branches: YES 
Compiler for C supports arguments -Wimplicit-fallthrough: YES 
Compiler for C supports arguments -Wmisleading-indentation: YES 
Compiler for C supports arguments -Wstrict-prototypes: YES 
Compiler for C supports arguments -Wunused: YES 
Compiler for C supports arguments -Wno-unused-parameter: YES 
Compiler for C supports arguments -Wno-bad-function-cast: YES 
Compiler for C supports arguments -Wno-cast-function-type: YES 
Compiler for C supports arguments -Wno-pedantic: YES 
Compiler for C supports arguments -Wno-format-zero-length: YES 
Compiler for C supports arguments -Werror=declaration-after-statement: YES 
Compiler for C supports arguments -Werror=format=2: YES 
Compiler for C supports arguments -Werror=implicit-function-declaration: YES 
Compiler for C supports arguments -Werror=init-self: YES 
Compiler for C supports arguments -Werror=missing-include-dirs: NO 
Compiler for C supports arguments -Werror=missing-prototypes: YES 
Compiler for C supports arguments -Werror=pointer-arith: YES 
Compiler for C supports link arguments -Wl,-z,nodelete: YES 
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES 
Checking for function "close_range" : NO 
Checking for function "endmntent" : YES 
Checking for function "endservent" : YES 
Checking for function "epoll_create" : YES 
Checking for function "fallocate" : YES 
Checking for function "fchmod" : YES 
Checking for function "fchown" : YES 
Checking for function "fdwalk" : NO 
Checking for function "fsync" : YES 
Checking for function "getauxval" : YES 
Checking for function "getc_unlocked" : YES 
Checking for function "getfsstat" : NO 
Checking for function "getgrgid_r" : YES 
Checking for function "getmntent_r" : YES 
Checking for function "getpwuid_r" : YES 
Checking for function "getresuid" : YES 
Checking for function "getvfsstat" : NO 
Checking for function "gmtime_r" : YES 
Checking for function "hasmntopt" : YES 
Checking for function "inotify_init1" : YES 
Checking for function "issetugid" : YES 
Checking for function "kevent" : NO 
Checking for function "kqueue" : NO 
Checking for function "lchmod" : YES 
Checking for function "lchown" : YES 
Checking for function "link" : YES 
Checking for function "localtime_r" : YES 
Checking for function "lstat" : YES 
Checking for function "mbrtowc" : YES 
Checking for function "memalign" : YES 
Checking for function "mmap" : YES 
Checking for function "newlocale" : YES 
Checking for function "pipe2" : YES 
Checking for function "poll" : YES 
Checking for function "prlimit" : YES 
Checking for function "readlink" : YES 
Checking for function "recvmmsg" : YES 
Checking for function "sendmmsg" : YES 
Checking for function "setenv" : YES 
Checking for function "setmntent" : YES 
Checking for function "strerror_r" : YES 
Checking for function "strnlen" : YES 
Checking for function "strsignal" : YES 
Checking for function "strtod_l" : YES 
Checking for function "strtoll_l" : NO 
Checking for function "strtoull_l" : NO 
Checking for function "symlink" : YES 
Checking for function "timegm" : YES 
Checking for function "unsetenv" : YES 
Checking for function "uselocale" : YES 
Checking for function "utimes" : YES 
Checking for function "valloc" : YES 
Checking for function "vasprintf" : YES 
Checking for function "vsnprintf" : YES 
Checking for function "wcrtomb" : YES 
Checking for function "wcslen" : YES 
Checking for function "wcsnlen" : YES 
Checking for function "sysctlbyname" : NO 
Checking for function "statvfs" : YES 
Checking for function "statfs" : YES 
Checking for function "if_indextoname" : YES 
Checking for function "if_nametoindex" : YES 
Checking for function "splice" : YES 
Checking for function "stpcpy" : YES 
Checking for function "posix_memalign" : YES 
Checking for function "posix_spawn" : YES 
Checking if "strerror_r() returns char *" compiles: NO 
Checking for function "snprintf" : YES 
Checking for function "strcasecmp" : YES 
Checking for function "strncasecmp" : YES 
Header <sys/sysmacros.h> has symbol "major" : YES 
Header <dlfcn.h> has symbol "RTLD_LAZY" : YES 
Header <dlfcn.h> has symbol "RTLD_NOW" : YES 
Header <dlfcn.h> has symbol "RTLD_GLOBAL" : YES 
Header <dlfcn.h> has symbol "RTLD_NEXT" : YES 
Message: Checking whether to use statfs or statvfs .. statfs
Checking for function "mkostemp" : YES 
Checking if "futex(2) system call" : links: YES 
Checking if "eventfd(2) system call" : links: YES 
Checking if "__uint128_t available" compiles: NO 
Checking if "clock_gettime" : links: YES 
Checking if "dlopen() and dlsym() in system libraries" : links: YES 
Checking if "number of arguments to statfs() (n=2)" compiles: YES 
Checking if "open() option O_DIRECTORY" compiles: YES 
Checking if "fcntl() option F_FULLFSYNC" compiles: NO 
Checking if "nl_langinfo and CODESET" : links: YES 
Checking if "nl_langinfo (PM_STR)" : links: YES 
Checking if "nl_langinfo (_NL_CTYPE_OUTDIGITn_MB)" : links: NO 
Checking if "nl_langinfo (ALTMON_n)" : links: NO 
Checking if "nl_langinfo (_NL_ABALTMON_n)" : links: NO 
Checking if "nl_langinfo and _NL_TIME_CODESET" : links: NO 
Checking if "signed" compiles: YES 
Header <stddef.h> has symbol "ptrdiff_t" : YES 
Checking if "sig_atomic_t" : links: YES 
Checking if "long long" compiles: YES 
Checking if "long double" compiles: YES 
Header <stddef.h> has symbol "wchar_t" : YES 
Header <wchar.h> has symbol "wint_t" : YES 
Checking if "uintmax_t in inttypes.h" compiles: YES 
Checking if "uintmax_t in stdint.h" compiles: YES 
Checking for size of "char" : 1
Checking for size of "short" : 2
Checking for size of "int" : 4
Checking for size of "void*" : 4
Checking for size of "long" : 4
Checking for size of "long long" : 8
Checking for size of "size_t" : 4
Checking for size of "ssize_t" : 4
Checking for alignment of "char" : 1
Checking for alignment of "short" : 2
Checking for alignment of "int" : 4
Checking for alignment of "void*" : 4
Checking for alignment of "long" : 4
Checking for alignment of "long long" : 8
Checking for alignment of "size_t" : 4
Checking for size of "wchar_t" : 4
Checking if "GCC size_t typedef is int" compiles: YES 
Checking if "GCC size_t typedef is long" compiles: NO 
Checking if "__va_copy check" compiles: YES 
Checking if "va_copy check" compiles: YES 
Checking if "ISO C99 varargs macros in C" compiles: YES 
Checking if "ISO C99 varargs macros in C++" compiles: YES 
Checking if "GNUC varargs macros" compiles: YES 
Has header "alloca.h" : YES (cached)
Has header "sys/poll.h" : YES 
Has header "sys/types.h" : YES (cached)
Has header "winsock2.h" : NO 
Computing int of "POLLIN" : 1
Computing int of "POLLOUT" : 4
Computing int of "POLLPRI" : 2
Computing int of "POLLERR" : 8
Computing int of "POLLHUP" : 16
Computing int of "POLLNVAL" : 32
Computing int of "AF_UNIX" : 1
Computing int of "AF_INET" : 2
Computing int of "AF_INET6" : 10
Computing int of "MSG_OOB" : 1
Computing int of "MSG_PEEK" : 2
Computing int of "MSG_DONTROUTE" : 4
Checking for type "struct in6_addr" : YES 
Checking if "atomic ops" : links: YES 
Checking if "atomic ops define" compiles: YES 
Run-time dependency threads found: YES
Header <pthread.h> has symbol "pthread_attr_setstacksize" : YES 
Header <pthread.h> has symbol "pthread_attr_setinheritsched" : YES 
Header <pthread.h> has symbol "pthread_condattr_setclock" : YES 
Header <pthread.h> has symbol "pthread_cond_timedwait_relative_np" : NO 
Header <pthread.h> has symbol "pthread_getname_np" : YES 
Header <sys/syscall.h> has symbol "SYS_sched_getattr" : YES 
Checking if "pthread_setname_np(const char*)" with dependency threads: links: NO 
Checking if "pthread_setname_np(pthread_t, const char*)" with dependency threads: links: YES 
Run-time dependency iconv found: YES
Found pkg-config: /home/francis/openwrt/staging_dir/host/bin/pkg-config (1.8.0)
Run-time dependency libpcre found: YES 8.45
Library m found: YES
Run-time dependency libffi found: YES 3.4.2
Run-time dependency zlib found: YES 1.2.11
Run-time dependency intl found: YES
Checking for function "ngettext" with dependency intl: YES 
Checking for function "bind_textdomain_codeset" with dependency intl: YES 
Dependency mount skipped: feature libmount disabled
Dependency libselinux skipped: feature selinux disabled
Checking for function "getxattr" : YES 
Has header "sys/xattr.h" : YES 
Checking if "XATTR_NOFOLLOW" compiles: NO 
Checking for function "strlcpy" : YES 
Program python3 found: YES (/home/francis/openwrt/staging_dir/host/bin/python3)

../../../../build_dir/target-mipsel_24kc_musl/glib-2.70.5/meson.build:2209:0: ERROR: <PythonExternalProgram 'python3' -> ['/home/francis/openwrt/staging_dir/host/bin/python3']> is not a valid python or it is missing distutils

A full log can be found at /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5/openwrt-build/meson-logs/meson-log.txt
make[3]: *** [Makefile:129: /home/francis/openwrt/build_dir/target-mipsel_24kc_musl/glib-2.70.5/.configured_efb2d3cf01c707184fb77fd0fe149f94] Error 1
make[3]: Leaving directory '/home/francis/openwrt/feeds/packages/libs/glib2'
time: package/feeds/packages/glib2/compile#6.30#2.34#7.45
    ERROR: package/feeds/packages/glib2 failed to build.
make[2]: *** [package/Makefile:116: package/feeds/packages/glib2/compile] Error 1
make[2]: Leaving directory '/home/francis/openwrt'
make[1]: *** [package/Makefile:110: /home/francis/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2

last part of the detailed error log is as follow

Checking for function "strlcpy" : YES 
Program python3 found: YES (/home/francis/openwrt/staging_dir/host/bin/python3)
Could not introspect Python (['/home/francis/openwrt/staging_dir/host/bin/python3', '-c', "import os.path\nimport sysconfig\nimport json\nimport sys\nimport distutils.command.install\n\ndef get_distutils_paths(scheme=None, prefix=None):\n    import distutils.dist\n    distribution = distutils.dist.Distribution()\n    install_cmd = distribution.get_command_obj('install')\n    if prefix is not None:\n        install_cmd.prefix = prefix\n    if scheme:\n        install_cmd.select_scheme(scheme)\n    install_cmd.finalize_options()\n    return {\n        'data': install_cmd.install_data,\n        'include': os.path.dirname(install_cmd.install_headers),\n        'platlib': install_cmd.install_platlib,\n        'purelib': install_cmd.install_purelib,\n        'scripts': install_cmd.install_scripts,\n    }\n\n# On Debian derivatives, the Python interpreter shipped by the distribution uses\n# a custom install scheme, deb_system, for the system install, and changes the\n# default scheme to a custom one pointing to /usr/local and replacing\n# site-packages with dist-packages.\n# See https://github.com/mesonbuild/meson/issues/8739.\n# XXX: We should be using sysconfig, but Debian only patches distutils.\n\nif 'deb_system' in distutils.command.install.INSTALL_SCHEMES:\n    paths = get_distutils_paths(scheme='deb_system')\n    install_paths = get_distutils_paths(scheme='deb_system', prefix='')\nelse:\n    paths = sysconfig.get_paths()\n    empty_vars = {'base': '', 'platbase': '', 'installed_base': ''}\n    install_paths = sysconfig.get_paths(vars=empty_vars)\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\nvariables = sysconfig.get_config_vars()\nvariables.update({'base_prefix': getattr(sys, 'base_prefix', sys.prefix)})\n\nprint(json.dumps({\n  'variables': variables,\n  'paths': paths,\n  'install_paths': install_paths,\n  'sys_paths': sys.path,\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 "<string>", line 5, in <module>
ModuleNotFoundError: No module named 'distutils.command'


../../../../build_dir/target-mipsel_24kc_musl/glib-2.70.5/meson.build:2209:0: ERROR: <PythonExternalProgram 'python3' -> ['/home/francis/openwrt/staging_dir/host/bin/python3']> is not a valid python or it is missing distutils

It seems your OpenWrt-compiled python3 broke somehow. I don't know why.

Unless you get a more clever reponse you can try doing

rm -fR staging_dir/ build_dir/

. That will force recompiling toolchain however which will take quite some time.

Obviously I did that before to post the initial message with no success.
Back to my initial message, I will clarify the last experiment I report

fresh CLEAN config
using repo config.buildinfo
make the WT3020 STD build => OK
add kmod-usb-storage, kmod-fs-vfat to the std config
make (no clean) the WT3020+kmod's => OK (no surprise, they were part of the initial config build, just the link change)
add blockd, usbutils, dosfstools to the modified config
make (no clean) the WRT3020+kmod's+blockd+tools => OK (new compiled blocks, new link)
add luci-app-ksmbd to the modified config
make (no clean) the WRT3020+kmod's+blockd+tools+luci-ksmbd => FAIL

I donnot see what is the difference in python3 between the three versions as python3 exist in all three compiled versions.
What is existing only in the log of the version which fails is glib2, this is the package in which the error occurs while compiling python3 see log extract in initial post (missing distutils, with error message ModuleNotFoundError: No module named 'distutils.command' , see the detail log extract in my initial post)

Therefore as a non developper I would think the luci-app-ksmb set of the repo to have a pb. Any recommendation?

Finally found the solution from an other thread.
[OpenWrt 22.XX and python3-docutils does not compile]

Since v22.03.x the build config must be updated compared to previous (mine worked well since v19.x) as python3-docutils is part from the host and not from the distri.

Would be great in the distri presentation to indicate the need to update the build config.

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