Skip to content

Cannot open dynamic library #83

Closed
Closed

Description

@hw762

I am using 3.3.4 Mono version, and it seems like the plugin cannot initialize:

ERROR: open_dynamic_library: Can't open dynamic library: /home/prototype/Workspace-MISC/Projects/Games/bile-badger/addons/godot-git-plugin/x11/release/libgitapi.so. Error: /home/prototype/Workspace-MISC/Projects/Games/bile-badger/addons/godot-git-plugin/x11/release/libgitapi.so: undefined symbol: pcre_free
   At: drivers/unix/os_unix.cpp:415.
Mono: Log file is: '/home/prototype/.local/share/godot/mono/mono_logs/2021-10-03_10.56.04_496662.log'
ERROR: open_dynamic_library: Can't open dynamic library: /home/prototype/Workspace-MISC/Projects/Games/bile-badger/addons/godot-git-plugin/x11/release/libgitapi.so. Error: /home/prototype/Workspace-MISC/Projects/Games/bile-badger/addons/godot-git-plugin/x11/release/libgitapi.so: undefined symbol: pcre_free
   At: drivers/unix/os_unix.cpp:415.
ERROR: get_symbol: No valid library handle, can't get symbol from GDNative object
   At: modules/gdnative/gdnative.cpp:502.
ERROR: init_library: No nativescript_init in "res://addons/godot-git-plugin/x11/release/libgitapi.so" found
   At: modules/gdnative/nativescript/nativescript.cpp:1482.

Activity

  1. hw762 commented on Oct 3, 2021

    @hw762
    Author

    Seems like a regression #11, but for the Mono version

  2. twaritwaikar commented on Oct 3, 2021

    @twaritwaikar
    Contributor

    @hw762 Thanks for reporting, the plugin should be including the PCRE library by default.

    As a workaround till the next release, could you try running sudo apt-get install libpcre3 and then initializing the plugin again?

  3. eumario commented on Oct 5, 2021

    @eumario

    I can also confirm, that this bug appears on Windows 11 as well, when trying to install the Godot Git Plugin into a project, using Godot Editor 3.3.4 Stable.

     Can't open dynamic library: C:/Users/eumar/Projects/Godot/godot-manager/addons/godot-git-plugin/win64/release/libgitapi.dll, error: Error 126: The specified module could not be found.
    .
     modules/gdnative/gdnative.cpp:502 - No valid library handle, can't get symbol from GDNative object
     modules/gdnative/nativescript/nativescript.cpp:1482 - No nativescript_init in "res://addons/godot-git-plugin/win64/release/libgitapi.dll" found
    
  4. twaritwaikar commented on Oct 11, 2021

    @twaritwaikar
    Contributor

    @eumario Do you also see any other errors above the error message you posted? The "Can't open dynamic library" is a generic Windows error and the real error is usually in front of it or around it in the logs.

  5. eumario commented on Oct 12, 2021

    @eumario

    @ChronicallySerious I dunno why, but this is properly working once again. Before, I was getting an error about Not the correct Architecture for the Addon even though I was on 64 Bit, and the Editor was compiled for 64 bit. But now, it's working perfectly fine, amongst the 8 versions of Godot I have to test it on. It is weird that it wasn't working before, but now it is.

  6. twaritwaikar commented on Oct 12, 2021

    @twaritwaikar
    Contributor

    @eumario I see, this is the second time I am hearing about someone getting it to work on a system restart, which is fortunate but not expected. It might be that Windows could have cached the DLL internally and the cache only got flushed when the system restarted (I assume you are on Windows).

    However, OP is likely seeing a different error which is due to the pcre library not being installed on the system. libgit2, the library we are using to run Git commands, comes with an option that stops it from loading pcre from the system and instead use a bundled version of the pcre library. This option was not enabled in some of the recent commits.

  7. PixsaOJ commented on Oct 23, 2021

    @PixsaOJ
     Can't open dynamic library: /home/pixsa/Documents/Godot/AnotherTutorial/addons/godot-git-plugin/x11/release/libgitapi.so. Error: /home/pixsa/Documents/Godot/AnotherTutorial/addons/godot-git-plugin/x11/release/libgitapi.so: undefined symbol: pcre_free
     modules/gdnative/gdnative.cpp:502 - No valid library handle, can't get symbol from GDNative object
     modules/gdnative/nativescript/nativescript.cpp:1482 - No nativescript_init in "res://addons/godot-git-plugin/x11/release/libgitapi.so" found
    
    libpcre3 is already the newest version (2:8.39-13build3).
    
  8. twaritwaikar commented on Oct 23, 2021

    @twaritwaikar
    Contributor

    @PixsaOJ Could you please send us the output of when you run ldd /path/to/libgitapi.so?

  9. PixsaOJ commented on Oct 23, 2021

    @PixsaOJ

    @ChronicallySerious

    ➜  release ldd libgitapi.so 
    	linux-vdso.so.1 (0x00007ffeed9fb000)
    	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb5e907a000)
    	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb5e8f2c000)
    	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb5e8f11000)
    	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb5e8d25000)
    	/lib64/ld-linux-x86-64.so.2 (0x00007fb5e976c000)
    
  10. PixsaOJ commented on Oct 23, 2021

    @PixsaOJ

    Also, I noticed you have 2 branches. One says it's tested on 3.2.x, but there is only one download on the releases page.

  11. PixsaOJ commented on Oct 23, 2021

    @PixsaOJ

    Version 1.2.1 x11 just worked. I don't like that folder structure on main folder, but I guess that worked.

  12. twaritwaikar commented on Oct 23, 2021

    @twaritwaikar
    Contributor

    Yes this issue has been identified as a regression after the v1.2.1 release only for linux, so downgrading shall help if v1.2.2 not working for you.

    The other branches are currently work in progress, however there way be a change in Godot 3.5 if the new VCS API is merged in.

    You can expect master to track Godot 3.x for now. We will have to rework the plugin for Godot 4.0 so later we will add a notice for that and change the branches accordingly.

  13. PixsaOJ commented on Oct 23, 2021

    @PixsaOJ

    Okay, so you know what's the problem and will be fixed overtime?

  14. twaritwaikar commented on Oct 23, 2021

    @twaritwaikar
    Contributor

    Yes that's the idea. The plugin is expecting the user system to have a particular PCRE library on Linux and if the user's system doesn't have that in the place where the plugin is looking for, they see this error.

    We will likely fix it by bundling in that library with the Linux build. A fix is ready however for v2, we will backport it to v1.x soon.

  15. Calinou commented on Oct 27, 2021

    @Calinou
    Member

    Duplicate of #82.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions