Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-62095

QDebug on static musl Qt CLI application causes segmentation fault (ARM)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P1: Critical P1: Critical
    • None
    • 5.8.0
    • Core: Other
    • None

      I have a basic Qt-based application which is a command line application and uses qDebug() to display messages throughout the execution of the program which has worked fine on windows, mac and x86 for years. I've recently tried compiling the program using Alpine Linux (which uses musl instead of libc) as a static application and the program segmentation faults as soon as I try to use qDebug(). GDB trace is as follows:

          Reading symbols from MultiDeviceLoader...done.
          (gdb) run
          Starting program: /home/jenkins/workspace/MultiDeviceLoader-Release-RPi/MultiDeviceLoader
      
          Program received signal SIGSEGV, Segmentation fault.
          0x74ae1148 in qt_message_output(QtMsgType, QMessageLogContext const&, QString const&) ()
          (gdb) bt
          #0  0x74ae1148 in qt_message_output(QtMsgType, QMessageLogContext const&, QString const&) ()
          #1  0x74b79484 in QDebug::~QDebug() ()
          #2  0x74ac34b8 in main ()
      

      This is the line that causes the segmentation fault:

          qDebug() <<  "test";
      

      Because this is on a constrained system I don't really have the time or resources to create a debug build of Qt on the raspberry pi to debug this issue further but I took the default alpine linux Qt 5 compile options from https://git.alpinelinux.org/cgit/aports/tree/community/qt5-qtbase?h=master and slightly modified them to reduce the number of components, e.g. without cups. I don't currently have the exact build line but will have access to it later.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            thedjnk Mr nK
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes