Bug 29319 - Modules are built as versioned shared objects
Summary: Modules are built as versioned shared objects
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.16
Hardware: Other All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-30 05:55 UTC by Dominique Leuenberger
Modified: 2016-09-07 09:41 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch removing version information from modules (1.09 KB, patch)
2010-07-30 05:55 UTC, Dominique Leuenberger
Details | Splinter Review
Updated patch... (1.97 KB, patch)
2012-04-29 14:39 UTC, Dominique Leuenberger
Details | Splinter Review

Description Dominique Leuenberger 2010-07-30 05:55:02 UTC
Created attachment 37459 [details] [review]
Patch removing version information from modules

The modules, installed under /usr/lib/cairo are being built as versioned shared libraries instead of modules, which does not make a lot of sense.

I suggest applying the added patch for this reason.
Comment 1 Dominique Leuenberger 2012-04-29 14:39:43 UTC
Created attachment 60780 [details] [review]
Updated patch...

Moving to 1.12.2... after all this is still there.
Comment 2 Uli Schlachter 2012-05-01 08:56:55 UTC
I'm not sure about this patch. In fact, none of these libraries ever get dlopen()'d, so why are they marked as -module?

I can see the reason for -avoid-version for cairo-trace, because the cairo-trace utility doesn't use any version. Dunno about the other libraries (how/where are they used?)
Comment 3 Dominique Leuenberger 2012-05-01 11:30:35 UTC
Cairo trace loads it's library in a 'rude' / non-version aware way like this (as you say yourself):

if test "x$CAIRO_TRACE_SO" = "x"; then
    CAIRO_TRACE_SO=""
    for lib in /usr/lib64/cairo/libcairo-trace.so /usr/lib64/cairo/libcairo-trace.so* /usr/lib64/cairo/libcairo-trace.*.so ; do
        if test -h "$lib" -o -f "$lib"; then
            CAIRO_TRACE_SO="$lib"
            break
        fi
   done
fi
LD_PRELOAD="$CAIRO_TRACE_SO

=> so whatever versioning is being used, is ignored anyway and can as well not be used ==> -avoid-version makes sense (it is not shared library after all)

For -sphinx I'm not sure if the .so ever get's used... this might actually be just a mistake in Makefile.am and the 'library' is not needed at all (It's also never referenced as a dependency)

This can be applied without build issues:
Index: cairo-1.12.2/util/cairo-sphinx/Makefile.am
===================================================================
--- cairo-1.12.2.orig/util/cairo-sphinx/Makefile.am
+++ cairo-1.12.2/util/cairo-sphinx/Makefile.am
@@ -1,6 +1,5 @@
 cairolibdir = $(libdir)/cairo
 
-cairolib_LTLIBRARIES = cairo-sphinx.la
 bin_PROGRAMS = cairo-sphinx
 
 AM_CPPFLAGS = -I$(top_srcdir)/src \
@@ -8,12 +7,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/src \
 	      -I$(top_srcdir)/boilerplate \
 	      -I$(top_srcdir)/util/cairo-script
 
-cairo_sphinx_la_SOURCES = fdr.c
-cairo_sphinx_la_CPPFLAGS = $(AM_CPPFLAGS)
-cairo_sphinx_la_CFLAGS = $(CAIRO_CFLAGS)
-cairo_sphinx_la_LDFLAGS = -module -no-undefined
-cairo_sphinx_la_LIBADD = -ldl
-
 cairo_sphinx_SOURCES = sphinx.c
 cairo_sphinx_CPPFLAGS = $(AM_CPPFLAGS) -DLIBDIR="\"$(cairolibdir)\""
 cairo_sphinx_CFLAGS = $(CAIRO_CFLAGS) $(real_pthread_CFLAGS)  $(glib_CFLAGS)

=> cairo-sphinx still runs too (well, it starts and exits.. just as before.. not sure how to test this binary)

cairo-fdr: this is apparenty lever loaded / referenced? Might well be just an old reminder that was not cleaned up?
Comment 4 Dominique Leuenberger 2012-11-06 12:33:32 UTC
ping? (openSUSE carries the patch from comment #0 since 2010 and no issues appeared ever since... )
Comment 5 Dominique Leuenberger 2013-03-26 20:50:33 UTC
Just updating the version number again... openSUSE still carries that patch...
Comment 6 Bjørn Lie 2015-12-13 22:41:53 UTC
PING!!

Patch still applies for ver 1.15.2.
Pretty please with sugar on top, could we reach a conclusion on this?

We have had this patch in openSUSE since 2010!
Comment 7 Behdad Esfahbod 2015-12-14 11:22:18 UTC
This can definitely be committed.
Comment 8 Bjørn Lie 2016-05-21 09:09:33 UTC
(In reply to Behdad Esfahbod from comment #7)
> This can definitely be committed.

Thanks for the reply Behdad. Somehow that email passed my by without me noticing.

As far as I know neither Dominique nor me have commit rights for cairo, so if you could be so kind to do it for us it would be appreciated.
Comment 9 Bjørn Lie 2016-09-02 22:42:16 UTC
Hi Upstream!

Please commit the patch, as neither of us downstream people have commit rights.
Comment 10 Bjørn Lie 2016-09-02 22:43:07 UTC
6 years in the "making" should be enough...
Comment 11 Behdad Esfahbod 2016-09-02 22:55:33 UTC
I'm sure you know, by now, that no maintainers are left.  So, keeping snark down is more productive.  In fact, that is the case even more when there are maintainers around. :)

Anyway, pushed it out.
Comment 12 Bjørn Lie 2016-09-07 09:41:08 UTC
First: Sorry Behdad! - I was frustrated and snapped. Apologies!

Second: Thanks a lot for committing it.

Third: Sad to hear that there is no maintainers left for cairo :-/ didn't know that.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.