building gpgme for Android dies on install

Hans-Christoph Steiner hans at guardianproject.info
Thu Aug 16 03:35:25 CEST 2012


I believe I found the source of the trouble. The various *-config
scripts all return values based on the assumption that everything will
be installed before being used.  Since we're cross-compiling, that's not
the case.

So now I'm trying to force things by using sed to replace prefix= in the
various *-config scripts, but I haven't find a good time in the process
to do that, and a good pattern to guarantee the results needed...

.hc

On 08/15/2012 08:48 PM, Hans-Christoph Steiner wrote:
> 
> I found a clue.  It seems that the first time when running the
> gpgme-install, it fails with a different error, then every time after,
> it gives the error below.  Here's the first time error:
> 
> /bin/sed: can't read
> /data/data/info.guardianproject.gpg/app_opt/lib/libgpg-error.la: No such
> file or directory
> libtool: link:
> `/data/data/info.guardianproject.gpg/app_opt/lib/libgpg-error.la' is not
> a valid libtool archive
> make[3]: *** [libgpgme.la] Error 1
> make[3]: Leaving directory
> `/media/share/code/guardianproject/gnupg-for-android/external/gpgme/src'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/media/share/code/guardianproject/gnupg-for-android/external/gpgme'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory
> `/media/share/code/guardianproject/gnupg-for-android/external/gpgme'
> 
> And some relevant info:
> 
> * since this is a cross-compile, the various libs like libgpg-error
>   can't be meaningfully installed before compiling gpgme. So there is
>   a sed hack to change the *-config scripts to point to the right
>   things to get stuff building:
> 
>   sed -i 's|^prefix=$(prefix)|prefix=$(LOCAL)|' $(LOCAL)/bin/*-config
> 
> * prefix=/data/data/info.guardianproject.gpg/app_opt
> 
> * libgpg-error.la exists at $(DESTDIR)$(prefix)/lib/libgpg-error.la
> 
> Still hunting around... I found a new debug trick which is helping:
> 
> make SHELL="/bin/bash -vx" install
> 
> .hc
> 
> On 08/15/2012 05:38 PM, Hans-Christoph Steiner wrote:
>>
>> Hey all,
>>
>> I'm back at it, this time trying to get gpgme and gnupg-for-java all
>> working on Android.  gpgme is quite close, there seems to be only an
>> error on the install.  I'm building 1.3.2 using the Android NDK r8b.
>>
>> The good news is that I no longer need to patch gpgme to build it, nor
>> update config.guess and config.sub.  Thanks! :)  You can see the
>> ./configure flags used here, and indeed the whole build setup:
>> https://github.com/guardianproject/gnupg-for-android/blob/master/external/Makefile#L557
>>
>> Now for the install error (I've never heard of a .lai file...). Its
>> trying to install libgpgme.lai as libgpgme.la, but libgpgme.lai doesn't
>> exist.  src/libgpgme.la does tho.
>>
>> Here's the full log:
>>
>> $ make -C gpgme
>> DESTDIR=/media/share/code/guardianproject/gnupg-for-android/external/../external
>> prefix=/data/data/info.guardianproject.gpg/app_opt install
>> make: Entering directory
>> `/media/share/code/guardianproject/gnupg-for-android/external/gpgme'
>> Making install in src
>> make[1]: Entering directory
>> `/media/share/code/guardianproject/gnupg-for-android/external/gpgme/src'
>> make[2]: Entering directory
>> `/media/share/code/guardianproject/gnupg-for-android/external/gpgme/src'
>> test -z "/data/data/info.guardianproject.gpg/app_opt/bin" || /bin/mkdir
>> -p
>> "/media/share/code/guardianproject/gnupg-for-android/external/../external/data/data/info.guardianproject.gpg/app_opt/bin"
>>  /usr/bin/install -c gpgme-config
>> '/media/share/code/guardianproject/gnupg-for-android/external/../external/data/data/info.guardianproject.gpg/app_opt/bin'
>> test -z "/data/data/info.guardianproject.gpg/app_opt/lib" || /bin/mkdir
>> -p
>> "/media/share/code/guardianproject/gnupg-for-android/external/../external/data/data/info.guardianproject.gpg/app_opt/lib"
>>  /bin/bash ../libtool   --mode=install /usr/bin/install -c   libgpgme.la
>> '/media/share/code/guardianproject/gnupg-for-android/external/../external/data/data/info.guardianproject.gpg/app_opt/lib'
>> libtool: install: /usr/bin/install -c .libs/libgpgme.so.11.8.1
>> /media/share/code/guardianproject/gnupg-for-android/external/../external/data/data/info.guardianproject.gpg/app_opt/lib/libgpgme.so.11.8.1
>> libtool: install: (cd
>> /media/share/code/guardianproject/gnupg-for-android/external/../external/data/data/info.guardianproject.gpg/app_opt/lib
>> && { ln -s -f libgpgme.so.11.8.1 libgpgme.so.11 || { rm -f
>> libgpgme.so.11 && ln -s libgpgme.so.11.8.1 libgpgme.so.11; }; })
>> libtool: install: (cd
>> /media/share/code/guardianproject/gnupg-for-android/external/../external/data/data/info.guardianproject.gpg/app_opt/lib
>> && { ln -s -f libgpgme.so.11.8.1 libgpgme.so || { rm -f libgpgme.so &&
>> ln -s libgpgme.so.11.8.1 libgpgme.so; }; })
>> libtool: install: /usr/bin/install -c .libs/libgpgme.lai
>> /media/share/code/guardianproject/gnupg-for-android/external/../external/data/data/info.guardianproject.gpg/app_opt/lib/libgpgme.la
>> /usr/bin/install: cannot stat `.libs/libgpgme.lai': No such file or
>> directory
>> make[2]: *** [install-libLTLIBRARIES] Error 1
>> make[2]: Leaving directory
>> `/media/share/code/guardianproject/gnupg-for-android/external/gpgme/src'
>> make[1]: *** [install-am] Error 2
>> make[1]: Leaving directory
>> `/media/share/code/guardianproject/gnupg-for-android/external/gpgme/src'
>> make: *** [install-recursive] Error 1
>> make: Leaving directory
>> `/media/share/code/guardianproject/gnupg-for-android/external/gpgme'
>>



More information about the Gnupg-devel mailing list