【问题标题】:RRDTOOL configure script not picking up glib-2.0RRDTOOL 配置脚本没有选择 glib-2.0
【发布时间】:2013-06-24 18:37:54
【问题描述】:

我正在尝试在装有 CentOS 4.1 的机器上构建 rrdtool-1.4.8,当我运行配置脚本时,尽管将 -I/usr/include/glib-2.0-I/usr/lib64/glib-2.0/include 添加到 CPPFLAGS:

# ./configure --disable-tcl --disable-python --disable-rrd_graph CFLAGS="-O3 -fPIC" \
LIBS="-lm  -lwrap -lglib-2.0" LDFLAGS="-Wl,--rpath -Wl,/mypath/lib/libxml2/lib" \
CPPFLAGS="-I/mypath/lib/libxml2/include/libxml2/libxml -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include" \
PKG_CONFIG_PATH=/mypath/lib/libxml2/lib/pkgconfig

抛出以下错误:

Find 3rd-Party Libraries
checking dbi/dbi.h usability... no
checking dbi/dbi.h presence... no
checking for dbi/dbi.h... no
checking tcpd.h usability... yes
checking tcpd.h presence... yes
checking for tcpd.h... yes
checking for hosts_access... yes
checking for glib_check_version in -lglib-2.0... no
checking for pkg-config... pkg-config
checking for glib_check_version in -lglib-2.0... no
configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of glib-2.0. Check config.log for hints on why
  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
  so that compiler and the linker can find libglib-2.0 and its header files. If
  you have not installed glib-2.0, you can get it either from its original home on

     ftp://ftp.gtk.org/pub/glib/2.28/

  You can find also find an archive copy on

     http://oss.oetiker.ch/rrdtool/pub/libs

  The last tested version of glib-2.0 is 2.28.7.

       LIBS=-lm  -lwrap -lglib-2.0 -lglib-2.0  
   LDFLAGS=-Wl,--rpath -Wl,/mypath/lib/libxml2/lib    
  CPPFLAGS=-I/mypath/lib/libxml2/include/libxml2/libxml -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  

----------------------------------------------------------------------------
checking for xmlParseFile in -lxml2... no
checking for pkg-config... (cached) pkg-config
checking for xmlParseFile in -lxml2... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
configure: error: Please fix the library issues listed above and try again.

但是glib2-devel包已经安装了:

# yum list installed | grep glib2
glib2.x86_64                             2.4.7-1                installed       
glib2.i386                               2.4.7-1                installed       
glib2-devel.x86_64                       2.4.7-1                installed

我意识到我可能遗漏了一些非常微不足道的东西,但我做错了什么?

glib-2.0 是不是版本不对?我应该编译一个更新的并链接它吗?

【问题讨论】:

    标签: compilation glib rrdtool rrd


    【解决方案1】:

    如果其他人有这个问题,glib-2.0 的版本已经过时了。

    要解决这个问题,请将 glib-2.0 更新到更新的版本,然后运行配置脚本。

    $./configure --disable-tcl --disable-python \
      CFLAGS="-O3 -fPIC" LIBS="-lm  -lwrap" \
      PKG_CONFIG_PATH=/mypath/lib/libxml2/lib/pkgconfig:/mypath2/glib-2.0/lib/pkgconfig \
      --prefix=/mypath3 \
    

    configure脚本运行成功后,调用make编译src。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-04
      • 2017-02-10
      • 2016-11-21
      • 1970-01-01
      • 2017-04-13
      相关资源
      最近更新 更多