Bug 46494 - Make wocky optional for Android
Summary: Make wocky optional for Android
Status: RESOLVED FIXED
Alias: None
Product: Ytstenut
Classification: Unclassified
Component: plugins (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: ytstenut
QA Contact:
URL:
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2012-02-22 20:03 UTC by Alvaro Soliverez
Modified: 2012-02-24 05:12 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Make wocky libs optional (1.67 KB, patch)
2012-02-22 20:03 UTC, Alvaro Soliverez
Details | Splinter Review
Option to build with shared wocky library (1.62 KB, patch)
2012-02-23 06:20 UTC, Alvaro Soliverez
Details | Splinter Review
Option to build with shared wocky library (1.62 KB, patch)
2012-02-23 10:02 UTC, Alvaro Soliverez
Details | Splinter Review

Description Alvaro Soliverez 2012-02-22 20:03:29 UTC
Created attachment 57499 [details] [review]
Make wocky libs optional

In other platforms it is not necessary to check for Wocky. Make it optional for Android, as it fails in other platforms, since wocky is built statically everywhere but in Android.

This fixes a configure error introduced in the latest Android patch
Comment 1 Olli Salli 2012-02-23 00:54:31 UTC
Submodules? There are no submodules in ytstenut-plugins. This is weird copy-pasta, which doesn't make sense in this context.

Rather, make this a --with-shared-wocky configure arg please. You can do that with the AC_ARG_WITH, default to "no" with the fourth arg.
Comment 2 Alvaro Soliverez 2012-02-23 06:20:04 UTC
Created attachment 57525 [details] [review]
Option to build with shared wocky library

Changed name after review
Comment 3 Olli Salli 2012-02-23 08:53:08 UTC
(In reply to comment #2)
> Created attachment 57525 [details] [review] [review]
> Option to build with shared wocky library
> 
> Changed name after review

Try again. Discussed in IRC why

And please test that

./configure --with-shared-wocky

AND

./configure --without-shared-wocky

both produce sensible results on Linux.
Comment 4 Alvaro Soliverez 2012-02-23 10:02:51 UTC
Created attachment 57540 [details] [review]
Option to build with shared wocky library

Fixed option name
Comment 5 Robert Staudinger 2012-02-23 12:48:14 UTC
Not to cause any more trouble, but could you not check for the existence of a shared wocky library using pkg-config, and the fall back to the static version?

On the other hand if that's only relevant to android, maybe when android is detected the static one should be used unconditionally, as to not accidentally do the wrong thing on != android.
Comment 6 Olli Salli 2012-02-23 23:30:25 UTC
(In reply to comment #5)
> Not to cause any more trouble, but could you not check for the existence of a
> shared wocky library using pkg-config, and the fall back to the static version?
> 
> On the other hand if that's only relevant to android, maybe when android is
> detected the static one should be used unconditionally, as to not accidentally
> do the wrong thing on != android.

Wocky isn't API/ABI stable at the moment. It's added in statically to Gabble/Salut and their plugin libraries for this reason. External plugins, like ytstenut plugin here, must use this same built-in wocky, even if there was some external wocky installed. It'd probably be a different one from the one Gabble/Salut is carrying. Moreover, Gabble and Salut can have different Wocky snapshots at times between each other...

In android, this kind of linking setup isn't possible however, so we have to use an external wocky - we build everything in one go, so it'll be the correct version however.

My idea is to have it like this for now; and when wocky maturizes make --with-shared-wocky the default (and in a while the only option, when the required versions of both CMs use it in a shared fashion as well).

The latest patch is OK in this light. Please merge.
Comment 7 Alvaro Soliverez 2012-02-24 05:12:10 UTC
commit b802edfe06b2bce1f591ded2a66d483928cf32d7
Author: Alvaro Soliverez <alvaro.soliverez@collabora.co.uk>
Date:   Thu Feb 23 15:00:37 2012 -0300

    Add option to build with shared Wocky library


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.