+ -
当前位置:首页 → 问答吧 → pkg-config的配置问题

pkg-config的配置问题

时间:2007-10-05

来源:互联网

我的pkg-config配置如下
代码:
export PKG_CONFIG_PATH32="/usr/lib/pkgconfig:/usr/X11R7/lib/pkgconfig"
export PKG_CONFIG_PATHN32="/usr/lib32/pkgconfig"
export PKG_CONFIG_PATH64="/usr/lib64/pkgconfig:/usr/X11R7/lib64/pkgconfig"
我在编译xorg时出错了,提示说没有找到"xcb-proto"需要配置pkg-config,但是xcb-proto.pc文件我已经安装了
代码:
root20:02:27:/home/xorg73/old/libxcb-1.0# ls /usr/X11R7/lib/pkgconfig/xcb-proto.pc
/usr/X11R7/lib/pkgconfig/xcb-proto.pc
下面是编译时出错的信息
代码:
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for xsltproc... /usr/bin/xsltproc
checking for XCBPROTO... configure: error: Package requirements (xcb-proto >= 1.0) were not met:

No package 'xcb-proto' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables XCBPROTO_CFLAGS
and XCBPROTO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

而且我运行pkg-config --list-all时什么显示都没有,是不是我配置有问题?

作者: echo   发布时间: 2007-10-05

echo PKG_CONFIG_PATH32
echo PKG_CONFIG_PATH64

看一下 libxcb 需要一些什么 ?
http://cblfs.cross-lfs.org/index.php/Libxcb
# Required
# xcb-proto
# libpthread-stubs
# LibXSLT
#libXau from Xorg7/Libraries

需要先安装一个 Xorg7.x-lib 的包, 以 libXau 开头的那个。

所以,Xorg7.x 的依赖关系如同 “鬼打墙” 。按常规思维,Xorg7.x 的几个包,比如 lib 的,可以按一个顺序一并安装,又怎知还要绕几圈才成?

作者: tfkdmwmqtr   发布时间: 2007-10-05

我觉得是我的pkg- config的配置好像有问题,我运行pkg-config --list-all时,什么显示都没有,而且xcb-proto.pc明明已经安装了,但是就是找不到PKG_CONFIG_PATH32
和PKG_CONFIG_PATH64都指定了xcb-proto所在的目录位置

作者: echo   发布时间: 2007-10-06

两年前的贴子...
我同样的问题,狠心从头开始重装xorg,没有用那个自动脚本,又好了

作者: stesen   发布时间: 2009-11-05

export XORG_PREFIX="/usr"

这样做就不出现这个问题。

作者: 飞龙在天   发布时间: 2009-11-06

应该照 BLFS 册的建议,建立 /usr/X11R6 的兼容性 symlink 最保险

作者: d00m3d   发布时间: 2009-11-07

export XORG_PREFIX="/usr/X11R6" 做了两遍都是 No package 'xcb-proto' found
问题应该出在什么地方?

作者: 飞龙在天   发布时间: 2009-11-07

問題是連結已建立否?

作者: d00m3d   发布时间: 2009-11-07

我也遇到过同样的问题,应该是你的环境变量没配置好。光配置PKG_CONFIG_PATH是不够的。手册是这样说的:If you've decided to use an alternate prefix, be sure to add $XORG_PREFIX/bin to your PATH environment variable and $XORG_PREFIX/lib/pkgconfig to your PKG_CONFIG_PATH variable. You should also add $XORG_PREFIX/lib to the /etc/ld.so.conf file.你是不是没加$XORG_PREFIX/lib 这个到ld.so.conf里面去?

作者: johnnyfu829   发布时间: 2009-11-07

还是老话,建立兼容性连结最保险

作者: d00m3d   发布时间: 2009-11-08

export PKG_CONFIG_PATHN32="/usr/lib32/pkgconfig:/usr/X11R7/lib32/pkgconfig"

ps:我都喜欢
X11R6 -> X11
X11 -> X11R7
X11R7 -> X11R7.4

作者: tusooa   发布时间: 2009-11-14

热门下载

更多