Skip to content

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

@planetmarshall

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.

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