1

我正在尝试按照此处的说明为 MIPS 系统交叉编译 GLib 2.37.0 。我有一个 mips.cache 文件,其中包含以下内容:

glib_cv_stack_grows=no
glib_cv_uscore=no
ac_cv_func_posix_getpwuid_r=no
ac_cv_func_posix_getgrgid_r=no

我正在使用以下命令行调用配置脚本:

./configure --cache-file=mips.cache --host=mips-linux CCFLAGS=-I/opt/toolchain/build_mips/staging_dir/usr/include LDFLAGS=-L/opt/toolchain/build_mips/staging_dir/usr/lib

不幸的是,我收到了这个错误:

configure: error: *** No iconv() implementation found in C library or libiconv

如果有帮助,整个输出是:

checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for mips-linux-gcc... mips-linux-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mips-linux-gcc accepts -g... yes
checking for mips-linux-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of mips-linux-gcc... gcc3
checking how to run the C preprocessor... mips-linux-gcc -E
checking build system type... i686-pc-linux-gnu
checking host system type... mips-unknown-linux-gnu
checking for the BeOS... no
checking for Win32... no
checking for the Android... no
checking for Mac OS X Carbon support... no
checking for Mac OS X Cocoa support... no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether we are using the GNU C Library 2.1 or newer... yes
checking whether to enable garbage collector friendliness... no
checking whether to disable memory pools... no
checking for mips-linux-c++... mips-linux-c++
checking whether we are using the GNU C++ compiler... yes
checking whether mips-linux-c++ accepts -g... yes
checking dependency style of mips-linux-c++... gcc3
checking whether mips-linux-gcc and cc understand -c and -o together... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for mips-linux-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
configure: WARNING: using cross tools not prefixed with host triplet
checking pkg-config is at least version 0.16... yes
checking for gawk... (cached) gawk
checking for perl5... no
checking for perl... perl
checking for indent... no
checking for perl... /usr/bin/perl
checking for a Python interpreter with version >= 2.5... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/dist-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/dist-packages
checking for iconv_open... no
configure: error: *** No iconv() implementation found in C library or libiconv

我试过用该--with-libiconv=no选项调用配置脚本,但结果是一样的。我从其他来源知道 mips.cache 文件很好,但我不知道让配置脚本工作的魔力。我还使用这个工具链来交叉编译其他应用程序。我在这里想念什么?

谢谢!

4

1 回答 1

0

这是因为 libiconv 将不会使用正确的编译器(即在这种情况下为 mips 的编译器)构建,或者在配置 glib 时指定的路径中将不存在 library(.so)。

于 2013-07-29T11:04:30.457 回答