平台:CentOS 7.0
错误总结:
glue
configure 错误
问题 1
ibtoolize: `COPYING.LIB' not found in `/usr/share/libtool/libltdl'
解决方法:
安装ibtool-ltdl-devel :yum install libtool-ltdl-devel
问题 2
a2x: Command not found
解决方法:
yum install asciidoc
问题3:
--xinclude
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl heartbeat.xml
gmake[1]: --xinclude: Command not found
解决方法:
yum install libxslt-devel
问题4:
./configure 时遇到 Core development headers were not found
解决方法:用ConfigureMe configure代替 ./configure
configure 错误
问题 1
ibtoolize: `COPYING.LIB' not found in `/usr/share/libtool/libltdl'
解决方法:
安装ibtool-ltdl-devel :yum install libtool-ltdl-devel
问题 2
a2x: Command not found
解决方法:
yum install asciidoc
问题3:
--xinclude
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl heartbeat.xml
gmake[1]: --xinclude: Command not found
解决方法:
yum install libxslt-devel
问题4:
./configure 时遇到 Core development headers were not found
解决方法:用ConfigureMe configure代替 ./configure
Heartbeat
make 错误 :
错误1:variable set but not used [-Werror=unused-but-set-variable]
ccdv.c: In function ‘SlurpProgress’:
ccdv.c:116:32: error: variable ‘trailcp’ set but not used [-Werror=unused-but-set-variable]
const char *trail = "/-\\|", *trailcp;
找到 ccdt.c所在文件夹 find 'yourdir' -name ccdt.c
修改相应的Makefile,将-Wno-unused-but-set-variable 加在 CFLAGS 之后,
其他类似错误同样做法。
错误2
client_lib.c: In function 'hb_api_signon':
client_lib.c:331:2: error: 'g_strdown' is deprecated (declared at /usr/include/glib-2.0/glib/gstrfuncs.h:207) [-Werror=deprecated-declarations]
g_strdown(OurNode);
解决方法:
目前是自个定义了一个和 g_strdown功能类似的函数来替换它,更新或者降低glib库应该也可以,
static void _strdown(char *chr);
void _strdown(char *chr)
{
int i = 0;
while(chr[i]!='\0')
{
if(isupper(chr[i]))
chr[i] -= 32;
i++;
}
}
replace 'g_strdown' by _strdown
错误3:
C -o .libs/ucast.o
ucast.c: In function 'HB_make_send_sock':
ucast.c:468:6: error: conflicting types for 'i'
int i = 1;
ucast.c:465:15: note: previous declaration of 'i' was here
struct ifreq i;
变量重定义了,不知道为什么源代码里会有这种错误,也许是我的环境原因吧。
将int变量 i 改为 ii,当然也可以修改,struct ifreq i
参考
heartbeat HA installation: