[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GNOME 1 ABI involving libpng



>> Akira TAGOH <tagoh@debian.org> writes:

 > For this issue, I don't remember why I added those packages to
 > Depends(perhaps from discussion with Marcelo?)

 yes.

 > I think adding libpng3-dev to Build-Depends in the
 > applications/libraries which actually needs it is enough.  so we may
 > remove libpng3-dev from libgtk2.0-dev's Depends.

 if you remove that dependency, it will be possible to build an
 application that links against libpng2 and libgtk2.0-0.  Without
 further changes in libgtk2.0-0 that's not desireable because the
 application won't be able to use PNG files.

 We seem to agree that the best solution in this particular case is to
 modify the loading of libraries without using RTLD_GLOBAL.  The problem
 with that is that dlopen is abstacted by glib, and the interface
 doesn't allow for specifying this option.  There's a chance that
 modifying that behaviour might break something.  The chance is
 microscopic because the API documentation doesn't specify that opening
 a module will import the module's symbols into the program's space.
 Any application relying on that is relying on undocumented behaviour.
 Even more, g_module_open might or might not do this depending on the
 architecture, so it's not only undocumented but also undefined
 behaviour.

 With that in mind I'd say a) modify glib to NOT use RTLD_GLOBAL; b)
 remove the dependency from libgtk2.0-dev; c) be happy.  In that order.

 And before someone cries that is making us incompatible with the world,
 it's not.  Read what I wrote about undocumented and undefined
 behaviour.  Relevant portion of the source (gmodule/gmodule-dl.c):

/* some systems (OSF1 V5.0) have broken RTLD_GLOBAL linkage */
#ifdef G_MODULE_BROKEN_RTLD_GLOBAL
#undef  RTLD_GLOBAL
#endif /* G_MODULE_BROKEN_RTLD_GLOBAL */
#ifndef RTLD_GLOBAL
#define RTLD_GLOBAL     0
#endif  /* RTLD_GLOBAL */

-- 
Marcelo             | Item 32: Postpone variable definitions as long as
mmagallo@debian.org | possible
                    |         -- Scott Meyers, Effective C++



Reply to: