sony / meta-flutter

Yocto recipes for Flutter Engine and custom embedders
BSD 3-Clause "New" or "Revised" License
87 stars 21 forks source link

Issue while building flutter-engine on a imx8mm platform #89

Closed fleroyener closed 1 year ago

fleroyener commented 1 year ago

Hi,

I have this issue with the compilation of flutter-engine recipes. First i had the issue that i don't have goma :

| ________ running 'python3 src/flutter/tools/githooks/setup.py' in '/home/build/tmp/work/armv8a-mx8mm-poky-linux/flutter-engine/1.0-r0'
| Traceback (most recent call last):
|   File "./flutter/tools/gn", line 1104, in <module>
|     sys.exit(main(sys.argv))
|   File "./flutter/tools/gn", line 1082, in main
|     gn_args = to_command_line(to_gn_args(args))
|   File "./flutter/tools/gn", line 254, in to_gn_args
|     gn_args.update(setup_goma(args))
|   File "./flutter/tools/gn", line 224, in setup_goma
|     raise Exception(
| Exception: GOMA was specified but was not found. Set the GOMA_DIR environment variable, install goma at $HOME/goma following the instructions at https://github.com/flutter/flutter/wiki/Compiling-the-engine, or run this script with the --no-goma flag to do a non-goma-enabled build.

Soo, i tried to add this in a bbappend : GN_ARGS:append = " --no-goma"

And then the issue is different :

| [13/6967] CXX obj/flutter/flutter_vma/flutter_vma.flutter_vma.o
| FAILED: obj/flutter/flutter_vma/flutter_vma.flutter_vma.o
| ../../buildtools/linux-x64/clang/bin/clang++ -MD -MF obj/flutter/flutter_vma/flutter_vma.flutter_vma.o.d -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 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_WAYLAND_KHR -DVMA_DYNAMIC_VULKAN_FUNCTIONS=0 -DVMA_STATIC_VULKAN_FUNCTIONS=0 -I../.. -Igen -I../../third_party/libcxx/include -I../../third_party/libcxxabi/include -I../../build/secondary/third_party/libcxx/config -I../../third_party/vulkan-deps/vulkan-headers/src/include -I../../third_party/vulkan_memory_allocator/include -fno-strict-aliasing -fstack-protector --param=ssp-buffer-size=4 -fPIC -pipe -pthread --target=aarch64-linux-gnu -DBORINGSSL_CLANG_SUPPORTS_DOT_ARCH -fcolor-diagnostics -Wall -Wextra -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-deprecated-copy -Wno-psabi -Wno-unqualified-std-cast-call -Wno-non-c-typedef-for-linkage -Wno-range-loop-construct -fvisibility=hidden --sysroot=/home/build/tmp/work/armv8a-mx8mm-poky-linux/flutter-engine/1.0-r0/recipe-sysroot -Wstring-conversion -Wnewline-eof -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility-inlines-hidden -std=c++17 -fno-rtti -nostdinc++ -nostdinc++ -fvisibility=hidden -fno-exceptions -Wno-c++98-compat-extra-semi -Wno-deprecated-copy -Wno-implicit-fallthrough -Wno-nullability-completeness -Wno-suggest-destructor-override -Wno-suggest-override -Wno-unused-private-field -Wno-unused-variable   -c ../../flutter/flutter_vma/flutter_vma.cc -o obj/flutter/flutter_vma/flutter_vma.flutter_vma.o
| In file included from ../../flutter/flutter_vma/flutter_vma.cc:34:
| In file included from ../../flutter/flutter_vma/flutter_vma.h:7:
| In file included from ../../third_party/vulkan_memory_allocator/include/vk_mem_alloc.h:130:
| ../../third_party/vulkan-deps/vulkan-headers/src/include/vulkan/vulkan.h:52:10: fatal error: 'xcb/xcb.h' file not found
| #include <xcb/xcb.h>

am i doing something wrong ? Maybe i need to add someting on GN_ARGS to disable x11 ? My platform is wayland / weston so i will use flutter-wayland-client recipe

HidenoriMatsubayashi commented 1 year ago

You need to add x11 to DISTRO_FEATURES. See also https://github.com/meta-flutter/meta-flutter/commit/dc90eaef0e72d7e207866e1e73906a71b7ffb027

fleroyener commented 1 year ago

Ok thanks, i tried to use fsl-imx-xwayland for distro and it's works for engine compilation.