Skip to content

x11 Flutter Engine Linux embedder dep #55468

Closed

Description

@jwinarske

There should not be an X11 dependency for Flutter Engine Linux embedder build. I want to implement my own shell, and not have X11 dependency.

gclient sync --revision flutter-1.18-candidate.5 -j 8

./flutter/tools/gn --runtime-mode debug --embedder-for-target --full-dart-sdk --enable-fontconfig --target-os linux --linux-cpu arm --arm-float-abi hard --target-triple arm-linux-gnueabihf --target-sysroot /media/joel/SolidState/rpi/rpi0w/tmp/work/arm1176jzfshf-vfp-poky-linux-gnueabi/flutter-engine/git-r0/recipe-sysroot --target-toolchain /media/joel/SolidState/LLVM8.0

Command: python /media/joel/SolidState/engine/src/build/config/linux/pkg-config.py -s /media/joel/SolidState/rpi/rpi0w/tmp/work/arm1176jzfshf-vfp-poky-linux-gnueabi/flutter-engine/git-r0/recipe-sysroot -a arm --system_libdir lib x11

I think if --embedder-for-target is passed, no shell should be included.

Activity

  1. stuartmorgan-g commented on Apr 23, 2020

    @stuartmorgan-g
    Contributor

    --disable-desktop-embeddings should do what you want.

    I don't know what --embedder-for-target does, so I'm not sure if there should be an interaction between those flags. Unfortunately the list of arguments has grown organically, and most of them aren't documented, so it's pretty hard to reason about it at this point.

  2. jwinarske commented on Apr 23, 2020

    @jwinarske
    ContributorAuthor

    This is what I see

    ./flutter/tools/gn --runtime-mode debug --embedder-for-target --full-dart-sdk --enable-fontconfig --target-os linux --linux-cpu arm --arm-float-abi hard --target-triple arm-linux-gnueabihf --target-sysroot /media/joel/SolidState/rpi/rpi0w/tmp/work/arm1176jzfshf-vfp-poky-linux-gnueabi/flutter-engine/git-r0/recipe-sysroot --target-toolchain /media/joel/SolidState/LLVM8.0 --disable-desktop-embeddings
    usage: gn [-h] [--unoptimized]
              [--runtime-mode {debug,profile,release,jit_release}] [--interpreter]
              [--dart-debug] [--full-dart-debug]
              [--target-os {android,ios,linux,fuchsia}] [--android]
              [--android-cpu {arm,x64,x86,arm64}] [--ios] [--ios-cpu {arm,arm64}]
              [--simulator] [--fuchsia] [--linux-cpu {x64,x86,arm64,arm}]
              [--fuchsia-cpu {x64,arm64}] [--arm-float-abi {hard,soft,softfp}]
              [--goma] [--no-goma] [--lto] [--no-lto] [--clang] [--no-clang]
              [--clang-static-analyzer] [--no-clang-static-analyzer]
              [--target-sysroot TARGET_SYSROOT]
              [--target-toolchain TARGET_TOOLCHAIN]
              [--target-triple TARGET_TRIPLE]
              [--operator-new-alignment OPERATOR_NEW_ALIGNMENT] [--enable-vulkan]
              [--enable-fontconfig] [--enable-skshaper]
              [--enable-vulkan-validation-layers] [--embedder-for-target]
              [--coverage] [--out-dir OUT_DIR] [--full-dart-sdk]
              [--no-full-dart-sdk] [--ide IDE] [--build-glfw-shell] [--bitcode]
              [--stripped] [--no-stripped] [--asan] [--lsan] [--msan] [--tsan]
              [--ubsan]
    gn: error: unrecognized arguments: --disable-desktop-embeddings
    
    
  3. stuartmorgan-g commented on Apr 23, 2020

    @stuartmorgan-g
    Contributor

    It landed a couple of weeks age (engine hash e6a2534); I'm not sure what the date for flutter-1.18-candidate.5 is.

  4. jwinarske commented on Apr 23, 2020

    @jwinarske
    ContributorAuthor

    flutter-1.18-candidate.5 is beb8a7e

    The flag works when I pull the right folder! Thanks

  5. jwinarske commented on Apr 24, 2020

    @jwinarske
    ContributorAuthor

    kronos\EGL\eglplatform.h is referencing x11. Why not depend on headers from the target sysroot?

    | FAILED: obj/flutter/shell/platform/linux/flutter_linux.fl_renderer.o | /media/joel/SolidState/rpi/rpi3/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/flutter-engine/git-r0/git/src/buildtools/linux-x64/clang/bin/clang++ -MD -MF obj/flutter/shell/platform/linux/flutter_linux.fl_renderer.o.d --target=armv7-unknown-linux-gnueabihf --sysroot /media/joel/SolidState/rpi/rpi3/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/flutter-engine/git-r0/recipe-sysroot -DFLUTTER_LINUX_COMPILATION -DUSE_OPENSSL=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_AVAILABILITY=1 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -D_DEBUG -DSK_GL -DSK_ENABLE_DUMP_GPU -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_CODEC_DECODES_PNG -DSK_ENCODE_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_WEBP -DSK_HAS_WUFFS_LIBRARY -DFLUTTER_API_SYMBOL_PREFIX=Embedder -I../.. -Igen -I../../third_party/libcxx/include -I../../third_party/libcxxabi/include -I../../third_party/libcxxabi/include -I../../third_party/khronos -I../../gpu -I../.. -fno-strict-aliasing -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -mthumb -fPIC -pipe -pthread -fcolor-diagnostics -mfpu=neon -Wall -Wextra -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-non-c-typedef-for-linkage -Wno-deprecated-copy -Wno-range-loop-construct -fvisibility=hidden --sysroot=/media/joel/SolidState/rpi/rpi3/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/flutter-engine/git-r0/recipe-sysroot -Wstring-conversion -Wnewline-eof -O0 -g2 -DMESA_EGL_NO_X11_HEADERS -isystem../../../../recipe-sysroot/usr/include/gtk-3.0 -isystem../../../../recipe-sysroot/usr/include/gio-unix-2.0 -isystem../../../../recipe-sysroot/usr/include/pango-1.0 -isystem../../../../recipe-sysroot/usr/include/fribidi -isystem../../../../recipe-sysroot/usr/include/harfbuzz -isystem../../../../recipe-sysroot/usr/include/atk-1.0 -isystem../../../../recipe-sysroot/usr/include/cairo -isystem../../../../recipe-sysroot/usr/include/pixman-1 -isystem../../../../recipe-sysroot/usr/include/uuid -isystem../../../../recipe-sysroot/usr/include/freetype2 -isystem../../../../recipe-sysroot/usr/include/libdrm -isystem../../../../recipe-sysroot/usr/include/libpng16 -isystem../../../../recipe-sysroot/usr/include/gdk-pixbuf-2.0 -isystem../../../../recipe-sysroot/usr/include/glib-2.0 -isystem../../../../recipe-sysroot/usr/lib/glib-2.0/include -DMESA_EGL_NO_X11_HEADERS -isystem../../../../recipe-sysroot/usr/include/libdrm -fvisibility-inlines-hidden -std=c++17 -fno-rtti -nostdinc++ -nostdinc++ -fno-exceptions -c ../../flutter/shell/platform/linux/fl_renderer.cc -o obj/flutter/shell/platform/linux/flutter_linux.fl_renderer.o | In file included from ../../flutter/shell/platform/linux/fl_renderer.cc:5: | In file included from ../../flutter/shell/platform/linux/fl_renderer.h:8: | In file included from ../../third_party/khronos/EGL/egl.h:39: | ../../third_party/khronos/EGL/eglplatform.h:105:10: fatal error: 'X11/Xlib.h' file not found | #include <X11/Xlib.h> | ^~~~~~~~~~~~

  6. jwinarske commented on Apr 25, 2020

    @jwinarske
    ContributorAuthor

    okay closing this again. I didn't have --disable-desktop-embeddings.

  7. github-actions commented on Aug 21, 2021

    @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 Aug 21, 2021
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions