Libraries that use glib sometimes need to use glib's link flags --- what's the best way to achieve this?
Hello everyone,
I'm one of the libvips maintainers, and I have a question and suggestion regarding gobject and web servers.
gobject links with nodelete
on linux hosts to prevent unloading and reinitializing. If gobject unloads and reloads, types can become confused, since type unloading is not really supported (I hope I have this right).
This means that any downstream library which uses gobject must also link with nodelete
, or types will double init on reload.
I can't see a way for a library that builds on gobject to know if it has been linked with nodelete
. Does gobject have a way to pass this information on, or should downstream libraries implement their own logic?
Perhaps gobject could add something to gobject-2.0.pc? Maybe a variable with these extra link flags?
This PR adds nodelete to php-vips and has some discussion of the issue:
https://github.com/libvips/php-vips-ext/pull/44
This comment tries to explain why crashes happen on load and unload:
https://github.com/libvips/php-vips/issues/26#issuecomment-268778392