|
今天,我继续在LFS上装GNOME2,装到libbonoboui-2.0.3的时候出错了:
../bonobo/bonobo-ui-node-private.h:6:27: libxml/parser.h: No such file or directory
../bonobo/bonobo-ui-node-private.h:7:30: libxml/xmlmemory.h: No such file or directory
In file included from ../bonobo/bonobo-ui-private.h:18,
from bonobo-dock-item.c:47:
../bonobo/bonobo-ui-node-private.h:23: parse error before "xmlChar"
../bonobo/bonobo-ui-node-private.h:23: warning: no semicolon at end of struct or union
../bonobo/bonobo-ui-node-private.h:26: parse error before '}' token
../bonobo/bonobo-ui-node-private.h:30: parse error before "xmlChar"
../bonobo/bonobo-ui-node-private.h:30: warning: no semicolon at end of struct or union
../bonobo/bonobo-ui-node-private.h:31: warning: type defaults to `int' in declaration of `BonoboUIAttr'
../bonobo/bonobo-ui-node-private.h:31: warning: data definition has no type or storage class
make[2]: *** [bonobo-dock-item.lo] Error 1
make[2]: Leaving directory `/usr/src/libbonoboui-2.0.3.2/bonobo'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/libbonoboui-2.0.3.2'
make: *** [all-recursive-am] Error 2
不可能呀,我的libxml2已经安装了。用find命令查找libxml,发现有两处:
./usr/src/libxml2-2.4.28/include/libxml
./usr/include/libxml2/libxml
其中在/usr/src目录的是源程序。/usr/include/libxml2/libxml目录下面都有出错信息说没有的那几个头文件。
然后到/usr/src/libbonoboui-2.0.3.2/bonobo(出错时所在的目录)。首先检查bonobo-ui-node-private.h(出错的地方),发现它要包含的头文件分别是libxml/tree.h、libxml/parser.h、libxml/xmlmemory.h。会不会是头文件没有这个libxml定义呢?接着检查Makefile文件,发现BONOBOUI_CFLAGS和BONOBOUI_GLADE_CFLAGS(注:各位大哥,这两个应该叫什么?)定义的有/usr/include/gtk-2.0、/usr/include/glib-2.0等等,就是没有/usr/include/libxml。
于是马上知道怎么解决了,回到/usr/include目录,建立一个链接:
ln -s libxml2/libxml libxml
再编译就通过了。呵呵 |
|