This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ct-ng fails building mpfr


Hi,

This has been already mentioned [1], here's some more info
about it, hope it helps fixing:

[ERROR]    configure: error: cannot run /bin/sh
/home/z/ct-ng_c/targets/src/mpfr-2.3.1/config.sub

relevant code in lib/scripts/build/mpfr.sh:
do_mpfr_extract() {
    CT_ExtractAndPatch "${CT_MPFR_FILE}"

    # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the
    # same version number. Unfortunately, some tarballs of MPFR are not
    # built sanely, and thus ./configure fails on Gentoo.
    # See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html
    # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
    # This hack is not bad per se, but the MPFR guys would be better not to
    # do that in the future...
    CT_Pushd "${CT_SRC_DIR}/${CT_MPFR_FILE}"
    if [ ! -f .autotools.ct-ng ]; then
        CT_DoLog DEBUG "Re-building autotools files"
        CT_DoExecLog ALL autoreconf -fi
        CT_DoExecLog ALL libtoolize -f
        touch .autotools.ct-ng
    fi
    CT_Popd
}


So, ExtractAndPatch extracts mpfr with its original config.sub/guess and then
overrides them with the ct-ng version depending on the config.

Independent of that, libtoolize -f will delete the both files.
I have autoconf v. 2.61 and libtool 2.2.4.

Output from the both tools in the mpfr dir:
$ autoreconf -fiv:
autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.in: tracing
autoreconf: running: libtoolize --install --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: configure.in: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'

$ libtoolize -fv:
libtoolize: rm -f './config.guess'
libtoolize: rm -f './config.sub'
libtoolize: rm -f './ltmain.sh'
libtoolize: putting auxiliary files in `.'.
libtoolize: linking file from `/usr/share/libtool/config/ltmain.sh'
libtoolize: AC_CONFIG_MACRO_DIR not defined, not copying libtool macros.
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.


When commenting out the both commands in the above functions, the
toolchain builds just fine. Changing to 'libtoolize -fi' works also.
But this means that the configs are always rebuilt whether they're
overriden or not.

[1]
http://sourceware.org/ml/crossgcc/2008-09/msg00031.html

Cheers,
Zoltan

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]