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

Cannot open dynamic library #83

Closed
hw762 opened this issue Oct 3, 2021 · 15 comments
Closed

Cannot open dynamic library #83

hw762 opened this issue Oct 3, 2021 · 15 comments

Comments

@hw762
Copy link

hw762 commented Oct 3, 2021

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.
@Calinou Calinou added the bug label Oct 3, 2021
@hw762
Copy link
Author

hw762 commented Oct 3, 2021

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

@twaritwaikar
Copy link
Contributor

twaritwaikar commented Oct 3, 2021

@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?

@eumario
Copy link

eumario commented Oct 5, 2021

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

@twaritwaikar
Copy link
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.

@eumario
Copy link

eumario commented Oct 12, 2021

@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.

@twaritwaikar
Copy link
Contributor

twaritwaikar commented Oct 12, 2021

@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.

@PixsaOJ
Copy link

PixsaOJ commented Oct 23, 2021

 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).

@twaritwaikar
Copy link
Contributor

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

@PixsaOJ
Copy link

PixsaOJ commented Oct 23, 2021

@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)

@PixsaOJ
Copy link

PixsaOJ commented Oct 23, 2021

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.

@PixsaOJ
Copy link

PixsaOJ commented Oct 23, 2021

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

@twaritwaikar
Copy link
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.

@PixsaOJ
Copy link

PixsaOJ commented Oct 23, 2021

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

@twaritwaikar
Copy link
Contributor

twaritwaikar commented Oct 23, 2021

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.

@Calinou
Copy link
Member

Calinou commented Oct 27, 2021

Duplicate of #82.

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

No branches or pull requests

5 participants