libgcrypt fails to build on Android: error: unknown type name 'pthread_t'

Hans-Christoph Steiner hans at guardianproject.info
Wed Jan 29 16:58:27 CET 2014


It looks like there were some recent changes to the pthread detection which
break building the libgcrypt tests on Android:


/opt/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
--sysroot=/opt/android-ndk/platforms/android-9/arch-arm -DHAVE_CONFIG_H -I.
-I..  -I../src -I../src
-I/var/lib/jenkins/workspace/gnupg-for-android-git-master/external/data/data/info.guardianproject.gpg/app_opt/include
-DANDROID
-I/var/lib/jenkins/workspace/gnupg-for-android-git-master/external/data/data/info.guardianproject.gpg/app_opt/include
-fpic -ffunction-sections -funwind-tables -fstack-protector
-no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -O2
-g -DNDEBUG -fomit-frame-pointer -fstrict-aliasing -funswitch-loops
-finline-limit=300 -fvisibility=hidden -Wall -Wcast-align -Wshadow
-Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wextra
-Wbad-function-cast -Wwrite-strings -Wdeclaration-after-statement
-Wno-missing-field-initializers -Wno-sign-compare -Wpointer-arith -MT
t_lock-t-lock.o -MD -MP -MF .deps/t_lock-t-lock.Tpo -c -o t_lock-t-lock.o
`test -f 't-lock.c' || echo './'`t-lock.c
t-lock.c: In function 'check_nonce_lock':
t-lock.c:169:24: warning: unused variable 'arg' [-Wunused-variable]
   struct thread_arg_s *arg;
                        ^
t-lock.c: In function 'run_test':
t-lock.c:364:3: error: unknown type name 'pthread_t'
   pthread_t rthread;
   ^
t-lock.c:365:3: error: unknown type name 'pthread_t'
   pthread_t athreads[N_ACCOUNTANTS];
   ^
t-lock.c:370:3: warning: implicit declaration of function 'pthread_create'
[-Wimplicit-function-declaration]
   pthread_create (&rthread, NULL, revision_thread, NULL);
   ^
t-lock.c:377:7: warning: implicit declaration of function 'pthread_join'
[-Wimplicit-function-declaration]
       rc = pthread_join (athreads[i], NULL);
       ^
t-lock.c: In function 'main':
t-lock.c:434:3: warning: implicit declaration of function 'time'
[-Wimplicit-function-declaration]
   srand (time(NULL)*getpid());
   ^
t-lock.c: At top level:
t-lock.c:145:1: warning: 'nonce_thread' defined but not used [-Wunused-function]
 nonce_thread (void *argarg)
 ^
make[3]: *** [t_lock-t-lock.o] Error 1
make[3]: Leaving directory
`/var/lib/jenkins/workspace/gnupg-for-android-git-master/external/libgcrypt/tests'



-- 
PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81



More information about the Gnupg-devel mailing list