-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
On Linux, favor local symbols when loading a shared library #82973
On Linux, favor local symbols when loading a shared library #82973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's likely won't build on macOS and BSDs, the function is overridden on macOS but generic Unix code is still built.
Ah, ok, so should I override it in |
Or, actually, I wonder if this problem also affects GDExtensions on MacOS and *BSD? If so, then perhaps the other solution discussed on the issue (building with |
I would probably add something like: #ifndef RTLD_DEEPBIND
#define RTLD_DEEPBIND 0
#endif |
dd37bda
to
7f4e700
Compare
The OP on issue #82812 confirmed that this fixed their problem as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't reproduce the issue on macOS.
As far as I can tell, adding RTLD_DEEPBIND
seems fine.
Thanks! |
Fixes #82812
Myself and the reporter of that issue, are seeing a strange situation where a GDExtension will use a class defined by the engine with the same name, rather than the class defined in the GDExtension.
Passing
RTLD_DEEPBIND
todlopen()
when loading the GDExtension seems to fix it in my testing!About
RTLD_DEEPBIND
, the man page says:I'm definitely not an expert on platform-level stuff, so I don't know if this flag has any limitations or caveats associated with it.
Downloading pre-compiled binaries: