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

qmake system() does not work under qemu-user

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Won't Do
    • Affects Version/s: 6.2.2
    • Fix Version/s: None
    • Component/s: Build tools: qmake
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      The qmake system() call to run programs does not work when running under qemu-user emulation (aarch64 guest under x86-64 host). This is because it probably uses posix_spawn() or some other API to launch processes that in turn calls clone() and clone() is not fully supported under qemu-user emulation. Relevant issue in the qemu project: https://gitlab.com/qemu-project/qemu/-/issues/140

       

      strace log extract of running

      echo | qmake /dev/stdin

       

      1576461 clone(0x1011,child_stack=0x0000000000000000,parent_tidptr=0x0000005501990f70,tls=0x0000000000000000,child_tidptr=0x0000000000000000) = -1 errno=22 (Invalid argument)

       

      we see clone fails.

       

      It would be nice if qmake could use fork+exec or similar to run processes instead of posix_spawn(). This bug makes it impossible to build projects (such as PyQt) that use qmake under qemu-user which is much more convenient than running a full VM.

      work-around

      configure with -no-feature-forkfd_pidfd

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              qtbuildsystem Qt Build System Team
              Reporter:
              kovidgoyal Kovid Goyal
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes