Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - python2.7 (gdb-prereq): missing _scruct module: (8 Items)
   
python2.7 (gdb-prereq): missing _scruct module  
Hello!
Seems than current python 2.7 build cannot work with gdb 7.x and Qt Creator IDE (Linux, at least with 3.2.0 and 3.5.1 
versions of IDE).

Steps to reproduce:
- try to debug any Qt application using "Debug" button. 
Result: Debug feature does not work, "Window-> Views-> Debugger Log" contains at least these error lines:
------------------------- cut ---------------------------
>&"Traceback (most recent call last):\n"
>&"  File \"<string>\", line 1, in <module>\n"
>&"  File \"/opt/qtcreator-3.2.0/share/qtcreator/debugger/gdbbridge.py\", line 14, in <module>\n"
>&"    import struct\n"
>&"  File \"/opt/650/host/linux/x86/usr/python27.svn/lib/python2.7/struct.py\", line 1, in <module>\n"
>&"    from _struct import *\n"
>&"ImportError: No module named _struct\n"
------------------------- cut ---------------------------
(full log is attached)

help('modules') command also fails:
------------------------- cut ---------------------------

Python 2.7.2 (default, Feb 22 2012, 13:21:29) 
[GCC 4.1.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help('modules')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/650/host/linux/x86/usr/python27/lib/python2.7/site.py", line 466, in __call__
    import pydoc
  File "/opt/650/host/linux/x86/usr/python27/lib/python2.7/pydoc.py", line 55, in <module>
    import sys, imp, os, re, types, inspect, __builtin__, pkgutil
  File "/opt/650/host/linux/x86/usr/python27/lib/python2.7/inspect.py", line 41, in <module>
    from operator import attrgetter
ImportError: No module named operator
>>> 
------------------------- cut ---------------------------

Is any additional information needed?

Regards,
Igor
Attachment: Text qtcreator_gdb_log.txt 8.18 KB
Re: python2.7 (gdb-prereq): missing _scruct module  
Thanks for the report. We are currently working on more complete packaging of Python which should take care of problems 
like this.

If you need to work around this in the mean time, you should be able to install and use the python 2.x release from your
 Linux distribution instead of this one.
Re: python2.7 (gdb-prereq): missing _scruct module  
> Thanks for the report. We are currently working on more complete packaging of 
> Python which should take care of problems like this.
> 
> If you need to work around this in the mean time, you should be able to 
> install and use the python 2.x release from your Linux distribution instead of
>  this one.

I have the same issue. But how can I use python 2.x release from xubuntu 15.10 x64 (my host) instead of shipped with an 
gdb-prereq-linux.tgz archive?   
Re: python2.7 (gdb-prereq): missing _scruct module  
I was under the mistaken impression that it would pick up whichever python it found in $PATH.

Since that's not the case you would have to play around with symlinks to get the directories pointing to the system 
python. However it's probably easy to just put up a full python build.

Give the one attached a try and let me know if you still have problems.
Attachment: Text gdb-prereq-linux.tgz 11.76 MB
Re: python2.7 (gdb-prereq): missing _scruct module  
Now works just fine, thanks!
Re: python2.7 (gdb-prereq): missing _scruct module  
Michael,
thank you, it works indeed. Could you please provide win32 build too?
Re: python2.7 (gdb-prereq): missing _scruct module  
What's missing from the win32 package?
Re: python2.7 (gdb-prereq): missing _scruct module  
Sorry, i've tested win32 gdb/prereq again, and they work fine, so there's no need to update.