构建 GPG 时出现问题

构建 GPG 时出现问题

我在我的系统上构建 GPG 时遇到问题;当我尝试make很好地运行它时,它突然出现错误。这是我运行它的最新结果:

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

答案1

您的 GPG 源代码版本在第 69 行有一个拼写错误scd/pcsc-wrapper.c: 有人错误地输入unsignedunsinged。解决这个问题,GPG 就会编译。

相关内容