12

Im trying to install ffmpeg on my server. Im unsing centos 5.

When I try to install libfdk_aac I get the following error

` autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
Makefile.am:31: Libtool library used but `LIBTOOL' is undefined
Makefile.am:31:
Makefile.am:31: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
Makefile.am:31: to `configure.ac' and run `aclocal' and `autoconf' again.
Makefile.am: C objects in subdir but `AM_PROG_CC_C_O' not in `configure.ac'
autoreconf: automake failed with exit status: 1 ` 

If i type which libtool I get /usr/bin/libtool, so i think libtool is installed. So im not sure why this error is happening.

Thanks for any advice

stefanct
  • 2,503
  • 1
  • 28
  • 32
Sam Healey
  • 666
  • 2
  • 8
  • 22
  • Under ubuntu this line fixed it for me: apt-get install libtool – Victor Laskin Dec 05 '14 at 11:27
  • 3
    try run [`libtoolize`](http://stackoverflow.com/a/18980043/2297751) in that directory first, and then re-run `autoreconf`. – Jon Oct 16 '15 at 08:41
  • A note on terminology. If you are running `autoreconf`, then you are doing much more than merely trying to "install" ffmpeg. You are trying to build the entire package, which is much more than merely building and installing from a preconstructed package. – William Pursell May 30 '17 at 18:02

4 Answers4

11

The error is telling you that either libtool is not installed, or that you are not checking for it in configure.ac. Add the line LT_INIT in configure.ac. If autoreconf then complains that it doesn't know what LT_INIT is, you should either install libtool, upgrade your installation of libtool or use the deprecated AC_PROG_LIBTOOL in configure.ac. (AC_PROG_LIBTOOL should be replaced by LT_INIT in newer projects.)

William Pursell
  • 204,365
  • 48
  • 270
  • 300
  • 4
    The answer is a bit helpful, but doesn't actually say what to do. What does "use AC_PROG_LIBTOOL" mean? – frabcus Jul 01 '14 at 05:59
  • 1
    @frabcus It means that if adding 'LT_INIT' in configure.ac doesn't work, you should instead add the line 'AC_PROG_LIBTOOL'. However, this is bad advice now. AC_PROG_LIBTOOL is utterly deprecated and if adding 'LT_INIT' does not work then it is advised to upgrade the entire autotool chain rather than trying to work with ancient cruft. – William Pursell Jul 02 '14 at 02:41
  • @WilliamPursell I agree in theory and disagree in practice. Just added `AC_PROG_LIBTOOL` to compile `libxslt` and it worked like a charm... :) – El Dude Jun 03 '16 at 00:59
  • It could be complaining that you are not checking for it, but it could also be that it isn't installed. If it IS installed, then it is complaining that you are not checking for it, but if it IS NOT installed, then it actually is complaining that it isn't installed. I was compiling something and had that error, and it turned out that libtool wasn't installed(and configure.ac actually had LT_INIT in it). – JustinCB May 30 '17 at 11:16
6

I had the same issue. Did the following

$brew install libtool
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libtool-    2.4.2.mavericks.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring libtool-2.4.2.mavericks.bottle.2.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
  /usr/local/Cellar/libtool/2.4.2: 66 files, 2.2M
fdk-aac $ glibtoolize
fdk-aac $ autoreconf -fiv
fdk-aac $ ./configure
fdk-aac $ make
fdk-aac $ make -install
go to ffmpeg/build
ffmpeg/build$ ../configure --enable-libfdk-aac --enable-nonfree
ffmpeg/build$make
ffmpeg/build$sudo make install
do ls /usr/local/lib/*fdk* check that libfdk-aac is installed
go to my application

 myapp/build$cmake ../
 myapp/build$make

Hope this helps

codegen
  • 79
  • 1
  • 2
1

I came across the same issue when install geoip for nginx in centos (when trying to run make command) and this is what I have done. yum install libtool Added below line at the end of configure.in AC_CONFIG_MACRO_DIR([m4])

Add below line at the end of Makefile.am ACLOCAL_AMFLAGS = -I m4

run $ aclocal $ libtoolize

Don't ask me why. But this worked.

MudithaE
  • 577
  • 5
  • 6
0

I had this problem when doing ./autogen.sh for cairo.

The complaining message does make much intelligible sense really.

But the following fixed it:

$ export ACLOCAL_PATH="/usr/share/aclocal/:/usr/local/share/aclocal"
$ ./autogen.sh
ouflak
  • 2,458
  • 10
  • 44
  • 49