From: "akr (Akira Tanaka)" Date: 2013-04-28T05:58:41+09:00 Subject: [ruby-dev:47303] [ruby-trunk - Feature #8338] compilation failure in nkf with Bionic (Android's libc) Issue #8338 has been updated by akr (Akira Tanaka). そのパッチを当てると、make, make install まで通るようになります。 (もちろん動かしていないので、そこから先は知りません) ---------------------------------------- Feature #8338: compilation failure in nkf with Bionic (Android's libc) https://bugs.ruby-lang.org/issues/8338#change-38962 Author: akr (Akira Tanaka) Status: Assigned Priority: Normal Assignee: naruse (Yui NARUSE) Category: ext Target version: current: 2.1.0 buildroot 以外での cross compile もしてみようかと思って、 Android を試したところ、nkf のところで compile に失敗します。 Bionic (Android の libc) には langinfo.h がないのが原因のようです。 nkf.h を見たところ、どう修正するのが適切なのかわからなかったので issue としておきます。 私の環境 (x86_64 な Debian GNU/Linux (squeeze)) では以下のようにすれば再現できます。 (wget しているのは Android NDK で、 http://developer.android.com/tools/sdk/ndk/index.html に載っていたものです。 Linux 64-bit (x86) 以外のものもあるので、他の環境でも試せるかもしれません) % ruby -v ruby 2.1.0dev (2013-04-24 trunk 40443) [x86_64-linux] % A=$HOME/a % mkdir $A % cd $A % wget http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2 % tar xf android-ndk-r8e-linux-x86_64.tar.bz2 % android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -v |& grep Target Target: arm-linux-androideabi % svn co http://svn.ruby-lang.org/repos/ruby/trunk ruby ... Checked out revision 40502. % cd ruby % autoconf % ./configure --prefix=$A --host=arm-linux-androideabi CC="$A/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=$A/android-ndk-r8e/platforms/android-14/arch-arm" % make ... gmake[2]: Entering directory `/home/akr/a/ruby/ext/nkf' compiling nkf.c In file included from nkf-utf8/nkf.c:30:0, from nkf.c:62: nkf-utf8/nkf.h:166:22: fatal error: langinfo.h: No such file or directory compilation terminated. gmake[2]: *** [nkf.o] Error 1 gmake[2]: Leaving directory `/home/akr/a/ruby/ext/nkf' gmake[1]: *** [ext/nkf/all] Error 2 gmake[1]: Leaving directory `/home/akr/a/ruby' gmake: *** [build-ext] Error 2 zsh: exit 2 langinfo.h というファイルを探してみると、たしかにないようです。 % find $A -name langinfo.h % また、 https://android.googlesource.com/platform/bionic/+/android-4.2.2_r1.2/libc/README とかには - no support for locales と書いてあるのでないのはそういうものなのでしょう。 なお、現状ではそもそも Android で動くべきということないと思うので、Feature にしておきます。 -- http://bugs.ruby-lang.org/