After sourcing environment-setup-x86_64-poky-linux or environment setup for other architectures and trying to run bitbake the error below is displayed. lserban@lserban-Vostro-460:~/work/master_/build$ bitbake meta-toolchain-sdk Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named distutils.version Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named distutils.version Traceback (most recent call last): File "/home/lserban/work/master_/bitbake/bin//bitbake", line 30, in <module> import optparse ImportError: No module named optparse Pseudo is not present but is required, building this first before the main build Traceback (most recent call last): File "/home/lserban/work/master_/bitbake/bin/bitbake", line 30, in <module> import optparse ImportError: No module named optparse
So after you source the environment-setup and before you run bitbake, did you do source oe-init-bitbake? environment-setup suppose to change your environment for the cross development needs. But agreed that bitbake shouldn't endup with Traceback. So it's more of a bitbake bug than an ADT bug
Hello Jessica, Yes, I did run source oe-init-build-env.
FYI: the same error met only under these steps: source /opt/poky/1.2+snapshot/environment-setup-x86_64-poky-linux source /path_to_git/oe-init-build-env builddir bitbake meta-toolchain-sdk but when run "bitbake",only "source /path_to_git/oe-init-build-env builddir" is needed,after that run "bitbake meta-toolchain-sdk",no such error,below is the output: bitbake meta-toolchain-sdk Pseudo is not present but is required, building this first before the main build Loading cache: 100% |###########################################| ETA: 00:00:00 Loaded 1125 entries from dependency cache. Build Configuration: BB_VERSION = "1.15.3" TARGET_ARCH = "i586" TARGET_OS = "linux" MACHINE = "qemux86" DISTRO = "poky" DISTRO_VERSION = "1.2+snapshot-20120822" TUNE_FEATURES = "m32 i586" TARGET_FPU = "" meta meta-yocto = "master:603f6c631e9454d10517599e229943f2b26d08a5" NOTE: Resolving any missing task queue dependencies NOTE: Preparing runqueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ......
I can confirm this on 1.2 as well.
Fixed in master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=32cc952460de203f3e5db2646861de2ecc951d66
after below steps: source /opt/poky/1.2+snapshot/environment-setup-... source /path_to_git/oe-init-build-env builddir reminding messages found below: Error: The OE SDK/ADT was detected as already being present in this shell environment. Please use a clean shell when sourcing this environment script. and can not run "bitbake" command. git info:86c9aa8081f107420cd3763d0566d779daddc2b1 git branch:poky/danny