Skip to content

Failed to load dynamic library librive_native_plugin.so on yocto linux #567

@bitshifter1

Description

@bitshifter1

Description

I am trying to run a flutter rive application on my scarthgap yocto embedded linux stm board and I am getting the following runtime error. Where is the librive_native_plugin.so coming from? Thanks a lot in advance!!

bla@test:~# flutter-pi --profile /usr/share/flutter/test/rive-demo/3.32.5/release/
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'librive_native_plugin.so': liby#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11)
#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:22)
#2      DynamicLibraryHelper.open (package:rive_native/src/ffi/dynamic_library_helper.dart:63)
#3      DynamicLibraryHelper.nativeLib (package:rive_native/src/ffi/dynamic_library_helper.dart:9)
#4      nativeLib (package:rive_native/src/rive_native_ffi.dart)
#5      init (package:rive_native/src/ffi/rive_text_ffi.dart)
#6      initFont (package:rive_native/src/ffi/rive_text_ffi.dart)
#7      Font.initialize (package:rive_native/rive_text.dart:490)
#8      RiveNative.init (package:rive_native/rive_native.dart:201)
<asynchronous suspension>
#9      main (package:example/main.dart:12)
<asynchronous suspension>

This is my pubspec.yaml

name: example
description: "A new Flutter project."
publish_to: "none" # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
  sdk: ^3.5.0

dependencies:
  flutter:
    sdk: flutter
  rive: ^0.14.0-dev.12
  rive_native: ^0.0.15

  cupertino_icons: ^1.0.8
  http: ^1.3.0

dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_lints: ^5.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

flutter:
  uses-material-design: true

  assets:
    - assets/water_bar_demo.riv

Device & Versions (please complete the following information)

- Device: stm32mp1
- OS: yocto linux with meta-flutter (scarthgap)
- Flutter Version: flutter-pi, or flutter-wayland-client (scarthgap)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions