gpt4 book ai didi

linux - Ciphertext-Policy Attribute-Based Encryption toolkit "make"错误与 libgmp

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:27:02 25 4
gpt4 key购买 nike

尝试“制作”cpabe-0.11 toolkit/library 时出现以下错误在 Ubuntu 12.04(64 位)上。系统中正确安装了所有必需的库,包括 libgmp。

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/libpbc.so: undefined reference to symbol '__gmpz_clear'
/usr/bin/ld: note: '__gmpz_clear' is defined in DSO /usr/lib/libgmp.so.3 so try adding it to the linker command line
/usr/lib/libgmp.so.3: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [cpabe-setup] Error 1

最佳答案

所以我终于解决了这个问题。基本上,由于某种原因,libgmp 未在 make 中链接(这就是错误的意思),我得到了错误 bcz。但是当我检查通过运行 ./configure 创建的 Makefile 时,它​​说:-

...blah blah blah ...
LDFLAGS = -O3 -Wall \
-lglib-2.0 \
-Wl,-rpath /usr/local/lib -lgmp \
-Wl,-rpath /usr/local/lib -lpbc \
-lbswabe \
-lcrypto -lcrypto
... blah blah blah ...

如您所见,LDFLAGS 中提到了 libgmp。随之而来的是很多困惑。一段时间后,它一时兴起,尝试对 Makefile 进行以下修改:-

LDFLAGS = -O3 -Wall \
-lglib-2.0 \
-Wl,-rpath /usr/local/lib -lgmp \
-Wl,-rpath /usr/local/lib -lpbc \
-lbswabe \
-lcrypto -lcrypto \
-lgmp

所以现在,出于某种奇怪的原因,它可以正常编译。

关于linux - Ciphertext-Policy Attribute-Based Encryption toolkit "make"错误与 libgmp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10354053/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com