After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658002 - defective typelib
defective typelib
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: libfolks
git master
Other Linux
: Normal normal
: folks-0.6.4
Assigned To: folks-maint
folks-maint
: 659064 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-09-01 19:35 UTC by Matthias Clasen
Modified: 2011-09-21 17:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.52 KB, patch)
2011-09-14 16:01 UTC, Raul Gutierrez Segales
rejected Details | Review
Use libtool's dlname for libfolks (1.15 KB, patch)
2011-09-14 17:37 UTC, Philip Withnall
committed Details | Review
build: Fix regular expression to extract dlname (973 bytes, patch)
2011-09-21 16:17 UTC, Colin Walters
accepted-commit_now Details | Review

Description Matthias Clasen 2011-09-01 19:35:22 UTC
The Makefile hardcodes libfolks.so as the library name in the typelib.
That is broken, since distributions normally keep the .so in the -devel package, and only install .so.<xyz> in the base package.

The outcome of this is that contacts search in gnome-shell does not work, unless you have the folks-devel package installed.

I don't understand how the vala / introspection Makefile machinery works, so no patch :-(
Comment 1 Philip Withnall 2011-09-01 20:02:00 UTC
This is because we pass “-l libfolks.so” in INTROSPECTION_COMPILER_ARGS, which we need to work around bug #585116/bug #642576.

I don't suppose it's portable to hard-code it as “-l libfolks.so.<xyz>” instead?
Comment 2 Matthias Clasen 2011-09-04 16:18:37 UTC
You'd have to derive xyz from the libtool version numbers. or maybe it can be extracted out of the .la file, not sure.
Comment 3 Travis Reitter 2011-09-05 16:49:38 UTC
(Punting bugs to 0.6.4)
Comment 4 Raul Gutierrez Segales 2011-09-14 16:01:25 UTC
Created attachment 196519 [details] [review]
patch

Here goes a horrible hack, but I think something along this lines is the best we can do for 3.2. Afterwards lets push the mentioned Vala bugs.
Comment 5 Philip Withnall 2011-09-14 16:21:19 UTC
*** Bug 659064 has been marked as a duplicate of this bug. ***
Comment 6 Philip Withnall 2011-09-14 16:52:03 UTC
Review of attachment 196519 [details] [review]:

After talking to ebassi and looking at how g-ir-scanner does things, I think this is the wrong approach as well. g-ir-scanner extracts the dlname variable from the .la file, which seems more robust than calculating it ourselves.
Comment 7 Philip Withnall 2011-09-14 17:37:04 UTC
Created attachment 196527 [details] [review]
Use libtool's dlname for libfolks

https://www.gitorious.org/folks/folks/commits/658002-dlname

How about this? (Untested against anything which uses introspection, but it successfully puts “libfolks.so.25” into the .typelib.)
Comment 8 Cosimo Cecchi 2011-09-14 17:39:46 UTC
Looks good to me, but I cannot really test this at the moment.
Comment 9 Philip Withnall 2011-09-14 18:50:11 UTC
Comment on attachment 196527 [details] [review]
Use libtool's dlname for libfolks

Pushed (with an addition to NEWS), thanks.

commit 554d96c18d4309b5e8169c68b8bb747502161a8e
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Wed Sep 14 18:34:57 2011 +0100

    Bug 658002 — defective typelib
    
    Pass the libtool dlname for libfolks.so to g-ir-compiler rather than
    libfolks.la.
    
    Closes: bgo#658002

 NEWS              |    1 +
 folks/Makefile.am |    7 ++++++-
 2 files changed, 7 insertions(+), 1 deletions(-)
Comment 10 Raul Gutierrez Segales 2011-09-21 15:53:45 UTC
ioni on #empathy reported a problem with the typelib that seems related to the patch proposed in this report.
Comment 11 Ionut Biru 2011-09-21 15:54:36 UTC
maybe not related to this patch but i've seen this

<namespace name="Folks" version="0.6" shared-library="--includedir=." c:prefix="GOBJ
Comment 12 Jan Alexander Steffens (heftig) 2011-09-21 16:09:30 UTC
The sed command fails with LANG=C due to the invalid range '.-+'.
Comment 13 Colin Walters 2011-09-21 16:17:39 UTC
Created attachment 197169 [details] [review]
build: Fix regular expression to extract dlname

The regex writer unintentially made a character range in ".-+".
This was always wrong, but it actively fails when LANG=C.
Comment 14 Philip Withnall 2011-09-21 16:34:10 UTC
Review of attachment 197169 [details] [review]:

Ship it!
Comment 15 Travis Reitter 2011-09-21 17:37:32 UTC
Thanks, merged!

commit c5e2ce8c784018e5516e8578d1eb6c6bd086480b
Author: Colin Walters <walters@verbum.org>
Date:   Wed Sep 21 12:13:31 2011 -0400

    build: Fix regular expression to extract dlname
    
    The regex writer unintentially made a character range in ".-+".
    This was always wrong, but it actively fails when LANG=C.
    
    Closes: bgo#658002 - defective typelib

 NEWS              |    1 +
 folks/Makefile.am |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)