Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing headers to the audio-players and keyboard-manager plugin #133

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aduskett
Copy link

@aduskett aduskett commented Jan 6, 2024

Fixes flutter::StandardMethodCodec not being declared on the following lines: plugins/audio_players/audio_players_registry.cc:83 plugins/audio_players/audio_players_registry.cc:94 plugins/audio_players/audio_players_registry.cc:152 plugins/audio_players/audio_player.cc:257
plugins/audio_players/audio_player.cc:623
plugins/keyboard_manager/keyboard_manager.cc:25

arnout pushed a commit to buildroot/buildroot that referenced this pull request Jan 10, 2024
Much like flutter-pi, this package is a Flutter embedder used to run Flutter
applications. However, unlike Flutter-pi, this package requires a Wayland
compositor to run, which flutter-pi does not support. Furthermore, flutter-pi
lacks several plugins and features that ivi-homescreen supports, such as:
  - Dart VM console redirection
  - DLT logging
  - Accessibility
  - Compositor region
  - Compositor surface
  - Desktop Window
  - Go Router
  - Isolate
  - Keyboard Manager
  - Layer Playground
  - Mouse Cursor
  - PackageInfo
  - Platform
  - Platform Views
  - Restoration

The following plugins and options are hardcoded to off:
  - Crash handler: Requires a newer version of sentry-native.
  - File selector: Requires the zenity package.
  - Firebase-core: Requires the firebase-cpp-sdk package.
  - URL Launcher: Requires a runtime-dependency on xdg-open.
  - BUILD_TEXTURE_NAVI_RENDER_EGL: Failes to build.
  - BUILD_TEXTURE_TEST_EGL: Fails to build.
  - ENABLE_AGL_CLIENT: Used for Automitve Grade Linux (AGL).

The ENABLE_XDG_CLIENT=ON option is a requirement to run Flutter apps.
If this option is disabled, ivi-homescreen segfaults when starting an
application.

Finally, there is a need for a patch that fixes the audio-players plugin:
If the audio-players plugin is the only plugin selected, several compilation
errors occure because of undeclared definitions, as the standard_method_codec.h
header file is missing.

Upstream-status: toyota-connected/ivi-homescreen#133

This package has been tested on a x86_64 host with an AMD Ryzen 9 6900HS
with Docker 24.0.5:
  - The following distributions:
    - Fedora 39: Host system
    - Ubuntu 22.04: Docker
    - Debian 11: Docker

  - The following targets:
    - BR2_aarch64
    - BR2_arm
    - BR2_x86_64

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
[yann.morin.1998@free.fr:
  - propagate BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_ARCH_SUPPORTS to comments
  - drop NPTL, implied by glibc
  - reorder dependencies in a more logical way
  - reorder comments
  - drop undefined BR2_PACKAGE_IVI_HOMESCREEN_HAS_CLIENT
  - grammar ("for to change")
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
@jwinarske
Copy link
Contributor

@aduskett Hi Adam,
What toolchain and version are you building with?

@aduskett
Copy link
Author

aduskett commented Jan 11, 2024

@aduskett Hi Adam, What toolchain and version are you building with?

Oh man, I should have included that information in the original post. Sorry about that!

Build setup:

The version of ivi-homescreen: 5ab78a1

Below are instructions on how to reproduce the error:
git clone https://gitlab.com/buildroot.org/buildroot.git && cd buildroot

cat << EOF > configs/ivitest_defconfig
BR2_x86_64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_GLIBC_STABLE=y
BR2_CCACHE=y
BR2_INIT_SYSTEMD=y
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
BR2_GENERATE_LOCALE="en_US.UTF-8"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/pc/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/pc/post-image-efi.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.24"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
BR2_PACKAGE_FOOT=y
BR2_PACKAGE_IVI_HOMESCREEN=y
BR2_PACKAGE_IVI_HOMESCREEN_AUDIO_PLAYERS=y
BR2_PACKAGE_IVI_HOMESCREEN_KEYBOARD_MANAGER_PLUGIN=y
BR2_PACKAGE_SWAY=y
BR2_PACKAGE_SWAY_SWAYBAR=y
BR2_PACKAGE_SWAY_SWAYBAR_TRAY=y
BR2_PACKAGE_SWAY_SWAYNAG=y
BR2_PACKAGE_FLUTTER_GALLERY=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
BR2_PACKAGE_MESA3D_OSMESA_GALLIUM=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_ACPID=y
BR2_PACKAGE_FLUTTER_ENGINE=y
BR2_PACKAGE_CONNMAN=y
BR2_PACKAGE_CONNMAN_WIFI=y
BR2_PACKAGE_CONNMAN_CLIENT=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_X86_64_EFI=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
EOF

make ivitest_defconfig
rm package/ivi-homescreen/0001-add-missing-headers-to-the-audio-players-plugin.patch
make source && make ivi-homescreen-depends && make ivi-homescreen

Notes:

  • rm package/ivi-homescreen/0001-add-missing-headers-to-the-audio-players-plugin.patch removes the patch that this pull request is for.
  • make source pre-downloads the source code and generates tarballs for all the selected packages.
  • make ivi-homescreen-depends will build only the necessary dependencies for ivi-homescreen
  • make ivi-homescreen builds only the ivi-homescreen package.
  • If you wish to look at the configuration further, you can run make menuconfig and navigate to:
    • Target packages -> Graphic libraries and applications (graphic/text) -> ivi-homescreen
  • make source and make ivi-homescreen-depends is going to take a while! Be patient please! :)

Buildroot also provides a docker container based on Debian 11. To use that, run: ./utils/docker-run in the buildroot directory and then proceed with the above instructions.

In this example, the only option enabled for ivi-homescreen is the audio-players plugin.

Fixes flutter::StandardMethodCodec not being declared on the following lines:
plugins/audio_players/audio_players_registry.cc:83
plugins/audio_players/audio_players_registry.cc:94
plugins/audio_players/audio_players_registry.cc:152
plugins/audio_players/audio_player.cc:257
plugins/audio_players/audio_player.cc:623
plugins/keyboard_manager/keyboard_manager.cc:25
@aduskett aduskett changed the title add missing headers to the audio-players plugin add missing headers to the audio-players and keyboard-manager plugin Jan 12, 2024
@aduskett
Copy link
Author

I found out that the keyboard-manager plugin also has the same issue, so I rebased and fixed that as well!

@aduskett
Copy link
Author

Oh, I changed the patch name to package/ivi-homescreen/0001-add-missing-headers-to-the-audio-players-and-keyboar.patch in Buildroot, as the keyboard_manager plugin also has a missing flutter/standard_method_codec.h header!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants