سؤال

When I try and install iconv by running: rvm pkg install iconv, it fails with this error:

Error running 'autoreconf -is --force',
please read /usr/local/rvm/log/libiconv/autoreconf.log
Configuring libiconv in /usr/local/rvm/src/libiconv-1.13.1.........................
Error running './configure --prefix=/usr/local/rvm/usr --enable-shared',
please read /usr/local/rvm/log/libiconv/configure.log
Compiling libiconv in /usr/local/rvm/src/libiconv-1.13.1..
Error running 'make -j1',
please read /usr/local/rvm/log/libiconv/make.log

Please note that it's required to reinstall all rubies:

    rvm reinstall all --force

In the log, it says:

root@web01:~# cat /usr/local/rvm/log/libiconv/autoreconf.log
configure.ac:134: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
configure.ac:134: the top level
configure.ac:134: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
configure.ac:134: the top level
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: linking file `build-aux/config.guess'
libtoolize: linking file `build-aux/config.sub'
libtoolize: linking file `build-aux/install-sh'
libtoolize: linking file `build-aux/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `../build-aux'.
libtoolize: linking file `../build-aux/config.guess'
libtoolize: linking file `../build-aux/config.sub'
libtoolize: linking file `../build-aux/install-sh'
libtoolize: linking file `../build-aux/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: linking file `build-aux/config.guess'
libtoolize: linking file `build-aux/config.sub'
libtoolize: linking file `build-aux/install-sh'
libtoolize: linking file `build-aux/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:134: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
configure.ac:134: the top level
configure.ac:134: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
configure.ac:134: the top level
configure.ac:151: error: possibly undefined macro: AC_EILSEQ
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

How should I go about fixing this?

هل كانت مفيدة؟

المحلول

Try with:

rvm get head
rvm --skip-autoreconf pkg install iconv

نصائح أخرى

You should not need to use rvm pkg, RVM 1.19 comes with autolibs - which deprecates pkg.

Autolibs will pull dependencies for ruby using package manager instead of compiling, this will improve rubies compatibility with other parts of system.

Using autolibs is as easy as:

rvm get stable
rvm autolibs enable
rvm install ruby

RVM will install dependencies and then build the ruby you need.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top