Skip to content

Undefined Symbol init in libflutter_engine.so on Linux Embedded (AM62x SoC) #478

@Prithvi-raptee

Description

@Prithvi-raptee

Description

While running a Flutter app for Linux Embedded (AM62x SoC running AGL), the following error is encountered during initialization:

May 08 12:10:08 am62xx-evm env[4463]: [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol 'init': /home/root/release/lib/libflutter_engine.so: undefined symbol: init
May 08 12:10:08 am62xx-evm env[4463]: #0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:33)
May 08 12:10:08 am62xx-evm env[4463]: #1      init (package:rive_common/src/rive_text_ffi.dart:497)
May 08 12:10:08 am62xx-evm env[4463]: #2      initFont (package:rive_common/src/rive_text_ffi.dart)
May 08 12:10:08 am62xx-evm env[4463]: #3      Font.initialize (package:rive_common/rive_text.dart:463)
May 08 12:10:08 am62xx-evm env[4463]: #4      RiveFile.initialize (package:rive/src/rive_file.dart:392)
May 08 12:10:08 am62xx-evm env[4463]: #5      main (package:rapteeOS/main.dart:20)
May 08 12:10:08 am62xx-evm env[4463]: #6      _runMain.<anonymous closure> (dart:ui/hooks.dart:305)
May 08 12:10:08 am62xx-evm env[4463]: #7      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:315)
May 08 12:10:08 am62xx-evm env[4463]: #8      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:194)

Environment

  • Rive Version: 0.13.20
  • Rive Common Version: 0.4.15
  • Flutter Version: 3.29.3 (stable)
  • Dart Version: 3.7.2
  • Target OS: Linux Embedded (AM62x SoC running AGL)
  • Build Tool: flutterpi_tool build --arch=arm64 --release

Steps to Reproduce

I built the app using flutterpi_tool with the following command:

flutterpi_tool build --arch=arm64 --release

After that, I checked the build folder for any native assets but didn't find anything unusual. I moved everything into a release folder and used SCP to transfer the files to my embedded device.
When I run the app on the embedded device, it fails to render and throws an error related to the undefined symbol init in libflutter_engine.so.

Expected Behavior

The app should run successfully on the embedded device, similar to how it runs on Windows.

Actual Behavior

The app fails during initialization with an undefined symbol error in libflutter_engine.so.

Attempts to Resolve

  • Tried calling and not calling unawaited(RiveFile.initialize());—the issue persists regardless.
  • The code runs perfectly well on my Windows machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions