Skip to content

flutter engine build with --enable-minimal-linux requires X11 for Vulkan #176684

Closed

Description

@planetmarshall

Steps to reproduce

  1. Setup symlinks for the custom toolchain
    cd engine/src/flutter/buildtools/linux-x64/clang/bin
    ln -s llvm-ar armv7-unknown-linux-gnueabihf-ar
    ln -s llvm-readelf armv7-unknown-linux-gnueabihf-readelf
    ln -s llvm-nm armv7-unknown-linux-gnueabihf-nm
    ln -s llvm-strip armv7-unknown-linux-gnueabihf-strip
    
  2. From a Linux host, cross compile to a Linux target with --enable-minimal-linux
    ./engine/src/flutter/tools/gn \
        --target-os=linux \
        --linux-cpu=arm \
        --enable-minimal-linux \
        --arm-float-abi=hard \
        --disable-desktop-embeddings \
        --embedder-for-target \
        --target-triple=armv7-unknown-linux-gnueabihf \
        --target-sysroot= # some sysroot without X11 libraries \
        --target-toolchain=$(pwd)/engine/src/flutter/buildtools/linux-x64/clang
    ninja -C engine/src/out/linux_debug_unopt_arm flutter/shell/platform/embedder:flutter_engine
    

Expected results

The build completes successfully

Actual results

A build error occurs from the vulkan headers

../../flutter/third_party/vulkan-deps/vulkan-headers/src/include/vulkan/vulkan.h:52:10: fatal error: 'xcb/xcb.h' file not found
   52 | #include <xcb/xcb.h>
      |          ^~~~~~~~~~~
1 error generated.

Activity

  1. ctkqiang commented on Oct 8, 2025

    @ctkqiang

    Steps to reproduce

    1. Setup symlinks for the custom toolchain
      cd engine/src/flutter/buildtools/linux-x64/clang/bin
      ln -s llvm-ar armv7-unknown-linux-gnueabihf-ar
      ln -s llvm-readelf armv7-unknown-linux-gnueabihf-readelf
      ln -s llvm-nm armv7-unknown-linux-gnueabihf-nm
      ln -s llvm-strip armv7-unknown-linux-gnueabihf-strip
      
    2. From a Linux host, cross compile to a Linux target with --enable-minimal-linux
      ./engine/src/flutter/tools/gn \
          --target-os=linux \
          --linux-cpu=arm \
          --enable-minimal-linux \
          --arm-float-abi=hard \
          --disable-desktop-embeddings \
          --embedder-for-target \
          --target-triple=armv7-unknown-linux-gnueabihf \
          --target-sysroot= # some sysroot without X11 libraries \
          --target-toolchain=$(pwd)/engine/src/flutter/buildtools/linux-x64/clang
      ninja -C engine/src/out/linux_debug_unopt_arm flutter/shell/platform/embedder:flutter_engine
      

    Expected results

    The build completes successfully

    Actual results

    A build error occurs from the vulkan headers

    ../../flutter/third_party/vulkan-deps/vulkan-headers/src/include/vulkan/vulkan.h:52:10: fatal error: 'xcb/xcb.h' file not found
       52 | #include <xcb/xcb.h>
          |          ^~~~~~~~~~~
    1 error generated.
    

    First can you locateflutter/impeller/renderer/backend/vulkan/vulkan_surface.cc?

    If you just need it to compile, install the missing X11 headers so Vulkan can find xcb/xcb.h. Oh yes remember to install it and build it:

    sudo apt-get update
    sudo apt-get install libxcb1-dev libxcb-util-dev libx11-dev

    then

    ./pathto/tools/gn --enable-minimal-linux
    ninja -C out/linux_release
  2. tirth-patel-nc commented on Oct 8, 2025

    @tirth-patel-nc
    Member

    @planetmarshall thanks for the report. Keeping it open for team's tracking. Also Please confirm whether #140690 #164051 #144635 are related to your case

  3. added
    platform-linuxBuilding on or for Linux specifically
    engineflutter/engine related. See also e: labels.
    and removed
    in triagePresently being triaged by the triage team
    platform-linuxBuilding on or for Linux specifically
    on Oct 8, 2025
  4. planetmarshall commented on Oct 8, 2025

    @planetmarshall
    ContributorAuthor

    @planetmarshall thanks for the report. Keeping it open for team's tracking. Also Please confirm whether #140690 #164051 #144635 are related to your case

  5. added a commit that references this issue on Oct 27, 2025
    b28c40c
  6. added a commit that references this issue on Oct 31, 2025
    6425def
  7. github-actions commented on Nov 11, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Nov 11, 2025
  9. added a commit that references this issue on Dec 10, 2025
    a7d46ef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.platform-linuxBuilding on or for Linux specificallyr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine teamwaiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions