porting gnupg to Android, is pth required?

Hans-Christoph Steiner hans at guardianproject.info
Wed Jan 18 16:33:30 CET 2012

On 1/18/12 10:10 AM, Alphazo wrote:
> On Wed, Jan 18, 2012 at 4:05 PM, Hans-Christoph Steiner <hans at at.or.at> wrote:
>> On Jan 18, 2012, at 5:28 AM, Werner Koch wrote:
>>> Hi,
>>> I have not seen your previous two mails (HTML parts?), but let me give
>>> you a short comment anyway:
>> Thanks for your reply.
>>>>> On Fri, Jan 13, 2012, at 16:09, Hans-Christoph Steiner wrote:
>>>>>> be a lot of work to get running on Android.  gnupg's ./configure seems
>>>>>> to say that Pth is now required.  Is it possible to build gnupg without
>>> Pth is for a looong time a requirement for GnuPG-2.  However, there are
>>> only a few users of Pth left and thus we plan to drop Pth support.
>>> Instead, we will use a new library (nPth) which has a very similar
>>> interface but internally uses the systems's standard trhead
>>> implementaions.  That is pthreads on most Unix systems and
>>> WindowsThreads on Windows.  This change will help us to solve conflicts
>>> with other libraries used by GnuPG and Pth.
>>> There is a npth branch for GnupG which will soon be merged into master.
>> Well, I got pth built so I think it'll work.  For now I'll keep it, unless you think the Android port would be better without it.
>>>>> Well, I've gotten pth built for Android and am now stuck on OpenLDAP.
>>>>> Is that absolutely required?  ;-)
>>> No, OpenLDAP is only required for the dirmngr.  However with 2.1 Dirmngr
>>> is resonsible for all network access (keyservers etc.), thus eventually
>>> you need to support it.  ./configure --disable-dirmngr allows to build
>>> without dirmngr.
>> Ah, ok, --disable-ldap wasn't working for me.  I suppose I needed also --disable-dirmngr.  We want keyserver support for sure, and openldap is built for Android now.  Does gnupg need any of the openldap client or server programs?  I only installed the libraries.
>>>> Ah... openldap is built and gnupg's ./configure is happy with it, but
>>>> now I'm getting this very odd error triggered from gl/allocsa.c with
>>>> both 2.1.0beta3 and the head of master:
>>> I don't know.  You may want to check whether gnulib has updates for this
>>> code.
>> Ah, ok so 'gl' stands for gnulib.  I've done quite a bit of porting, but haven't used gnulib before.  I've never seen a project that makes its own versions of system headers like alloca.h, is this behavior inherited from gnulib?
>> .hc
> How does this project compare to APG for Android?
> http://www.thialfihar.org/projects/apg/
> https://market.android.com/details?id=org.thialfihar.android.apg&hl=en
> Thanks
> Alphazo
APG is great, but it still needs much work.  While we'd like to see a
complete OpenPGP implementation in Java, our skills lie more in porting
and user-facing development, so we're porting gnupg and wrapping it. 
Here are some key limitations of APG as it stands now:

- no method for uploading personal public key
- no method for signing other people's keys
- no method to view signatures on a key

You can follow our progress on our wiki, this is part of the PSST project:

If you are interested in contributing, we are always looking for help. :-)


More information about the Gnupg-devel mailing list