小弟在编译atk时出现的问题,希望大虾们帮忙看一下

编译打包和其他
回复
daixianbiao
帖子: 23
注册时间: 2007-10-26 12:52

小弟在编译atk时出现的问题,希望大虾们帮忙看一下

#1

帖子 daixianbiao » 2008-11-24 19:41

checking pkg-config is at least version 0.7... yes
checking for GLIB - version >= 2.0.0...
*** 'pkg-config --modversion glib-2.0' returned 2.16.3, but GLIB (2.19.0)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH2.19.0
*** to point to the correct configuration files
no
configure: error:
*** GLIB 2.0.0 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
*** but not in the same location as pkg-config add the location of the file
*** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.

前两天我在装DFB时,需要安装GLIB 和ATK等,就编译安装glib 2.16.3,安装成功,但是接下来在编译ATK时就出现了上述问题,我没有装2.19.0的版本,网上有说可能是系统自带的,因此我就按照下面的方法删除了glib,然后在重新编译安装glib-2.16.3,但是安装后编译atk时还是会出现上述情况
cd glib-2.16.3
make uninstall
#rm -rf /usr/bin/glib*
#rm -rf /usr/local/lib/glib-2.0
#rm -rf /usr/local/dfb/bin/glib*
我是把DFB单独装在一个文件下/usr/local/dfb,glib 是安装在/usr/local/dfb下,我按照网上的方法也添加了环境变量,如下:
* export LD_LIBRARY_PATH=/usr/local/dfb/lib
* export PATH=/usr/local/dfb/bin/:$PATH
* export PKG_CONFIG=/usr/local/dfb/bin/pkg-config
* export PKG_CONFIG_PATH=/usr/local/dfb/lib/pkgconfig
* export CPPFLAGS=-I/usr/local/dfb/include
* export LDFLAGS=-L/usr/local/dfb/lib
最初我以为是环境变量的原因,我就把/sur/local/dfb/bin加入到ld.so.conf中了,但是没什么作用,我把glib用make uninstall 后,编译atk出现一下问题;
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.7... yes
checking for GLIB - version >= 2.0.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error:
*** GLIB 2.0.0 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
*** but not in the same location as pkg-config add the location of the file
*** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.
小弟我是在不知道是哪方面出问题了,希望大虾们看看,给点建议啥的,小弟不生感激!是不是缺少什么头文件阿?
zwjiong
帖子: 17
注册时间: 2008-06-28 16:37

Re: 小弟在编译atk时出现的问题,希望大虾们帮忙看一下

#2

帖子 zwjiong » 2008-11-29 19:08

这个问题比较麻烦,我在装gtk的时候也碰到~~~其实是你装的glib跟系统自带的冲突了~~系统装在了/usr/lib里面,你把自带的glib删除,然后用心离得里面更新glib,然后一定要装一个glib_dev(貌似是这个,具体你看看里面的说明),他是可以形成.pc的文件,就是pkg-config需要访问的文件~~~~然后就应该OK了啊
daixianbiao
帖子: 23
注册时间: 2007-10-26 12:52

Re: 小弟在编译atk时出现的问题,希望大虾们帮忙看一下

#3

帖子 daixianbiao » 2008-12-01 18:27

谢谢阿,我试过了,不行。不过现在问题解决了,我把所有dfb要装的都重装了一遍,这次就没什么问题,不知道怎么搞的!
回复