0
votes

I'm trying to build this proprietary third party project that uses automake. I'm using Ubuntu 14.04. When running configure, I get this error:

configure: error: cannot run /bin/bash ../config/config.sub

The failure seems to be due to the files in config/ being symlinked to a specific automake version that I don't have installed:

lrwxrwxrwx 1 stefan stefan 37 feb 12 12:42 config.guess -> /usr/share/automake-1.11/config.guess lrwxrwxrwx 1 stefan stefan 35 feb 12 12:42 config.sub -> /usr/share/automake-1.11/config.sub

Removing the files in config/ and running 'autoreconf -fvi' doesn't result in them being re-generated, so I'm not that sure how to fix this properly.

I don't want to install automake-1.11 just for some stupid symlinks, so I overwrote the files with the newer versions in /usr/share/automake-1.14/ and it built fine. Should that be OK, even if people would maybe build the code with an older version of automake (or newer one, for that matter)? Or is there another, more elegant way to take care of this?

Edit: autoreconf output for the third party library:

autoreconf: Entering directory `somelib'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/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: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: configure.ac: not using Automake
autoreconf: Leaving directory `somelib'

Edit2: I did add:

AC_CONFIG_MACRO_DIR(config)

to configure.ac. What's confusing is that there's no Makefile.am - the package seems to be using autoconf only, not automake, since there's only a Makefile.in. Anyway, with the above change, and after removing the config.* files, I notice they're still not regenerated after running autoreconf. Now the 'autoreconf -fvi' output is:

autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `config'.
libtoolize: copying file `config/libtool.m4'
libtoolize: copying file `config/ltoptions.m4'
libtoolize: copying file `config/ltsugar.m4'
libtoolize: copying file `config/ltversion.m4'
libtoolize: copying file `config/lt~obsolete.m4'
libtoolize: Consider adding `-I config' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: configure.ac: not using Automake
1
If autoreconf -fvi doesn't do it - and you should have included why it doesn't work, the errors, etc. - then their build tools are too old, or not written correctly. Errors relating to configure.ac, etc., would have been useful.Brett Hale
I've added the output of autoreconf. I'm not exactly an autotools expert, so can't make out any obvious errors from the output above - it's all mostly Chinese to me :).fencekicker
Fair enough. The 'Consider...' lines are telling. You can try adding ACLOCAL_AMFLAGS = -I m4 --install to the top level Makefile.am if not already present, as well.Brett Hale

1 Answers

1
votes

This feels like the tarball of the package you're trying to build has not been built with make dist, sigh.

The solution is, as people already noted, autoreconf -fi or similar. Since you're getting errors out of that, you should see if there is an autogen.sh or bootstrap.sh script that should pass it the right set of -I parameters.

Although "not using Automake" sounds like it might be a bit more peculiar than your average project.