Corosync无法构建slackware

时间:2014-09-17 04:46:38

标签: build ld nss slackware

我试图在slackware 14.1(32位)中从源代码构建corosync 2.3.4。

vanilla配置无法找到 nss 包( mozilla-nss-3.15.2-i486-2.txz )标头,因此我必须设置配置之前的CPPFLAGS" -I / usr / include / -I / usr / include / nss / -I / usr / include / nspr /"。

现在我在链接阶段遇到以下错误:

./.libs/libtotem_pg.so: undefined reference to `PK11_DigestFinal'
./.libs/libtotem_pg.so: undefined reference to `SECITEM_FreeItem'
./.libs/libtotem_pg.so: undefined reference to `PK11_ImportSymKey'
./.libs/libtotem_pg.so: undefined reference to `PK11_DigestBegin'
./.libs/libtotem_pg.so: undefined reference to `PK11_DigestOp'
./.libs/libtotem_pg.so: undefined reference to `PK11_DestroyContext'
./.libs/libtotem_pg.so: undefined reference to `PK11_CipherOp'
./.libs/libtotem_pg.so: undefined reference to `PK11_CreateContextBySymKey'
./.libs/libtotem_pg.so: undefined reference to `PK11_GenerateRandom'
./.libs/libtotem_pg.so: undefined reference to `PK11_ParamFromIV'
./.libs/libtotem_pg.so: undefined reference to `NSS_NoDB_Init'
./.libs/libtotem_pg.so: undefined reference to `PK11_FreeSlot'
./.libs/libtotem_pg.so: undefined reference to `PK11_GetBestSlot'
./.libs/libtotem_pg.so: undefined reference to `PR_GetError'

我猜测它无法找到nss lib( libnss .so *)。我已经尝试将LDFLAGS设置为" -l / usr / lib / libnss3.so"在配置之前以及LIBS =" -L / usr / lib"结果为阴性。

想法?

2 个答案:

答案 0 :(得分:0)

您不需要将路径传递给带有-l的库,只需要没有前导“lib”部分的库的名称。因此请尝试:

  

LDFLAGS = “ - lnss3”

如果要链接的库不在库路径中(即:不在/etc/ld.so.conf中),则可以使用-L指定路径,但实际情况并非如此。

答案 1 :(得分:0)

我解决了这个问题,这是一个依赖问题。您可以在http://lists.corosync.org/pipermail/discuss/2014-September/003326.html

中查看问题解决路径