Cross-compiling Qt Embedded 5.5 – unable to cross debug in QtCreator

Sysprogs forums Forums Other tools & products Cross-compiling Qt Embedded 5.5 – unable to cross debug in QtCreator

  • This topic has 6 replies, 2 voices, and was last updated 8 years ago by pVit.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #8986
    pVit
    Participant

    Hello,

    I already wrote to sysprogs support but they answered me:

    —————————————————————————————————————

    Hi,

    Unfortunately due to limited resources we cannot provide support for non-Sysprogs products.
    Please consider asking at the forums and mailing lists to get advice from the community.

    <hr />

    … so I am here.

    This is my issue:

     

    I have already crosscompiled Qt Embedded 5.5 for Raspberry Pi 2 (RPi3) by your tutorial (http://visualgdb.com/tools/QtCrossTool/).

    The crosscompile works well but I have problem with debugging. I don’t know what file Qt needs to set up. I tested it on Raspbian and Ubuntu MATE but both have the same problem.

    I need it in Qt Creator, not Visual Studio like in tutorial.

    I tried:

    GDB’s in crosscompile directory:

    SysGCC\Raspberry\bin\arm-linux-gnueabihf-gdb.exe - Gives mi error - "The selected build of GDB doesn not support Python scripting. It cannot be used in Qt Creator".
    
    SysGCC\MinGW32\bin\gdb.exe - Gives mi error - "The selected build of GDB doesn not support Python scripting. It cannot be used in Qt Creator".
    

    Qt GDB C:\Qt\Tools\mingw491_32\bin\gdb.exe

    Listening on port 10010

    A handler for the OS ABI “GNU/Linux” is not built into this configuration

    of GDB. Attempting to continue with the default i386 settings.

    Remote debugging from host 10.21.1.241

    Process /home/enwox/Desktop/AttendanceTerminal/AttendanceTerminal created; pid = 3944

    A handler for the OS ABI “GNU/Linux” is not built into this configuration

    of GDB. Attempting to continue with the default i386 settings.

    Architecture rejected target-supplied description

     

    … And timeout shows up after some time. Could you help me somehow? I was finding an answer for a long long time and I still don’t get it. I’m sure You know how important debugging is 🙂 .

     

    Thanks

     

    • This topic was modified 8 years, 2 months ago by pVit.
    #9183
    pVit
    Participant

    Nobody with this issue?

    #9205
    My
    Participant

    Had the same problem some time ago. You have to compile GDB yourself. Thats how I did it:

    Install MinGW the normal distro you can’t use the one you used to compile qt, I don’t know why. They don’t work together so uninstall the other one before. Link: http://www.mingw.org/

    Download qt-creator source. Link: https://github.com/qtproject/qt-creator

    Modify \dist\gdb\Makefile.mingw add a new target: targets=arm-none-eabi,arm-none-linux-gnueabi,i686-pc-mingw32,arm-linux-gnueabihf

    In \dist\gdb\ run make -f Makefile.mingw

    Now you have your gdb for windows.

    Hope I could help you.

     

    #9251
    pVit
    Participant

    Thank You for your reply,
    I have installed MinGW distro from your web, it’s g++ version 6.1.0 now.
    I downloaded qt-creator source, changed makefile.mingw file and tried to run make -f, but MinGW type:

    C:\Users\Tom\Desktop\crossdebug_mingw\qt-creator-master\qt-creator-master\dist\gdb>make -f Makefile.mingw
    The syntax of the command is incorrect.
    make: *** [Makefile.mingw:24: makesourcedir] Error 1
    
    C:\Users\Tom\Desktop\crossdebug_mingw\qt-creator-master\qt-creator-master\dist\gdb>

    Do you know what to do with this?

    #9252
    pVit
    Participant

    I downloaded another version of MinGW and I have this issue now:

    Tom@Tomáš /c/Users/Tom/Desktop/qt-creator-master_test/dist/gdb
    $ make -f Makefile.mingw
    wget -V &> /dev/null || mingw-get install msys-wget-bin
    cd /c/Users/Tom/Desktop/qt-creator-master_test/dist/gdb/staging && \
    echo “Extracting expat…” && \
    tar xf /c/Users/Tom/Desktop/qt-creator-master_test/dist/gdb/source/expat
    -2.1.1.tar.bz2 && \
    cd expat-2.1.1 && \
    ./configure -prefix=/c/Users/Tom/Desktop/qt-creator-master_test/dist/gdb
    /staging –enable-static –build=i686-pc-mingw32 && \
    make && make install
    Extracting expat…
    checking build system type… i686-pc-mingw32
    checking host system type… i686-pc-mingw32
    checking for as… as
    checking for dlltool… dlltool
    checking for objdump… objdump
    checking how to print strings… printf
    checking for gcc… gcc
    checking whether the C compiler works… yes
    checking for C compiler default output file name… a.exe
    checking for suffix of executables… .exe
    checking whether we are cross compiling… no
    checking for suffix of object files… o
    checking whether we are using the GNU C compiler… yes
    checking whether gcc accepts -g… yes
    checking for gcc option to accept ISO C89… none needed
    checking for a sed that does not truncate output… /bin/sed
    checking for grep that handles long lines and -e… /bin/grep
    checking for egrep… /bin/grep -E
    checking for fgrep… /bin/grep -F
    checking for ld used by gcc… c:/mingw/mingw_last/mingw32/bin/ld.exe
    checking if the linker (c:/mingw/mingw_last/mingw32/bin/ld.exe) is GNU ld… yes

    checking for BSD- or MS-compatible name lister (nm)… /mingw/bin/nm
    checking the name lister (/mingw/bin/nm) interface… BSD nm
    checking whether ln -s works… no, using cp -pR
    checking the maximum length of command line arguments… 8192
    checking whether the shell understands some XSI constructs… yes
    checking whether the shell understands “+=”… yes
    checking how to convert i686-pc-mingw32 file names to i686-pc-mingw32 format…
    func_convert_file_msys_to_w32
    checking how to convert i686-pc-mingw32 file names to toolchain format… func_c
    onvert_file_msys_to_w32
    checking for c:/mingw/mingw_last/mingw32/bin/ld.exe option to reload object file
    s… -r
    checking for objdump… (cached) objdump
    checking how to recognize dependent libraries… file_magic ^x86 archive import|
    ^x86 DLL
    checking for dlltool… (cached) dlltool
    checking how to associate runtime and link libraries… func_cygming_dll_for_imp
    lib
    checking for ar… ar
    checking for archiver @FILE support… @
    checking for strip… strip
    checking for ranlib… ranlib
    checking for gawk… gawk
    checking command to parse /mingw/bin/nm output from gcc object… ok
    checking for sysroot… no
    checking for mt… no
    checking if : is a manifest tool… no
    checking how to run the C preprocessor… gcc -E
    checking for ANSI C header files… yes
    checking for sys/types.h… yes
    checking for sys/stat.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for memory.h… yes
    checking for strings.h… yes
    checking for inttypes.h… yes
    checking for stdint.h… yes
    checking for unistd.h… yes
    checking for dlfcn.h… yes
    checking for objdir… .libs
    checking if gcc supports -fno-rtti -fno-exceptions… no
    checking for gcc option to produce PIC… -DDLL_EXPORT -DPIC
    checking if gcc PIC flag -DDLL_EXPORT -DPIC works… yes
    checking if gcc static flag -static works… yes
    checking if gcc supports -c -o file.o… yes
    checking if gcc supports -c -o file.o… (cached) yes
    checking whether the gcc linker (c:/mingw/mingw_last/mingw32/bin/ld.exe) support
    s shared libraries… yes
    checking whether -lc should be explicitly linked in… yes
    checking dynamic linker characteristics… Win32 ld.exe
    checking how to hardcode library paths into programs… immediate
    checking whether stripping libraries is possible… yes
    checking if libtool supports shared libraries… yes
    checking whether to build shared libraries… yes
    checking whether to build static libraries… yes
    checking for gcc… (cached) gcc
    checking whether we are using the GNU C compiler… (cached) yes
    checking whether gcc accepts -g… (cached) yes
    checking for gcc option to accept ISO C89… (cached) none needed
    checking for g++… g++
    checking whether we are using the GNU C++ compiler… yes
    checking whether g++ accepts -g… yes
    checking how to run the C++ preprocessor… g++ -E
    checking for ld used by g++… c:/mingw/mingw_last/mingw32/bin/ld.exe
    checking if the linker (c:/mingw/mingw_last/mingw32/bin/ld.exe) is GNU ld… yes

    checking whether the g++ linker (c:/mingw/mingw_last/mingw32/bin/ld.exe) support
    s shared libraries… yes
    checking for g++ option to produce PIC… -DDLL_EXPORT -DPIC
    checking if g++ PIC flag -DDLL_EXPORT -DPIC works… yes
    checking if g++ static flag -static works… yes
    checking if g++ supports -c -o file.o… yes
    checking if g++ supports -c -o file.o… (cached) yes
    checking whether the g++ linker (c:/mingw/mingw_last/mingw32/bin/ld.exe) support
    s shared libraries… yes
    checking dynamic linker characteristics… Win32 ld.exe
    checking how to hardcode library paths into programs… immediate
    checking for a BSD-compatible install… /bin/install -c
    checking whether gcc accepts -fexceptions… yes
    checking for ANSI C header files… (cached) yes
    checking whether byte ordering is bigendian… no
    checking for an ANSI C-conforming const… yes
    checking for size_t… yes
    checking for memmove… yes
    checking for bcopy… no
    checking fcntl.h usability… yes
    checking fcntl.h presence… yes
    checking for fcntl.h… yes
    checking for unistd.h… (cached) yes
    checking for off_t… yes
    checking for stdlib.h… (cached) yes
    checking for unistd.h… (cached) yes
    checking for sys/param.h… yes
    checking for getpagesize… yes
    checking for working mmap… no
    checking for gcc option to accept ISO C99… none needed
    checking for gcc option to accept ISO Standard C… (cached) none needed
    checking for an ANSI C99-conforming __func__… yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: WARNING: ‘Makefile.in’ seems to ignore the –datarootdir setting

    config.status: creating expat.pc
    config.status: creating expat_config.h
    config.status: executing libtool commands
    make[1]: Entering directory
    /c/Users/Tom/Desktop/qt-creator-master_test/dist/gd
    b/staging/expat-2.1.1′
    /bin/sh ./libtool –verbose –mode=compile gcc -I./lib -I. -g -O2 -Wall -Wmissin
    g-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmlp
    arse.lo -c lib/xmlparse.c
    libtool: compile: gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-pr
    ototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmlparse.c -DDLL_EXPORT -DPI
    C -o lib/.libs/xmlparse.o
    libtool: compile: gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-pr
    ototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmlparse.c -o lib/xmlparse.o
    >/dev/null 2>&1
    /bin/sh ./libtool –verbose –mode=compile gcc -I./lib -I. -g -O2 -Wall -Wmissin
    g-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmlt
    ok.lo -c lib/xmltok.c
    libtool: compile: gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-pr
    ototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmltok.c -DDLL_EXPORT -DPIC
    -o lib/.libs/xmltok.o
    libtool: compile: gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-pr
    ototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmltok.c -o lib/xmltok.o >/de
    v/null 2>&1
    /bin/sh ./libtool –verbose –mode=compile gcc -I./lib -I. -g -O2 -Wall -Wmissin
    g-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmlr
    ole.lo -c lib/xmlrole.c
    libtool: compile: gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-pr
    ototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmlrole.c -DDLL_EXPORT -DPIC
    -o lib/.libs/xmlrole.o
    libtool: compile: gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-pr
    ototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmlrole.c -o lib/xmlrole.o >/
    dev/null 2>&1
    /bin/sh ./libtool –verbose –mode=link gcc -I./lib -I. -g -O2 -Wall -Wmissing-p
    rototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -no-undefined
    -version-info 7:0:6 -rpath /c/Users/Tom/Desktop/qt-creator-master_test/dist/gdb/
    staging/lib -o libexpat.la lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
    libtool: link: rm -fr .libs/libexpat.a .libs/libexpat.dll.a .libs/libexpat.la .
    libs/libexpat.lai
    libtool: link: gcc -shared lib/.libs/xmlparse.o lib/.libs/xmltok.o lib/.libs/xm
    lrole.o -O2 -o .libs/libexpat-1.dll -Wl,–enable-auto-image-base -Xlinker –
    -out-implib -Xlinker .libs/libexpat.dll.a
    libtool: link: ar cru .libs/libexpat.a lib/xmlparse.o lib/xmltok.o lib/xmlrole.
    o
    libtool: link: ranlib .libs/libexpat.a
    libtool: link: creating libexpat.la
    libtool: link: ( cd “.libs” && rm -f “libexpat.la” && cp -pR “../libexpat.la” “l
    ibexpat.la” )
    /bin/sh ./libtool –verbose –mode=link gcc -I./lib -I. -g -O2 -Wall -Wmissing-p
    rototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o xmlwf/xmlw
    f.exe xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/readfilemap.o libexpa
    t.la
    libtool: link: gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-protot
    ypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o xmlwf/.libs/xmlwf.exe xmlwf/xmlwf.o x
    mlwf/xmlfile.o xmlwf/codepage.o xmlwf/readfilemap.o ./.libs/libexpat.dll.a -L/c
    /Users/Tom/Desktop/qt-creator-master_test/dist/gdb/staging/lib
    c:/mingw/mingw_last/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe:
    xmlwf/xmlwf.o: Relocations in generic ELF (EM: 40)
    c:/mingw/mingw_last/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe:
    xmlwf/xmlwf.o: Relocations in generic ELF (EM: 40)
    c:/mingw/mingw_last/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe:
    xmlwf/xmlwf.o: Relocations in generic ELF (EM: 40)
    c:/mingw/mingw_last/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe:
    xmlwf/xmlwf.o: Relocations in generic ELF (EM: 40)
    c:/mingw/mingw_last/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe:
    xmlwf/xmlwf.o: Relocations in generic ELF (EM: 40)
    c:/mingw/mingw_last/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe:
    xmlwf/xmlwf.o: Relocations in generic ELF (EM: 40)
    c:/mingw/mingw_last/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe:
    xmlwf/xmlwf.o: Relocations in generic ELF (EM: 40)
    c:/mingw/mingw_last/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe:
    xmlwf/xmlwf.o: Relocations in generic ELF (EM: 40)
    c:/mingw/mingw_last/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe:
    xmlwf/xmlwf.o: Relocations in generic ELF (EM: 40)
    c:/mingw/mingw_last/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe:
    xmlwf/xmlwf.o: Relocations in generic ELF (EM: 40)
    xmlwf/xmlwf.o: error adding symbols: File in wrong format
    collect2.exe: error: ld returned 1 exit status
    make[1]: *** [xmlwf/xmlwf.exe] Error 1
    make[1]: Leaving directory /c/Users/Tom/Desktop/qt-creator-master_test/dist/gdb
    /staging/expat-2.1.1′
    make: *** [/c/Users/Tom/Desktop/qt-creator-master_test/dist/gdb/staging/lib/libe
    xpat.a] Error 2

    Tom@Tomáš /c/Users/Tom/Desktop/qt-creator-master_test/dist/gdb

    • This reply was modified 8 years ago by pVit.
    • This reply was modified 8 years ago by pVit.
    #9288
    My
    Participant

    Did you have admin rights?

    #9364
    pVit
    Participant

    < /d/qt-creator-master/dist/gdb/staging/gdb-7.11.1/gdb/gnulib/import/wctype.in.h; \
    } > wctype.h-t && \
    mv wctype.h-t wctype.h
    make all-recursive
    make[8]: Entering directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-bu
    ild/gdb/build-gnulib/import’
    make[9]: Entering directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-bu
    ild/gdb/build-gnulib/import’
    gcc -DHAVE_CONFIG_H -I. -I/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1/gdb/g
    nulib/import -I.. -g -O2 -D__USE_MINGW_ACCESS -MT dirname-lgpl.o -MD -MP -MF
    .deps/dirname-lgpl.Tpo -c -o dirname-lgpl.o /d/qt-creator-master/dist/gdb/stagi
    ng/gdb-7.11.1/gdb/gnulib/import/dirname-lgpl.c
    In file included from d:/qt-creator-master/dist/gdb/staging/gdb-7.11.1/gdb/gnuli
    b/import/dirname-lgpl.c:23:0:
    ./wchar.h:514:1: error: unknown type name ‘mbstate_t’
    _GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps));
    ^
    ./wchar.h:539:1: error: unknown type name ‘mbstate_t’
    _GL_FUNCDECL_RPL (mbrtowc, size_t,
    ^
    ./wchar.h:593:1: error: unknown type name ‘mbstate_t’
    _GL_FUNCDECL_RPL (mbsrtowcs, size_t,
    ^
    make[9]: *** [dirname-lgpl.o] Error 1
    make[9]: Leaving directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-build/gdb/build-gnulib/import’
    make[8]: *** [all-recursive] Error 1
    make[8]: Leaving directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-build/gdb/build-gnulib/import’
    make[7]: *** [all] Error 2
    make[7]: Leaving directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-build/gdb/build-gnulib/import’
    make[6]: *** [subdir_do] Error 1
    make[6]: Leaving directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-build/gdb/build-gnulib’
    make[5]: *** [all] Error 2
    make[5]: Leaving directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-build/gdb/build-gnulib’
    make[4]: *** [subdir_do] Error 1
    make[4]: Leaving directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-build/gdb’
    make[3]: *** [all-lib] Error 2
    make[3]: Leaving directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-build/gdb’
    make[2]: *** [all-gdb] Error 2
    make[2]: Leaving directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-build’
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/d/qt-creator-master/dist/gdb/staging/gdb-7.11.1-build’
    make: *** [/d/qt-creator-master/dist/gdb/qtcreator-gdb-7.11.1/gdb.exe] Error 2

    • This reply was modified 8 years ago by pVit.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.