+ -
当前位置:首页 → 问答吧 → GNOME2-libbonoboui-2.0.3编译出错,修改之后通过

GNOME2-libbonoboui-2.0.3编译出错,修改之后通过

时间:2002-12-12

来源:互联网

今天,我继续在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
再编译就通过了。呵呵

作者: gzyui   发布时间: 2002-12-12

../bonobo/bonobo-ui-node-private.h:23: parse error before "xmlChar"
感觉上是bison分析的问题啊,是不是少分号?
libbonoboui不要libxml的啊,有点奇怪的说。

作者: tram   发布时间: 2002-12-12

我没有修改其它东西,就加了个链接。

我的出错信息说清楚是没找到libxml目录下的一个头文件的呀,不信看看源程序。

不骗你呀=)

作者: gzyui   发布时间: 2002-12-12

呵呵,我又查了一下书,还是要libxml2的,不过我没有加链接也找到了。这里面依赖有点复杂,麻烦。干脆做个脚本,一下子把gnome的38个库全装了,就爽了。

作者: tram   发布时间: 2002-12-12

我源码安装了libxml2.6.31,后来Ubuntu7.04软件更新管理器又给我自动升级了libxml,可它的源里最高版本才是2.6.27,升级之后打开文件浏览器就出现以下错误:

由于在试图定位工厂时,遇到未预料到的 Bonobo 错误,现在无法使用 Nautilus。
杀死 bonobo-activation-server 并重启动 Nautilus 可能会解决这个问题。

用killall bonobo-activation-server,杀掉了那个进程,也不管用

请高人指教啊~

作者: soli   发布时间: 2008-01-15

天~~骨灰也给挖出来~~

俺不用 Ubuntu,但它跟 Debian 原理相通,也许可以给你一点建议:

1. 先装个 checkinstall
2. 编译好新版的 libxml 後用 checkinstall 做个 deb 包来装,命名跟 UB 里的包相同
3. 用 dpkg -i 把包装上
4. 将 libxml 这个包设置成 hold 状态,防止系统更新时把它替换

如此,你的系统里便有新版 libxml 使用了

Hope this help!

作者: d00m3d   发布时间: 2008-01-16

引用:
作者: d00m3d
天~~骨灰也给挖出来~~

俺不用 Ubuntu,但它跟 Debian 原理相通,也许可以给你一点建议:

1. 先装个 checkinstall
2. 编译好新版的 libxml 後用 checkinstall 做个 deb 包来装,命名跟 UB 里的包相同
3. 用 dpkg -i 把包装上
4. 将 libxml 这个包设置成 hold 状态,防止系统更新时把它替换

如此,你的系统里便有新版 libxml 使用了

Hope this help!
没办法啊,02年就有的bug到现在还没有解决的办法

你说的这个方法我去试一下
不过你这样安装和我从源码安装有什么区别
我现在即使从源码安装了最新版本的libxml,问题依旧
用新立得降级后问题还在

我想到底是不是libxml的问题呢

作者: soli   发布时间: 2008-01-16

用 deb 包来装,好处是把 Debian 的包管理系统应用上并能防止系统把自己编译出来的软件被替换掉,你前文不正是遇到这问题了麽?

降级後问题依旧的话,那麽问题应该不是 libxml 本身了

作者: d00m3d   发布时间: 2008-01-17