交叉编译ghc失败了iconv

时间:2015-11-20 08:32:33

标签: haskell ghc

成功运行

./configure --target=arm-linux-androideabi --with-gcc=arm-linux-androideabi-gcc

然后失败。

checking value of ENOTSUP... 95
checking value of SIGINT... 2
checking value of O_BINARY... 0
checking for library containing iconv... no
configure: error: iconv is required on non-Windows platforms
make[1]: *** [libraries/base/dist-install/package-data.mk] Error 1
make: *** [all] Error 2

尝试安装libiconv,并确保

dt-ubt@dt-ubt:~/workspace/ghc$ ls /usr/local/lib/
charset.alias        libiconv.la        libsodium.la             python2.7
libcharset.a         libiconv.so        libsodium.so             python3.4
libcharset.la        libiconv.so.2      libsodium.so.13          site_ruby
libcharset.so        libiconv.so.2.5.0  libsodium.so.13.0.2      x86_64-linux-ghc-7.8.3
libcharset.so.1      libiconv.so.2.5.1  pkgconfig
libcharset.so.1.0.0  libsodium.a        preloadable_libiconv.so

然后我跑了,问题仍然存在。

指定iconv的源位置也不起作用(将其添加到mk / build.mk中)

libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes=/home/dt-ubt/workspace/ghc/iconv/include 
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries=/home/dt-ubt/workspace/ghc/iconv/lib

1 个答案:

答案 0 :(得分:1)

您可能需要iconv匹配arm-linux-androideabi。推测性地:如果GHC将iconv链接到已编译的Haskell二进制文件中,那么iconv的副本必须与--target体系结构匹配。