Debugging using QtCreator¶
This guide is written in reference to Ubuntu 12.04. Some changes may be necessary if using a different version of Ubuntu.
And for Qt embedded 4.7.4.
Fix ubuntu 12.04 python¶
The sysconfig.py file included with ubuntu 12.04 causes oecore arm-angstrom-linux-gnueabi-gdb debugger to crash.
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 562, in <module>
main()
File "/usr/lib/python2.7/site.py", line 544, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib/python2.7/site.py", line 236, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib/python2.7/sysconfig.py", line 577, in get_config_var
return get_config_vars().get(name)
File "/usr/lib/python2.7/sysconfig.py", line 476, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python2.7/sysconfig.py", line 337, in _init_posix
makefile = _get_makefile_filename()
File "/usr/lib/python2.7/sysconfig.py", line 331, in _get_makefile_filename
return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config" + (sys.pydebug and "_d" or ""), "Makefile")
AttributeError: 'module' object has no attribute 'pydebug'
Current fix hacks the /usr/lib/python2.7/sysconfig.py to not use sys.pydebug.
- Download python_pydebug.diff to VM.
cd /usr/lib/python2.7/sudo patch -b -i ~/Download/python_pydebug.diff- Run arm-angstrom-linux-gnueabi-gdb to make sure it doesn't crash now
Install QtCreator 2.6.2¶
QtCreator 2.6.2 seems to be the latest version of Qt Creator that can properly communicate with the 4.7.4 arm-angstrom-linux-gnueabi-gdb debugger.
- Download QtCreator 2.6.2 linux-x86
Attached to page in case mirror goes down. qt-creator-linux-x86-opensource-2.6.2.bin - Install on the VM
Installing QT 4.7.4¶
Note: Qt 4.8 should build code written for Qt 4.7.4. Just be careful not to use any features new to 4.8
The L138 filesystem uses QT 4.7.4. If you want to be able to build compatible versions that run on the VM then you'll need to install the 4.7.4 source and libraries.
- Download http://download.qt-project.org/archive/qt/4.7/qt-everywhere-opensource-src-4.7.4.tar.gz
Attached to page in case mirror goes down. qt-everywhere-opensource-src-4.7.4.tar.gz
Go to top