Skip to content

Flutter Linux deployments broken because of missing library #504

@HankG

Description

@HankG

I'm experimenting with doing manual deployments of an app on many platforms including Linux. On the Linux platform the app won't start because it can't find the libobjectbox.so library. Looking at the executable with ldd it looks like the link is being set to a link one directly up from the bundle directory to build/linux/x64/release/_deps/... rather than within the build/linux/x64/release/bundle/libs folder. Ironically the file libobjectbox_flutter_libs_plugin.so is in that proper location so it is only the base library that causes the problem.

Basic info (please complete the following information):

  • ObjectBox version: 1.7.1
  • Flutter/Dart SDK: Flutter 3.3.10 with Dart 2.18.6
  • Null-safety enabled: yes
  • Reproducibility: always
  • OS: Linux Mint 21 Cinnamon and Ubuntu 22 Budgie
  • Device/Emulator: Linux desktop

Steps to reproduce

  1. Create a flutter project with the library
  2. Build the project on a Linux machine with the command flutter build linux --release
  3. Copy the corresponding build bundle directory to a non-build machine
  4. Attempt to run the executable

Expected behavior

The program runs without the need for manually copying libraries, setting LD_LIBRARY_PATH etc.

  • Did you find any workarounds to prevent the issue?
    This problem can be resolved in the short term by manually adding this to the lib folder and then executing LD_LIBRARY_PATH to explicitly include that folder on the deployed system.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions