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

qmake fails with error "failed to parse default search paths from compiler output" since version 6.2 when using docker buildx

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Duplicate
    • Affects Version/s: 6.2.1, 6.2.2, 6.2.3
    • Fix Version/s: None
    • Component/s: Build tools: qmake
    • Labels:
      None
    • Environment:
      docker buildx
    • Platform/s:
      Linux/X11

      Description

      Using the following Dockerfile...

      FROM alpine:latest AS build
      
      # Install build dependencies
      RUN apk add --no-cache \
       qt6-qtbase-dev \
       qt6-qtdeclarative-dev \
       g++ \
       make \
       git
      
      WORKDIR /app/QJsonSerializer
      RUN git clone --depth 1 https://github.com/Znurre/QJsonSerializer.git . \
       && /usr/lib/qt6/bin/qmake \
       && make -j`nproc` \
       && make install
      

      ...with the following command (on x86_64):

      docker buildx build --platform=linux/arm64/8 .
      

      ...will result in the following error:

      #0 1.952 /usr/lib/qt6/mkspecs/features/toolchain.prf:76: Variable QMAKE_CXX.COMPILER_MACROS is not defined. 
      #0 1.958 Project ERROR: failed to parse default search paths from compiler output
      

      It works good when not using docker buildx. Tested with both Alpine, Ubuntu and ArchLinux ARM. As soon as version of Qt is >= 6.2, qmake will always fail with this error when docker buildx is used.

      It worked good with 6.1.

      Attached qmake debug output when run in the buildx environment.

        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:
              znurre Gustav Widmark
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes