2013-05-16 38 views
1

我试图按照指示here为MIPS系统交叉编译GLib 2.37.0。我有以下内容的mips.cache文件:交叉编译用于MIPS的GLib导致“无iconv()实现”配置错误

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文件是好的,但我不知道让配置脚本起作用的魔力。我也使用这个工具链来交叉编译其他应用程序。我在这里错过了什么?

谢谢!

回答

0

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

+1

这是否意味着我应该交叉编译libiconv然后交叉编译GLib? – GrandAdmiral

+0

是的,你也必须交叉编译。 –