Bug 42509 - Support for building on Android
Summary: Support for building on Android
Status: RESOLVED FIXED
Alias: None
Product: Wocky
Classification: Unclassified
Component: General (show other bugs)
Version: git master
Hardware: Other other
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-11-02 05:17 UTC by Alvaro Soliverez
Modified: 2011-11-22 09:38 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to build on Android (2.40 KB, patch)
2011-11-02 05:17 UTC, Alvaro Soliverez
Details | Splinter Review
Support for Android patch (2.42 KB, patch)
2011-11-11 10:15 UTC, Alvaro Soliverez
Details | Splinter Review

Description Alvaro Soliverez 2011-11-02 05:17:40 UTC
Created attachment 53046 [details] [review]
Patch to build on Android

This patch enables building wocky on Android using Android NDK and androgenizer.

It adds new files needed by Android, and an additional target to Makefile that is used by androgenizer to generate the required Android makefiles
Comment 1 Will Thompson 2011-11-10 07:22:26 UTC
Comment on attachment 53046 [details] [review]
Patch to build on Android

Review of attachment 53046 [details] [review]:
-----------------------------------------------------------------

::: wocky/Makefile.am
@@ +244,5 @@
> +	 -:SOURCES $(handwritten_sources) $(built_sources) \
> +	 -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFLAGS) \
> +	 -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) \
> +	  -I$(abs_top_srcdir)/../libgcrypt/src \
> +	  -I$(abs_top_srcdir)/../libgpg-error/src \

Hrm, it depends on you happening to have libgcrypt's headers in some directory relative to this source directory?!
Comment 2 Alvaro Soliverez 2011-11-11 06:13:58 UTC
(In reply to comment #1)
> Comment on attachment 53046 [details] [review] [review]
> Patch to build on Android
> 
> Review of attachment 53046 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: wocky/Makefile.am
> @@ +244,5 @@
> > +	 -:SOURCES $(handwritten_sources) $(built_sources) \
> > +	 -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFLAGS) \
> > +	 -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) \
> > +	  -I$(abs_top_srcdir)/../libgcrypt/src \
> > +	  -I$(abs_top_srcdir)/../libgpg-error/src \
> 
> Hrm, it depends on you happening to have libgcrypt's headers in some directory
> relative to this source directory?!

Yes, that's bad. Trying to fix it now.

Is it possible that there's a problem in the original build files? I don't see a dependency to libgcrypt, but the code won't build without it.
Comment 3 Alvaro Soliverez 2011-11-11 10:15:39 UTC
Created attachment 53417 [details] [review]
Support for Android patch

I fixed the hardcoded paths
Comment 4 Will Thompson 2011-11-14 04:54:33 UTC
(In reply to comment #2)
> Is it possible that there's a problem in the original build files? I don't see
> a dependency to libgcrypt, but the code won't build without it.

Possibly. Presumably it comes from:

  ./wocky/wocky-tls.c:#include <gcrypt.h>

GnuTLS depends on gcrypt, so Wocky does transitively depend on it when built against GnuTLS.
Comment 5 Alvaro Soliverez 2011-11-14 12:15:22 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > Is it possible that there's a problem in the original build files? I don't see
> > a dependency to libgcrypt, but the code won't build without it.
> 
> Possibly. Presumably it comes from:
> 
>   ./wocky/wocky-tls.c:#include <gcrypt.h>
> 
> GnuTLS depends on gcrypt, so Wocky does transitively depend on it when built
> against GnuTLS.

Yes, I found it. It looks like Android NDK does not manage this kind of transitive dependency very well. It is fixed in the above patch.
Comment 6 Will Thompson 2011-11-15 07:26:31 UTC
Comment on attachment 53417 [details] [review]
Support for Android patch

Review of attachment 53417 [details] [review]:
-----------------------------------------------------------------

Looks good!
Comment 7 Will Thompson 2011-11-22 09:38:28 UTC
http://cgit.freedesktop.org/wocky/commit/?id=16281498c3613e237b4096ee99789f80d02076c8 (forgot to include this in the message closing the bug, sorry)


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.