【问题标题】:make not working on gobject-introspection due to glib error由于 glib 错误,无法处理 gobject-introspection
【发布时间】:2015-04-28 00:51:24
【问题描述】:

我正在运行 64 位 Debian Wheezy,我一直在尝试使用步骤 here. 编译 gobject-introspection 当我最初尝试使用以下方法编译它时:

./configure --prefix=/usr --disable-static &&
make

它抱怨我的 GLib 版本太低 (2.42.1)。于是我就去编译了 GLib 2.44.0,并顺利安装了它。我试图再次编译它,但它返回了同样的错误。这是日志的相关部分。

checking for GLIB... no
configure: error: Package requirements (glib-2.0 >= 2.44.0) were not met:

Requested 'glib-2.0 >= 2.44.0' but version of GLib is 2.42.1

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

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

当我运行“gapplication version”和“gtester --version”时,我得到“2.44.0”,但是当我运行“gsettings --version”时,它返回 2.42.1 - 我的初始版本。不过,我不确定这是否相关。

欢迎提出任何建议并非常感谢。

【问题讨论】:

    标签: compiler-errors makefile glib gobject-introspection


    【解决方案1】:

    获取版本的相关调用是pkg-config --modversion glib-2.0。错误消息会告诉您需要做什么来修复它。

    至于发生了什么,确实没有足够的信息可以确定,但我的猜测是:您将前缀设置为 /usr,默认情况下 libdir 是 $prefix/lib,并且 pkg-config 文件安装在 $库目录/pkgconfig。我的猜测是您的 pkg-config 正在查看 /usr/lib64/pkgconfig 而不是 /usr/lib/pkgconfig。如果您的 libdir 应该是 /usr/lib64(或 /usr/lib 以外的任何内容),您应该通过将 --libdir=/usr/lib64 传递给 glib 的配置脚本来设置它。

    希望您没有覆盖任何现有的 32 位 glib 内容……如果您这样做了,您可能需要重新安装一些软件包。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-13
      • 1970-01-01
      相关资源
      最近更新 更多