Hello everyone!
This is a question about QT debugging on a Desktop . However due the installation of poky-eglibc-x86_64-arm-toolchain-qt I have to ask in this forum. I can run applications for imx6sabrelite using QT on yocto, but I have some issues debugging(Qt debugging on yocto I (running on sabrelite) ).Also I can run Qt apps on my Desktop . However I can't debug on my desktop (The gdb process terminated unexpectly(code 1))
This is the log:
sStarting debugger "GdbEngine" for ABI "x86-linux-generic-elf-32bit"...
dStart parameters: 'PruebaSabreLite' mode: 1
dABI: x86-linux-generic-elf-32bit
dLanguages: c++
dExecutable: /home/dgg/Prueba qt/build-PruebaSabreLite-Desktop-Debug/PruebaSabreLite
dDirectory: /home/dgg/Prueba qt/build-PruebaSabreLite-Desktop-Debug
dDebugger: /usr/bin/gdb
dProject: /home/dgg/Prueba qt/PruebaSabreLite (built: /home/dgg/Prueba qt/build-PruebaSabreLite-Desktop-Debug)
dQML server: 127.0.0.1:3768
dRemote:
dSysroot:
dDebug Source Location:
dSymbol file:
dDumper libraries: /usr/share/qt4/qtc-debugging-helper/ /opt/qt4/qtc-debugging-helper/30324244/ /home/dgg/.local/share/data/QtProject/QtCreator/qtc-debugging-helper/30324244/
dDebugger settings:
dUseAlternatingRowColours: false (default: false)
dFontSizeFollowsEditor: false (default: false)
dUseMessageBoxForSignals: true (default: true)
dAutoQuit: false (default: false)
dLogTimeStamps: false (default: false)
dVerboseLog: false (default: false)
dCloseBuffersOnExit: false (default: false)
dSwitchModeOnExit: false (default: false)
dBreakpointsFullPath: false (default: false)
dRaiseOnInterrupt: true (default: true)
dUseDebuggingHelper: true (default: true)
dUseCodeModel: true (default: true)
dShowThreadNames: false (default: false)
dUseToolTips: false (default: false)
dUseToolTipsInLocalsView: false (default: false)
dUseToolTipsInBreakpointsView: false (default: false)
dUseAddressInBreakpointsView: false (default: false)
dUseAddressInStackView: false (default: false)
dAdditionalArguments: (default: )
dSymbolPaths: (default: )
dSourcePaths: (default: )
dBreakEvent: (default: )
dBreakOnCrtDbgReport: false (default: false)
dCDB_Console: false (default: false)
dBreakpointCorrection: true (default: true)
dIgnoreFirstChanceAccessViolation: false (default: false)
dLoadGdbInit: true (default: true)
dLoadGdbDumpers: true (default: true)
dAttemptQuickStart: false (default: false)
dGdbStartupCommands: (default: )
dGdbCustomDumperCommands: (default: )
dGdbPostAttachCommands: (default: )
dWatchdogTimeout: 20 (default: 20)
dAutoEnrichParameters: true (default: true)
dUseDynamicType: true (default: true)
dTargetAsync: false (default: false)
dWarnOnReleaseBuilds: true (default: true)
dMultiInferior: false (default: false)
dIntelFlavor: false (default: false)
dIdentifyDebugInfoPackages: false (default: false)
dMaximalStackDepth: 20 (default: 20)
dAlwaysAdjustStackColumnWidths: false (default: false)
dShowStandardNamespace: true (default: true)
dShowQtNamespace: true (default: true)
dSortStructMembers: true (default: true)
dAutoDerefPointers: true (default: true)
dAlwaysAdjustLocalsColumnWidths: false (default: false)
dMaximalStringLength: 10000 (default: 10000)
dListSourceFiles: false (default: false)
dSkipKnownFrames: false (default: false)
dEnableReverseDebugging: false (default: false)
dAllPluginBreakpoints: true (default: true)
dSelectedPluginBreakpoints: false (default: false)
dAdjustBreakpointLocations: true (default: true)
dAlwaysAdjustBreakpointsColumnWidths: false (default: false)
dNoPluginBreakpoints: false (default: false)
dSelectedPluginBreakpointsPattern: .* (default: .*)
dBreakOnThrow: false (default: false)
dBreakOnCatch: false (default: false)
dBreakOnWarning: false (default: false)
dBreakOnFatal: false (default: false)
dBreakOnAbort: false (default: false)
dAlwaysAdjustRegistersColumnWidths: false (default: false)
dAlwaysAdjustSnapshotsColumnWidths: false (default: false)
dAlwaysAdjustThreadsColumnWidths: false (default: false)
dAlwaysAdjustModulesColumnWidths: false (default: false)
dShowQmlObjectTree: true (default: true)
dQmlInspector.ShowAppOnTop: false (default: false)
dQmlInspector.FromQml: false (default: false)
dState changed from DebuggerNotReady(0) to EngineSetupRequested(1) [master]
dQUEUE: SETUP ENGINE
dCALL: SETUP ENGINE
dEXAMINING /home/dgg/Prueba qt/build-PruebaSabreLite-Desktop-Debug/PruebaSabreLite
dELF SECTIONS: .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame .gcc_except_table .ctors .dtors .jcr .dynamic .got .got.plt .data .bss .comment .debug_aranges .debug_info .debug_abbrev .debug_line .debug_str .debug_loc .debug_ranges .shstrtab .symtab .strtab
dTRYING TO START ADAPTER
dENABLING TEST CASE: 0
dSTARTING /usr/bin/gdb -i mi --tty=/tmp/qt_temp.BN2567
dGDB STARTED, INITIALIZING IT
<489show version
<490show debug-file-directory
<491set print object on
<492set breakpoint pending on
<493set print elements 10000
<494set overload-resolution off
<495handle SIGSEGV nopass stop print
<496set unwindonsignal on
<497set width 0
<498set height 0
<499-interpreter-exec console "set remotecache on"
sSetting up inferior...
<500set substitute-path /var/tmp/qt-src /usr/include
<501-interpreter-exec console "set auto-solib-add on"
<502pwd
dUNEXPECTED GDB STDERR: Traceback (most recent call last):
d File "/opt/poky/1.4.1/sysroots/i686-pokysdk-linux/usr/lib/python2.7/site.py", line 569, in <module>
d main()
d File "/opt/poky/1.4.1/sysroots/i686-pokysdk-linux/usr/lib/python2.7/site.py", line 551, in main
d known_paths = addusersitepackages(known_paths)
d File "/opt/poky/1.4.1/sysroots/i686-pokysdk-linux/usr/lib/python2.7/site.py", line 278, in addusersitepackages
d user_site = getusersitepackages()
d File "/opt/poky/1.4.1/sysroots/i686-pokysdk-linux/usr/lib/python2.7/site.py", line 253, in getusersitepackages
d user_base = getuserbase() # this will also set USER_BASE
d File "/opt/poky/1.4.1/sysroots/i686-pokysdk-linux/usr/lib/python2.7/site.py", line 242, in getuserbase
d from sysconfig import get_config_var
d File "/opt/poky/1.4.1/sysroots/i686-pokysdk-linux/usr/lib/python2.7/sysconfig.py", line 10, in <module>
d 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
dAttributeError: 'module' object has no attribute 'lib'
dGDB PROCESS FINISHED, status 0, code 1
dNOTE: ENGINE ILL ******
dState changed from EngineSetupRequested(1) to EngineShutdownRequested(20) [master]
dQUEUE: SHUTDOWN ENGINE
dCALL: SHUTDOWN ENGINE
dPLAIN ADAPTER SHUTDOWN 20
dINITIATE GDBENGINE SHUTDOWN IN STATE 1, PROC: 0
dNOTE: ENGINE SHUTDOWN OK
dState changed from EngineShutdownRequested(20) to EngineShutdownOk(22) [master]
dState changed from EngineShutdownOk(22) to DebuggerFinished(23) [master]
dQUEUE: FINISH DEBUGGER
dNOTE: FINISH DEBUGGER
dHANDLE RUNCONTROL FINISHED
sDebugger finished.
------------------------------------------------------------------------------------------------------------------
As you can see the error seems to start when he read the line 10 of the sysconfig.py. So I went to this file :
"""Provide access to Python's configuration information.
"""
import sys
import os
from os.path import pardir, realpath
_INSTALL_SCHEMES = {
'posix_prefix': {
'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', -----------> line10
'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
...
I don't know how to fix this problem! Can anyone help me ?
Thank you!!
Diego
Hello
Sorry, we found another solution but forgot to send. At Qt Creator , Kit Desktop, Run Environment section, we create a new variable:
PYTHONHOME=/usr
So, when we run locally it uses the local Python.
When we run on target, it calls poky Python.
Best regards
Hi Diego,
Did you get any further with this issue?
Unfortunately I'm currently having the same problem.
Thanks,
Mike.
Qt building for i.mx53 quick sort board is worked fine on the host with qt-everywhere-opensource-src-4.7.2 on ubuntu 12.04 32 bit machine its shoing the QT demos on the host but unable to run on imx53 target board it is giving cannot run exe ,so how to run cross compile qt for imx53 please surges me
Hi
In Desktop debugging, QT is starting gdb from usr/bin. GDB must start python from /usr/bin. This 2.7.3 python does not have sys.lib.
We start manually python from /op/poky/... It has sys.lib
Looking for a way to start /usr/bingdb with /opt/poky/1.4.2... python
Thanks
Hello
We are trying yet to work with Desktop and Target without reopening QTCreator.
The problem keeps being that QT Desktop debugging try to load posix_prefix scheme and something is not well done there. QT Target debugging must use another scheme that is working (any way to know which one?)
The line from sysconfig.py at opt/poky/1.4.2 ....
'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', -----------> line10
is different at Ubuntu python for this same scheme:
'stdlib': '{base}/lib/python{py_version_short}', -----------> line10
If python is 2.73 on both systems (Ubuntu and poky), does not have to be the same file in both libs?
Thanks and best regards
Hi
To do the installation we follow this steps:
Setup QT Creator with Yocto Build
To make a test we delete the line:
source /opt/poky/1.4.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi
from qtcreator.sh. Without it, QT Debugger shows the variables and its values.
So we now have these questions:
Is there anything wrong in /opt/poky/1.4.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi?
Or Is it not possible to work changing from desktop to target within QT Desktop and we have to have two separate start scripts for QT (one for desktop debugging and another for target debugging)?
Thank you