Coder Social home page Coder Social logo

ashlar-code's Introduction

Hi there ๐Ÿ‘‹

ashlar-code's People

Contributors

icedman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ashlar-code's Issues

rpath for libeditor_api.so not set correctly on Linux

Thanks for writing your editor from scratch article and for making and releasing this editor.
I tried out the Linux release currently available (v0.1.0) but when attempting to run it from the bundle dir, as in: ./AshlarCode I get:

flutter: Editor
flutter: linux
flutter: Linux 5.13.0-35-generic #40-Ubuntu SMP Mon Mar 7 08:03:10 UTC 2022
flutter: 2.15.0 (stable) (Fri Dec 3 14:23:23 2021 +0100) on "linux_x64"
flutter: []
flutter: /home/maks/apps/Ashlar/bundle/AshlarCode
flutter: linux
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library './libeditor_api.so': libonigmolib.so: cannot open shared object file: No such file or directory
#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:12)
#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:23)
#2      nativeEditorApiLib (package:editor/native.dart:195)
#3      _git_init (package:editor/native.dart)
#4      git_init (package:editor/native.dart)
#5      main (package:editor/main.dart)
<asynchronous suspension>

so at a guess I think that libeditor_api is trying to dynamically link to libonigmolib but something is going wrong there even though that lib is in the same directory.

Then I noticed:

ldd libeditor_api.so 
	linux-vdso.so.1 (0x00007fff8673c000)
	libonigmolib.so => not found
	libgit2.so.28 => not found
	libssh2.so.1 => /lib/x86_64-linux-gnu/libssh2.so.1 (0x00007f91aee72000)
	libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f91aedda000)
	libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f91aeaff000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f91ae8e4000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f91ae800000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f91ae7e6000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f91ae5be000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f91ae5a2000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f91aefd5000)

so adding export LD_LIBRARY_PATH=. fixes the issue with linker finding libonigmolib, so you might want to pass r path when you are building libeditor_api to avoid this as the ld will not normally look in the cwd for libs.

But of course you are not shipping the version of libgit2 you linked to in your bundle and attempting to use the libgit2 I had installed just seg faults the app.

Since the app is closed source, I stopped debugging at this point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.