Bug 11134 - Python Exception <class 'ImportError'> No module named 'imp'
Summary: Python Exception <class 'ImportError'> No module named 'imp'
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.2.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.3 M4
Assignee: Juro Bystricky
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-03-07 14:19 UTC by Robert Berger
Modified: 2017-03-17 17:56 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Berger 2017-03-07 14:19:29 UTC
When I source the extensible sdk environment:

arm-poky-linux-gnueabi-gdb hello_world.out --command=gdb_init
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux --target=arm-poky-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from hello_world.out...done.
0x4a010a40 in ?? () from /opt/poky/2.2.1/multi-v7-ml/beagle-bone-black/core-image-sato-sdk-multi-v7-ml/lib/ld-linux.so.3
Breakpoint 1 at 0x10428: file hello_world.c, line 71.
(gdb) quit

When I source the classic SDK environment:

arm-poky-linux-gnueabi-gdb hello_world.out --command gdb_init
Python Exception <class 'ImportError'> No module named 'imp':
arm-poky-linux-gnueabi-gdb: warning:
Could not load the Python gdb module from `/opt/poky/2.2.1/multi-v7-ml/beagle-bone-black/sysroots/x86_64-pokysdk-linux/usr/share/gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.

GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pokysdk-linux --target=arm-poky-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from hello_world.out...done.
Python Exception <class 'NameError'> Installation error: gdb.execute_unwinders function is missing:
0x4a010a40 in ?? () from /opt/poky/2.2.1/multi-v7-ml/beagle-bone-black/core-image-sato-sdk-multi-v7-ml/lib/ld-linux.so.3
Breakpoint 1 at 0x10428: file hello_world.c, line 71.
(gdb) quit

I would assume that the extensible SDK installs something, the classic SDK does not? Maybe the difference is, that I build a sato-sdk for the extensible sdk while for the classic SDK I just build a sato image?
Comment 1 Robert Berger 2017-03-07 14:20:55 UTC
see also https://bugzilla.yoctoproject.org/show_bug.cgi?id=10776
Comment 2 Robert Berger 2017-03-07 15:12:05 UTC
bitbake core-image-sato-sdk -c populate_sdk did not help
Comment 3 Robert Berger 2017-03-07 16:45:02 UTC
This patch: 

https://github.com/RobertBerger/poky/commit/f4cea23fa7ad730208a379c2d85c9b863d4c1a41

does not fix it
Comment 4 Juro Bystricky 2017-03-13 06:23:07 UTC
In addition to:
https://github.com/RobertBerger/poky/commit/f4cea23fa7ad730208a379c2d85c9b863d4c1a41

It needs the patch:

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 3046114..6c690db 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -115,7 +115,7 @@ FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/imghdr.* $
 
 SUMMARY_${PN}-importlib="Python import implementation library"
 RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
-FILES_${PN}-importlib="${libdir}/python3.5/importlib "
+FILES_${PN}-importlib="${libdir}/python3.5/importlib ${libdir}/python3.5/imp.* "
 
 SUMMARY_${PN}-io="Python low-level I/O"
 RDEPENDS_${PN}-io="${PN}-core ${PN}-math"