7

I'm trying to compile libbsd from source on Ubuntu 13.04. I'm using a toolchain to cross-compile, but automake is on the local machine. I have aclocal-1.13 in the PATH and everything, but I'm still getting this error. I've tried looking them up but can't get any lead. What's going on here?

<...>
config.status: executing libtool commands
CDPATH="${ZSH_VERSION+.}:" && cd .. && /bin/bash /home/me/libbsd/build-aux/missing aclocal-1.13 -I m4
error: cannot get project version.
configure.ac:9: error: AC_INIT should be called with package and version arguments
/usr/share/aclocal-1.13/init.m4:23: AM_INIT_AUTOMAKE is expanded from...
configure.ac:9: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal-1.13: error: echo failed with exit status: 1
make: *** [../aclocal.m4] Error 1

Any help is greatly appreciated.

s g
  • 5,289
  • 10
  • 49
  • 82
  • 1
    Released tarballs should have a ready-to-run `configure` script, you shouldn't need autoconf/automake in your system. If you are checking out directly from the source code repository, then you better be prepared to do some maintenance, as it seems that configure.ac is using deprecated/obsoleted invocations. Try running `autoscan` and/or `autoupdate` to see if it tells you how to fix the problems. – DanielKO Mar 12 '14 at 16:18

1 Answers1

2

The error here is configure.ac:9: error: AC_INIT should be called with package and version arguments. You are getting this error because on line 9 of your configure.ac you are not passing package and version arguments to AC_INIT.

The exact information can be found here: https://www.gnu.org/software/automake/manual/automake.html#Public-Macros

Namely,

If your configure.ac has:

AC_INIT([src/foo.c])
AM_INIT_AUTOMAKE([mumble], [1.5])

You should correct it as follows:

AC_INIT([mumble], [1.5])
AC_CONFIG_SRCDIR([src/foo.c])
AM_INIT_AUTOMAKE

Although the other notes around it are important too imho.

John McGehee
  • 9,117
  • 9
  • 42
  • 50
Carlo Wood
  • 5,648
  • 2
  • 35
  • 47