conan-io / meta-conan

Yocto layer for the Conan project
23 stars 28 forks source link

ModuleNotFoundError: No module named 'monotonic' when trying to build conan-mosquitto_1.4.15.bb recipe #16

Open VinothkumarEswaran opened 2 years ago

VinothkumarEswaran commented 2 years ago

Hello,

I am trying to build the example 'conan-mosquitto _1.4.15.bb' recipe given in the doc. I am using dunfell version of meta-conan.

On running 'bitbake -k conan-mosquitto' I see the following error message:

| ERROR: Execution of '/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/temp/run.do_install.3021630' failed with exit code 1: | Using profile: | /home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/profiles/meta-conan_deploy | Traceback (most recent call last): | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/bin/conan", line 2, in | from conans.conan import run | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/conans/init.py", line 5, in | from conans.client.build.autotools_environment import AutoToolsBuildEnvironment | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/conans/client/build/autotools_environment.py", line 6, in | from conans.client.build.compiler_flags import (architecture_flag, build_type_define, | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/conans/client/build/compiler_flags.py", line 13, in | from conans.client.tools.apple import is_apple_os | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/conans/client/tools/init.py", line 12, in | from .net import * | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/conans/client/tools/net.py", line 3, in | from conans.client.downloaders import run_downloader | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/conans/client/downloaders/init.py", line 1, in | from .download import run_downloader | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/conans/client/downloaders/download.py", line 1, in | from .cached_file_downloader import CachedFileDownloader | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/conans/client/downloaders/cached_file_downloader.py", line 10, in | from conans.util.locks import SimpleLock | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/conans/util/locks.py", line 4, in | import fasteners | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/fasteners/init.py", line 23, in | from fasteners.lock import locked # noqa | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/fasteners/lock.py", line 24, in | from fasteners import _utils | File "/home/bsp_projects/yocto/yocto_basline/BASE_DIR/build-qemux86-64/tmp/work/core2-64-etas-linux/conan-mosquitto/1.4.15-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/fasteners/_utils.py", line 39, in | from monotonic import monotonic as now # noqa | ModuleNotFoundError: No module named 'monotonic' | WARNING: exit code 1 from a shell command.

Could you help here?

mairacanal commented 2 years ago

As I was debugging this problem, I found out that the meta-python layer at the branch dunfell is using the 0.15 version of the fasteners package.

The 0.15 version of the fasteners package doesn't support Python 3.8, only >Python 3.5.

Therefore, a simple solution for the problem is updating to the Honister branch, although the conan layer doesn't support this Yocto version.