GNOME Bugzilla – Bug 786232
meson: libgdk_pixbuf_xlib exports no symbols
Last modified: 2017-08-14 11:08:14 UTC
Created attachment 357513 [details] [review] [PATCH] gdk-pixbuf-xlib: Mark public funcs _GDK_PIXBUF_EXTERN Meson builds the library with -fvisibility=hidden, but no functions have the visibility attribute to override this. The attached patch marks all public functions _GDK_PIXBUF_EXTERN in order to fix this. The private globals gdk_pixbuf_dpy and gdk_pixbuf_screen stay hidden, even though the autotools build exported them.
Review of attachment 357513 [details] [review]: If we don't want to modify this old header, the alternative approach is to use a map file, and tell Meson to export the symbols specified from there. Adding _GDK_PIXBUF_EXTERN is pretty much the same, so I don't have a strong opinion.
Pushed to master
*** Bug 786270 has been marked as a duplicate of this bug. ***
Not to pick holes but your new patch is inconsistent with the headers elsewhere in the project, i.e. GDK_PIXBUF_AVAILABLE_IN_ALL
GDK_PIXBUF_AVAILABLE_IN_ALL is just a (readable) alias for _GDK_PIXBUF_EXTERN. To be fair, gdk-pixbuf-xlib is such a niche, legacy library that I don't particularly care about its consistency and style.
Nor I - I was more concerned about restoring ABI compatibility tbqh :P
Oh btw heads up while we're talking about meson changes, haven't had time to investigate it but long story short, the `tiff` module is no longer present/installed with autotools, which is why I switched the package over to meson today .. Updating only from 2.36.7 so its a fairly small regression window luckily.
The reason I used the "private" _GDK_PIXBUF_EXTERN is that I didn't bother checking when the functions were introduced, so I didn't want to make any assertions as to their availability.