1

我正在尝试从 i686-pc-linux-gnu 机器为 i686-cm-linux 编译 gobject-introspection-1.31.0 (GI)。请在 config.log 中找到相同的部分。在配置 GI 时,可以正确找到 glib、gio、gobject 和 python 等库。

            This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.

    It was created by gobject-introspection configure 1.31.0, which was
    generated by GNU Autoconf 2.68.  Invocation command line was

      $ ./configure --prefix=/home/vishaln/crossed PKG_CONFIG_PATH=/home/vishaln/crossed/lib/pkgconfig PKG_CONFIG_LIBDIR=/home/vishaln/crossed/lib/pkgconfig --host=i686-cm-linux --target=i686-cm-linux --disable-tests --disable-dependency-tracking --includedir=/home/vishaln/crossed/include --oldincludedir=/home/vishaln/crossed/include CC=/home/vishaln/IntelCE_Build/bin/toolchain/root/bin/i686-cm-linux-gcc CXX=/home/vishaln/IntelCE_Build/bin/toolchain/root/bin/i686-cm-linux-g++ CFLAGS=-I/home/vishaln/crossed/include -I/home/vishaln/crossed/include -I/home/vishaln/crossed/include/glib-2.0/gio -I/home/vishaln/crossed/include/glib-2.0/gobject -I/home/vishaln/crossed/include/glib-2.0/glib -I/home/vishaln/crossed/lib/glib-2.0/include LDFLAGS=-L/home/vishaln/crossed/lib LIBS=-lffi -lz  -lglib-2.0 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lfl

    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##

    configure:4751: checking for ld used by /home/vishaln/IntelCE_Build/bin/toolchain/root/bin/i686-cm-linux-gcc
    configure:4818: result: /home/vishaln/IntelCE_Build/bin/toolchain/root/i686-cm-linux/bin/ld
    configure:4825: checking if the linker (/home/vishaln/IntelCE_Build/bin/toolchain/root/i686-cm-linux/bin/ld) is GNU ld
    configure:4840: result: yes
    configure:4852: checking for BSD- or MS-compatible name lister (nm)
    configure:4901: result: /home/vishaln/IntelCE_Build/bin/toolchain/root/bin/i686-cm-linux-nm -B
    configure:11863: checking for pkg-config
    configure:11881: found /usr/bin/pkg-config
    configure:11893: result: /usr/bin/pkg-config
    configure:11918: checking pkg-config is at least version 0.9.0
    configure:11921: result: yes
    configure:12162: checking for dlopen in -ldl
    configure:12187: /home/vishaln/IntelCE_Build/bin/toolchain/root/bin/i686-cm-linux-gcc -o conftest -fno-strict-aliasing -Wsign-compare -Wcast-align -Wpointer-arith -Wnested-externs -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wall -I/home/vishaln/crossed/include -I/home/vishaln/crossed/include -I/home/vishaln/crossed/include/glib-2.0/gio -I/home/vishaln/crossed/include/glib-2.0/gobject -I/home/vishaln/crossed/include/glib-2.0/glib -I/home/vishaln/crossed/lib/glib-2.0/include  -L/home/vishaln/crossed/lib conftest.c -ldl  -lffi -lz  -lglib-2.0 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lfl >&5
    configure:12187: $? = 0
    configure:12196: result: yes
    configure:12432: checking for GLIB
    configure:12439: $PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.29.7"
    configure:12442: $? = 0
    configure:12455: $PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.29.7"
    configure:12458: $? = 0
    configure:12517: result: yes
    configure:12523: checking for GOBJECT
    configure:12530: $PKG_CONFIG --exists --print-errors "gobject-2.0"
    configure:12533: $? = 0
    configure:12546: $PKG_CONFIG --exists --print-errors "gobject-2.0"
    configure:12549: $? = 0
    configure:12608: result: yes
    configure:12614: checking for GIO
    configure:12621: $PKG_CONFIG --exists --print-errors "gio-2.0"
    configure:12624: $? = 0
    configure:12637: $PKG_CONFIG --exists --print-errors "gio-2.0"
    configure:12640: $? = 0
    configure:12699: result: yes
    configure:12705: checking for GIO_UNIX
    configure:12712: $PKG_CONFIG --exists --print-errors "gio-unix-2.0"
    configure:12715: $? = 0
    configure:12728: $PKG_CONFIG --exists --print-errors "gio-unix-2.0"
    configure:12731: $? = 0
    configure:12768: result: yes
    configure:13402: checking for GIREPO
    configure:13409: $PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0"
    configure:13412: $? = 0
    configure:13425: $PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0"
    configure:13428: $? = 0
    configure:13487: result: yes
    configure:14177: checking whether /home/vishaln/crossed/bin/python2.7 version >= 2.5
    configure:14188: /home/vishaln/crossed/bin/python2.7 -c import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)
    configure:14191: $? = 0
    configure:14193: result: yes
    configure:14284: checking for /home/vishaln/crossed/bin/python2.7 version
    configure:14291: result: 2.7
    configure:14303: checking for /home/vishaln/crossed/bin/python2.7 platform
    configure:14310: result: linux2
    configure:14317: checking for /home/vishaln/crossed/bin/python2.7 script directory
    configure:14346: result: ${prefix}/lib/python2.7/site-packages
    configure:14355: checking for /home/vishaln/crossed/bin/python2.7 extension module directory
    configure:14384: result: ${exec_prefix}/lib/python2.7/site-packages
    configure:14405: checking for headers required to compile python extensions
    configure:14422: /home/vishaln/IntelCE_Build/bin/toolchain/root/bin/i686-cm-linux-gcc -E  -I/home/vishaln/crossed/include/python2.7 conftest.c
    configure:14422: $? = 0
    configure:14423: result: found
    configure:14686: creating ./config.status

但是运行make后,发现如下错误:

      CCLD   glib-print
      GEN    g-ir-scanner
      GEN    g-ir-annotation-tool
      GEN    g-ir-doc-tool
      GISCAN GLib-2.0.gir
    Package gio-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gio-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gio-2.0' found
    Package gthread-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gthread-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gthread-2.0' found
    Package gio-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gio-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gio-2.0' found
    Package gthread-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gthread-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gthread-2.0' found
    /usr/bin/ld: cannot find -lglib-2.0
    collect2: ld returned 1 exit status
    linking of temporary binary failed: Command '['/bin/sh', './libtool', '--mode=link', '--tag=CC', '--silent', 'gcc', '-o', '/home/vishaln/a/gobject-introspection-1.31.0/tmp-introspectLlklOf/GLib-2.0', '-export-dynamic', '-lglib-2.0', '-lgobject-2.0', '/home/vishaln/a/gobject-introspection-1.31.0/tmp-introspectLlklOf/GLib-2.0.o']' returned non-zero exit status 1
    make[2]: *** [GLib-2.0.gir] Error 1
    make[2]: Leaving directory `/home/vishaln/a/gobject-introspection-1.31.0'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/vishaln/a/gobject-introspection-1.31.0'
    make: *** [all] Error 2

pkg 配置路径是:PKG_CONFIG_PATH=/home/vishaln/crossed/lib/pkgconfig

ls /home/vishaln/crossed/lib/pkgconfig/g*
gio-2.0.pc  gio-unix-2.0.pc  glib-2.0.pc  gmodule-2.0.pc  gmodule-export-2.0.pc  gmodule-no-export-2.0.pc gobject-2.0.pc  gthread-2.0.pc
  • 我尝试重建 glib。
  • 我尝试了不同版本的 GI。

还没有什么成果。

任何建议都非常欢迎。

4

1 回答 1

1

(已在评论中回答。请参阅没有答案的问题,但问题已在评论中解决(或在聊天中扩展)

OP写道:

我找到了解决这个问题的方法。PKG_CONFIG_PATH运行时正在修改make。这是错误的,我不知道这是在哪里以及如何发生的。所以,我想在错误位置之前将其重置。解决方法: - Makefile:在行之前GLib-2.0.gir: g-ir-scanner g-ir-compiler$(EXEEXT),添加PKG_CONFIG_PATH=<path to pkgconfig>这将暂时解决问题。

@Dror Harari 写道:

有一个类似的问题,并且在不编辑make文件的情况下通过安装来解决它:sudo make install PKG_CONFIG_PATH=/usr/local/lib/pkgconfig -e

于 2015-01-24T20:58:16.483 回答