桌面搜索工具Beagle编译

来源:互联网 发布:linux修改只读文件权限 编辑:程序博客网 时间:2024/05/21 00:00
参考:
https://launchpad.net/beagle
http://cblfs.cross-lfs.org/index.php/Beagle
    `SqliteBusyException' could not be found https://bugs.gentoo.org/show_bug.cgi?id=306313
libtool 错误 http://hi.baidu.com/lostdays/blog/item/214d24d15a2b29309b5027dc.html 
补丁包patch 下载地址:http://ftp1.fr.freebsd.org/pub/frugalware/frugalware-stable/source/gnome-extra/beagle
http://ftp.eenet.ee/gentoo-portage/app-misc/beagle/files/
beagle编译依赖于如下包

Build dependencies


autoconf
automake
autotools-dev
cli-common-dev (>= 0.5.4)
debhelper (>= 5.0.37.2)
dpatch
gtk-doc-tools
intltool
libavahi-cil-dev (>= 0.6.10)
libchm-dev
libexif-dev
libgconf2.0-cil-dev
libglade2.0-cil-dev
libgmime2.2a-cil
libgnome-desktop-dev
libgnome-vfs2.0-cil-dev
libgnome2.0-cil-dev
libgsf0.0-cil (>= 0.6)
libgtk2.0-cil-dev (>= 2.4)
libgtk2.0-dev (>= 2.10)
libmono-cairo2.0-cil
libmono-dev (>= 2.0.1)
libmono-sharpzip2.84-cil
libmono-sqlite2.0-cil
libmono-system-runtime2.0-cil
libndesk-dbus-glib1.0-cil-dev
libndesk-dbus1.0-cil-dev (>= 0.5.2)
librsvg2-dev
libsqlite3-dev
libtaglib-cil-dev
libwv-dev
libxml2-dev (>= 2.6.19)
libxss-dev
mono-devel (>= 2.4.2)
monodoc-base
pkg-config
unzip
xdg-utils
zip

由于ubuntu10.10里面没有beagle的安装包,所以我就自己下载源码进行编译了


1.安装依赖文件,按照上面需要的依赖文件进行安装(apt-get即可)
也可以直接运行./configure看报什么错误
比如对我的电脑而言,第一次configure时报错为
checking for mono.pc... configure: error: missing the mono.pc file, usually found in the mono-devel package
这个时候就可以采用apt-cache进行搜索需要的程序名称apt-cache search mono-devel
搜索到有这个包的话就运行sudo apt-get install mono-devel
接着再configure一遍报如下错误
checking for NDESK_DBUS... configure: error: Package requirements (ndesk-dbus-1.0 >= 0.5.2) were not met:
No package 'ndesk-dbus-1.0' found
以同样的方法搜索缺失的包apt-cache search ndesk,一般情况下就安装后缀有dev就可以了,表示这个是开发用,需要被别人调用的
然后再循环往复直到./configure不会报错
2.由于我自己不想把程序编译安装到系统的目录下,因此采用了 ./configure  --enable-avahi --enable-maintainer-mode  --prefix=/home/fanghuaqi/mySofts
--prefix=/home/fanghuaqi/mySofts 这个就是定义程序安装的目录
3.编译程序
运行make,会报如下错误
FSpotTools.cs(88,74): error CS0246: The type or namespace name `SqliteBusyException' could not be found. Are you missing a using directive or an assembly reference?
这错误的造成主要是因为mono版本的问题,在网上下载一个补丁包(下载地址为http://ftp1.fr.freebsd.org/pub/frugalware/frugalware-stable/source/gnome-extra/beagle/beagle-0.3.9-sqlite.patch)
然后打上补丁即可,打补丁的命令为patch  -Np1 -i beagle-0.3.9-sqlite.patch ,注意这个补丁放在和beagle源码所在的目录
打上补丁后重新编译就不会报这个错误了,但是会报这个错误
......省略很多相近错误
../libtool: line 1152: X-MD: command not found
../libtool: line 1152: X-MP: command not found
../libtool: line 1152: X-MF: command not found
../libtool: line 1152: X.deps/beagled-utils.Tpo: No such file or directory
../libtool: line 1152: X-c: command not found
../libtool: line 1205: Xbeagled-utils.lo: command not found
../libtool: line 1210: libtool: compile: cannot determine name of library object from `': command not found
这个错误是libtool错误,主要原因是源码目录下./configure生成的libtool文件里面$echo变量找不到对应的定义,实际上这个定义是有的,只不过叫做ECHO,因此只需要将全文中$echo替换为$ECHO即可,注意如果自己重新configure后,需要再把libtool进行一次替换操作,替换完毕后再make,验证发现可以make clean后make,说明make clean不会清除libtool文件,按照这个步骤执行完毕后,应该就可以make成功了,这样按照源码目录下的install文档,进行一下自我测试make check,我的没有报错,就没有细究了,然后make install就可以了,如果是安装在自己的目录下,而不是系统目录就不用超级用户了
如果安装到自己设定的目录下,就需要将路径自己加到.bashrc文件中,这个设置的话直接网络上搜索linux环境变量设置即可
4.使用
路径设置完毕后,运行beagle-search就可以进行检索了,但是貌似检索效果不是很好,这个还需要再研究一下,还有怎么和deskbar结合在一起,这个也需要研究一下(TODO)

原创粉丝点击