Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Docker plugin debug from container doesn't work
Forum Updated to NodeBB v4.3 + New Features

Docker plugin debug from container doesn't work

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 363 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    belenkaya
    wrote on 24 May 2022, 11:28 last edited by
    #1

    I encountered problems debugging remote device from docker container.
    I am using a kubuntu machine if that matters. Device manufacturer provided instructions on how to compile Buildroot OS image from CentOS docker container. After completing i have sdk-folder with compilers, qmake and gdb, that are compiled for CentOS. I inserted that sdk into the said container and saved the image. In QtCreator i added new docker device, with that image, mounted project directory and specified to look for kit items in sdk folder, that i inserted. After that, qtcreator created the kit from docker. I changed it, as in picture:
    2e60cce4-25d0-4cd2-87b3-0f6c1dd252d7-image.png
    elvees-device is device in local network
    build device is container i used
    compilers and qmake have path in container: docker://elvees:240522-08/src/buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-gcc/g++/qmake
    but sysroot and mkspec paths are on my pc, because it seems, qt doesnt get those from container.
    and with this setup i managed to build gui apps and all good.
    the problem with debugger though, the path in docker is working properly, qt creator sees it, but when i start debug with breakpoint at start of main(), debugging process ends.
    664f87ee-2c40-40fe-9deb-f56da922e6b1-image.png
    If i set the debugger path not from docker, but on my pc, using the same executable from sdk folder, debugging works properly, however this doesnt feel right, because this compatibility between centos and ubuntu executables might crash when i run apt-get update/upgrade and my glibc version changes. This docker plugin is experimental, so this behavior might be intended.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      belenkaya
      wrote on 26 May 2022, 06:40 last edited by
      #2

      Actually, when i am using the kit, it says:

      warning: "/src/buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-g++" is used by qmake, but "docker://elvees:240522-08/src/buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-g++" is configured in the kit.
      Please update your kit (elvees-device-203-testing2) or choose a mkspec for qmake that matches your target environment better.
      

      looks like i am using compiler not from docker, but from folder on my pc. but when i tried to specify path to mkspec in docker it didn't work. Another question is: does QtCreator actually use the compiler from inside of docker environment?

      1 Reply Last reply
      0

      1/2

      24 May 2022, 11:28

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved