porting gnupg to Android, is pth required?

Hans-Christoph Steiner hans at at.or.at
Tue Jan 17 23:44:26 CET 2012


On Fri, 2012-01-13 at 20:51 -0500, Hans-Christoph Steiner wrote:
> 
> On Fri, Jan 13, 2012, at 16:09, Hans-Christoph Steiner wrote:
> > 
> > I'm in the process of porting gnupg to Android, and I've gotten
> > libgpg-error, libgcrypt, libassuan, and libksba all building for
> > Android.  The big stickler right now is GNU Pth, it looks like it could
> > 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?  If not in a current version, in a previous version?
> > 
> > .hc
> > 
> Well, I've gotten pth built for Android and am now stuck on OpenLDAP. 
> Is that absolutely required?  ;-)
> 
> .hc
> 

Progress and a git repo!  But no gnupg build yet.
https://github.com/guardianproject/gnupg-for-android

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:


/usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/usr/local/android-ndk/platforms/android-9/arch-arm -DHAVE_CONFIG_H -I. -I..     -DANDROID -I/media/share/code/guardianproject/gnupg-for-android/external/include -O3 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT allocsa.o -MD -MP -MF .deps/allocsa.Tpo -c -o allocsa.o allocsa.c
In file included
from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/sys/time.h:33,

from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:32,
                 from ./stdint.h:88,

from /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/sys/types.h:43,

from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/strings.h:42,

from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/stdlib.h:42,
                 from allocsa.h:23,
                 from allocsa.c:21:
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/linux/time.h:20: error: expected specifier-qualifier-list before 'time_t'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/linux/time.h:26: error: expected specifier-qualifier-list before 'time_t'
In file included
from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/asm/siginfo.h:15,

from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:35,
                 from ./stdint.h:88,

from /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/sys/types.h:43,

from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/strings.h:42,

from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/stdlib.h:42,
                 from allocsa.h:23,
                 from allocsa.c:21:
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/asm-generic/siginfo.h:51: error: expected specifier-qualifier-list before 'pid_t'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/asm-generic/siginfo.h:56: error: expected specifier-qualifier-list before 'timer_t'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/asm-generic/siginfo.h:64: error: expected specifier-qualifier-list before 'pid_t'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/asm-generic/siginfo.h:70: error: expected specifier-qualifier-list before 'pid_t'
In file included from ./stdint.h:88,

from /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/sys/types.h:43,

from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/strings.h:42,

from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/stdlib.h:42,
                 from allocsa.h:23,
                 from allocsa.c:21:
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'time'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:70: error: expected ')' before '__time1'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:71: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mktime'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:73: error: expected ';', ',' or ')' before '*' token
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:74: error: expected ';', ',' or ')' before '*' token
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:76: error: expected ';', ',' or ')' before '*' token
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:77: error: expected ';', ',' or ')' before '*' token
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:82: error: expected ';', ',' or ')' before '*' token
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:83: error: expected ';', ',' or ')' before '*' token
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:94: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'clock'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:107: error: expected declaration specifiers or '...' before 'timer_t'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:109: error: expected ')' before 'timerid'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:110: error: expected ')' before 'timerid'
/usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/time.h:111: error: expected ')' before 'timerid'
allocsa.c: In function 'mallocsa':
allocsa.c:82: warning: cast increases required alignment of target type
allocsa.c:86: warning: cast increases required alignment of target type
allocsa.c: In function 'freesa':
allocsa.c:126: warning: cast increases required alignment of target type
allocsa.c:130: warning: cast increases required alignment of target type
make[4]: *** [allocsa.o] Error 1
make[4]: Leaving directory
`/media/share/code/guardianproject/gnupg-for-android/external/gnupg/gl'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/media/share/code/guardianproject/gnupg-for-android/external/gnupg/gl'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/media/share/code/guardianproject/gnupg-for-android/external/gnupg'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/media/share/code/guardianproject/gnupg-for-android/external/gnupg'
make: *** [gnupg-build-stamp] Error 2





More information about the Gnupg-devel mailing list