基于配对的密码学(PBC)签名库(pbc_sig-0.0.8)失败

时间:2014-06-12 17:41:44

标签: linux cryptography makefile centos

我在CentOS 6.5中成功安装了pbc-0.5.14(http://crypto.stanford.edu/pbc/)。但是当我想安装pbc_sig-0.0.8(http://crypto.stanford.edu/pbc/sig/)时出现以下错误:

In file included from sig/bbs.c:2:
/usr/local/include/pbc/pbc_utils.h:82: error: expected ‘)’ before ‘i’
make[1]: *** [libpbc_sig_la-bbs.lo] Error 1
make[1]: Leaving directory `/root/Desktop/CryptographyLibraries/PBC/pbc_sig-0.0.8'
make: *** [all] Error 2

如果你能帮助我解决它,我将非常感激。我还带来了下面的./configure结果:

[root@localhost pbc_sig-0.0.8]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for pow in -lm... yes
checking for __gmpz_init in -lgmp... yes
checking for pairing_init_set_buf in -lpbc... yes
checking pbc/pbc.h usability... yes
checking pbc/pbc.h presence... yes
checking for pbc/pbc.h... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for ANSI C header files... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for floor... no
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for pow... no
checking for sqrt... no
checking for strchr... yes
checking for strdup... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

global build variables
-----------------------------------------
Thu Jun 12 13:57:59 IRDT 2014
host info:        i686-pc-linux-gnu
debug build:  no
LDFLAGS:          
CPPFLAGS:         
CFPLAGS:           -Wall -W -Wfloat-equal -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wredundant-decls -Wendif-labels -Wshadow -pipe -ffast-math -U__STRICT_ANSI__ -std=c99 -fomit-frame-pointer -O3 -fomit-frame-pointer -O3
-----------------------------------------

提前感谢您的帮助。

1 个答案:

答案 0 :(得分:2)

尝试在#include <pbc/pbc_utils.h>中切换第二行(#include "pbc_sig.h")和三行(sig/bbs.c),看看是否能解决问题。

要解释此问题,因为这似乎已修复它,问题是pbc_utils.h标头文件不包含stdint.h但使用intptr_t类型。 sig/bbs.c同样没有包含该标题,pbc_sig.h也是如此。因此,重新排序包含意味着intptr_tpbc_utils.h中看到它已被定义。

这可能会引起pbc背后的开发人员的注意,因为这可能被视为他们可能想要修复的头文件的问题。