I'm failing to build wireshark during openwrt build

CMake Error at cmake/modules/LocatePythonModule.cmake:47 (message):
  Could NOT find python module asn2wrs
Call Stack (most recent call first):
  cmake/modules/UseAsn2Wrs.cmake:11 (locate_python_module)
  epan/dissectors/asn1/lix2/CMakeLists.txt:34 (ASN2WRS)

Looks like I can’t find asn2wrs package. To be honest I didn’t install python3-distutils because apt couldn’t find the package.

What should I do to resolve this?

Not sure. One of the issues with OpenWrt’s build system is that in a bunch of situations it relies on the system python, and often the system python is in a strange state. To avoid debugging Python issues, you could remove wireshark from the build, since it’s not important.

To do this, remove the wireshark_diffconfig symlink from whatever board you’re trying to build (e.g. rm boards/ekh01v2/wireshark_diffconfig) and run morse_setup.sh -b ekh01v2, then rerun make.