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

[Bug]: [LINUX] Failed to load dynamic library 'librealm_dart.so': librealm_dart.so: cannot open shared object file: No such file or directory #1017

Closed
c0c4i opened this issue Nov 7, 2022 · 7 comments · Fixed by #1143
Labels
More-information-needed More information is needed to progress. The issue will close automatically in 2 weeks. O-Community Waiting-For-Reporter Waiting for more information from the reporter before we can proceed

Comments

@c0c4i
Copy link

c0c4i commented Nov 7, 2022

What happened?

Hello, I'm using realm 0.7.0+rc on linux arm64 for Flutter.
In this initial code

var config = Configuration.local(
      [
        RealmBoard.schema,
        // other schema
      ],
      schemaVersion: 12,
    );
    realm = Realm(config);

I have this exception

"Failed to load dynamic library 'librealm_dart.so': librealm_dart.so: cannot open shared object file: No such file or directory"

I don't know what to do.
Thank you for help.

Repro steps

  1. Run the app
  2. Crash on line realm = Realm(config);

Version

Flutter 3.5.0-12.0.pre.145 • channel master • https://github.com/flutter/flutter.git Framework • revision a1289a4135 (5 hours ago) • 2022-11-07 06:46:25 0500 Engine • revision 891d4a3577 Tools • Dart 2.19.0 (build 2.19.0374.0.dev) • DevTools 2.19.0

What Realm SDK flavor are you using?

Local Database only

What type of application is this?

Flutter Application

Client OS and version

Linux Ubuntu 20.04 LTS

Code snippets

var config = Configuration.local(
      [
        RealmBoard.schema,
        // other schema
      ],
      schemaVersion: 12,
    );
    realm = Realm(config);

Stacktrace of the exception/crash you're getting

#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:43)
#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:22:12)
#2      _open (package:realm/src/init.dart:84:52)
#3      _openRealmLib.<anonymous closure> (package:realm/src/init.dart:70:11)
#4      _openRealmLib (package:realm/src/init.dart:76:18)
#5      initRealm (package:realm/src/init.dart:105:24)
#6      new _RealmCore._ (package:realm/src/native/realm_core.dart:72:17)
#7      new _RealmCore (package:realm/src/native/realm_core.dart:81:37)
#8      realmCore (package:realm/src/native/realm_core.dart:51:30)
#9      realmCore (package:realm/src/native/realm_core.dart)
#10     Realm._openRealm (package:realm/src/realm_class.dart:180:12)
#11     new Realm._ (package:realm/src/realm_class.dart:135:98)
#12     new Realm (package:realm/src/realm_class.dart:133:38)
#13     ControlRepository.initControl (package:control_repository/src/control_repository.dart:69:13)

Relevant log output

No response

@c0c4i c0c4i changed the title [Bug]: [LINUX] [ARM64] Failed to load dynamic library 'librealm_dart.so': librealm_dart.so: cannot open shared object file: No such file or directory [Bug]: [LINUX] Failed to load dynamic library 'librealm_dart.so': librealm_dart.so: cannot open shared object file: No such file or directory Nov 7, 2022
@desistefanova
Copy link
Contributor

desistefanova commented Nov 8, 2022

Hi @c0c4i,
thank you for your interest of Realm!
Unfortunately we don't support arm64 architecture for linux. We have some limitations that prevent us to build the core realm module for arm64.
I hope you can try with another device.

@c0c4i
Copy link
Author

c0c4i commented Nov 8, 2022

Hi, I also tried this on AMD64 running documentation example but doesn’t work so I think this problem it’s not ralated to architecture.

@desistefanova
Copy link
Contributor

It looks like the realm library is not installed.
If you are running a dart project you should use realm_dart package and to run dart run realm_dart install command.
But for Flutter projects the package name is realm and the library is installed automatically when you run the app.
Can you share your repository or the project?

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Nov 11, 2022
@nirinchev nirinchev added the More-information-needed More information is needed to progress. The issue will close automatically in 2 weeks. label Nov 30, 2022
@github-actions
Copy link
Contributor

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@NotZoeyDev
Copy link

I'm having the same issue trying to use realm_dart, it works perfectly fine on my Windows machine but it fails to load the native library when loaded onto my Linux VPS.

I've ran dart run realm_dart install and I can confirm that the file is there, it just doesn't try to load it from that path it seems, any clue what could be causing this?

@desistefanova desistefanova reopened this Feb 6, 2023
@desistefanova
Copy link
Contributor

Hi @NotZoeyDev,
Thanks for the report.
We managed to reproduce this issue on Linux environment.
We will investigate it.
You can follow #1141

desistefanova added a commit that referenced this issue Feb 7, 2023
Downgrade Ubuntu build OS and add tests on ubuntu 20.04 and 22.04
- Fixes #1141 
- Fixes #1017
@maurovanetti
Copy link

Thank you.
The solution doesn't work for me but could you please elaborate more on why this commit was expected to fix it?
What's the underlying problem?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
More-information-needed More information is needed to progress. The issue will close automatically in 2 weeks. O-Community Waiting-For-Reporter Waiting for more information from the reporter before we can proceed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants