Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm having a problem building GPG on my system; when I try to run make it fairly well before it suddenly bails out with an error. Here's my latest result from running it:

make  all-recursive
Making all in m4
make[2]: Nothing to be done for `all'.
Making all in gl
make  all-am
make[3]: Nothing to be done for `all-am'.
Making all in include
make[2]: Nothing to be done for `all'.
Making all in jnlib
make[2]: Nothing to be done for `all'.
Making all in common
make  all-am
make[3]: Nothing to be done for `all-am'.
Making all in kbx
make[2]: Nothing to be done for `all'.
Making all in g10
make[2]: Nothing to be done for `all'.
Making all in keyserver
make[2]: Nothing to be done for `all'.
Making all in sm
make[2]: Nothing to be done for `all'.
Making all in agent
make[2]: Nothing to be done for `all'.
Making all in scd
gcc -DHAVE_CONFIG_H -I. -I..  -I../gl -I../intl -I../common  
-DLOCALEDIR=\"/usr/local/share/locale\" -DGNUPG_BINDIR="\"/usr/local/bin\""   
-DGNUPG_LIBEXECDIR="\"/usr/local/libexec\""
-DGNUPG_LIBDIR="\"/usr/local/lib/gnupg\""
-DGNUPG_DATADIR="\"/usr/local/share/gnupg\""  
-DGNUPG_SYSCONFDIR="\"/usr/local/etc/gnupg\"" -g -O2 -Wall -Wno-pointer-sign 
-Wpointer-arith -MT gnupg_pcsc_wrapper-pcsc-wrapper.o -MD -MP -MF 
.deps/gnupg_pcsc_wrapper-pcsc-wrapper.Tpo -c -o gnupg_pcsc_wrapper-pcsc-wrapper.o   
`test -f 'pcsc-wrapper.c' || echo './'`pcsc-wrapper.c
pcsc-wrapper.c:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
pcsc-wrapper.c:129: error: expected specifier-qualifier-list before ‘pcsc_dword_t’
pcsc-wrapper.c:149: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pcsc_protocol’
pcsc-wrapper.c:153: error: expected ‘)’ before ‘scope’
pcsc-wrapper.c:160: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:162: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:164: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:167: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:168: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:170: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:172: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:173: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:174: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:175: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:177: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:179: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:180: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:181: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:182: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:185: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:189: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:192: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:194: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:196: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:198: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:200: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c:201: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’
pcsc-wrapper.c: In function ‘load_pcsc_driver’:
pcsc-wrapper.c:347: error: ‘pcsc_establish_context’ undeclared (first use in this function)
pcsc-wrapper.c:347: error: (Each undeclared identifier is reported only once
pcsc-wrapper.c:347: error: for each function it appears in.)
pcsc-wrapper.c: In function ‘handle_open’:
pcsc-wrapper.c:411: error: ‘pcsc_dword_t’ undeclared (first use in this function)
pcsc-wrapper.c:411: error: expected ‘;’ before ‘nreader’
pcsc-wrapper.c:413: error: expected ‘;’ before ‘card_state’
pcsc-wrapper.c:428: warning: implicit declaration of function ‘pcsc_establish_context’
pcsc-wrapper.c:437: error: ‘nreader’ undeclared (first use in this function)
pcsc-wrapper.c:437: error: too many arguments to function ‘pcsc_list_readers’
pcsc-wrapper.c:446: error: too many arguments to function ‘pcsc_list_readers’
pcsc-wrapper.c:487: error: ‘pcsc_protocol’ undeclared (first use in this function)
pcsc-wrapper.c:487: warning: passing argument 3 of ‘pcsc_connect’ makes pointer from integer without a cast
pcsc-wrapper.c:487: error: too many arguments to function ‘pcsc_connect’
pcsc-wrapper.c:509: error: expected ‘;’ before ‘readerlen’
pcsc-wrapper.c:511: error: ‘atrlen’ undeclared (first use in this function)
pcsc-wrapper.c:512: error: ‘readerlen’ undeclared (first use in this function)
pcsc-wrapper.c:515: error: ‘card_state’ undeclared (first use in this function)
pcsc-wrapper.c:515: error: ‘card_protocol’ undeclared (first use in this function)
pcsc-wrapper.c:516: error: too many arguments to function ‘pcsc_status’
pcsc-wrapper.c: In function ‘handle_close’:
pcsc-wrapper.c:558: error: ‘pcsc_protocol’ undeclared (first use in this function)
pcsc-wrapper.c: In function ‘handle_status’:
pcsc-wrapper.c:587: error: ‘struct pcsc_readerstate_s’ has no member named ‘current_state’
pcsc-wrapper.c:590: error: too many arguments to function ‘pcsc_get_status_change’
pcsc-wrapper.c:602: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’
pcsc-wrapper.c:604: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’
pcsc-wrapper.c:607: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’
pcsc-wrapper.c:614: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’
pcsc-wrapper.c:624: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’
pcsc-wrapper.c:625: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’
pcsc-wrapper.c:626: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’
pcsc-wrapper.c:627: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’
pcsc-wrapper.c:629: error: ‘pcsc_protocol’ undeclared (first use in this function)
pcsc-wrapper.c: In function ‘handle_reset’:
pcsc-wrapper.c:645: error: ‘pcsc_dword_t’ undeclared (first use in this function)
pcsc-wrapper.c:645: error: expected ‘;’ before ‘nreader’
pcsc-wrapper.c:646: error: expected ‘;’ before ‘card_state’
pcsc-wrapper.c:660: error: too many arguments to function ‘pcsc_disconnect’
pcsc-wrapper.c:678: error: ‘pcsc_protocol’ undeclared (first use in this function)
pcsc-wrapper.c:678: warning: passing argument 3 of ‘pcsc_connect’ makes pointer from integer without a cast
pcsc-wrapper.c:678: error: too many arguments to function ‘pcsc_connect’
pcsc-wrapper.c:689: error: ‘atrlen’ undeclared (first use in this function)
pcsc-wrapper.c:690: error: ‘nreader’ undeclared (first use in this function)
pcsc-wrapper.c:693: error: ‘card_state’ undeclared (first use in this function)
pcsc-wrapper.c:693: error: ‘card_protocol’ undeclared (first use in this function)
pcsc-wrapper.c:694: error: too many arguments to function ‘pcsc_status’
pcsc-wrapper.c: In function ‘handle_transmit’:
pcsc-wrapper.c:716: error: ‘pcsc_dword_t’ undeclared (first use in this function)
pcsc-wrapper.c:716: error: expected ‘;’ before ‘recv_len’
pcsc-wrapper.c:729: error: ‘pcsc_protocol’ undeclared (first use in this function)
pcsc-wrapper.c:734: error: ‘recv_len’ undeclared (first use in this function)
pcsc-wrapper.c:736: warning: passing argument 4 of ‘pcsc_transmit’ makes pointer from integer without a cast
pcsc-wrapper.c:736: error: too many arguments to function ‘pcsc_transmit’
pcsc-wrapper.c: In function ‘handle_control’:
pcsc-wrapper.c:756: error: ‘pcsc_dword_t’ undeclared (first use in this function)
pcsc-wrapper.c:756: error: expected ‘;’ before ‘ioctl_code’
pcsc-wrapper.c:757: error: expected ‘;’ before ‘recv_len’
pcsc-wrapper.c:763: error: ‘ioctl_code’ undeclared (first use in this function)
pcsc-wrapper.c:767: error: ‘recv_len’ undeclared (first use in this function)
pcsc-wrapper.c:769: error: too many arguments to function ‘pcsc_control’
make[2]: *** [gnupg_pcsc_wrapper-pcsc-wrapper.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
share|improve this question
    
What OS are you using, and doesn't it have a binary package of gpg? It is hard to say from the error message, but it is possible some build dependencies are missing. Here are the ones listed for Debian - Build-Depends: debhelper (>> 7), libz-dev, libldap2-dev, libbz2-dev, libusb-dev [!hurd-i386], libreadline-dev, file, gettext, libcurl4-gnutls-dev. –  Faheem Mitha May 29 '13 at 18:29
    
@FaheemMitha 1. Mac OS X 2. I'd just prefer to compile it myself. –  rake May 29 '13 at 18:33
3  
This link may be relevant- gnupg.10057.n7.nabble.com/gnupg-2-0-20-on-osx-td30820.html. Next time, state software version and os. –  Faheem Mitha May 29 '13 at 18:36

1 Answer 1

up vote 2 down vote accepted

Your version of the GPG source code has a typo on line 69 in scd/pcsc-wrapper.c: someone mistyped unsigned as unsinged. Fix that, and GPG will compile.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.