173

I am trying to automake the OrientDb C++ library, but getting some errors.

Makefile.am:10: error: Libtool library used but 'LIBTOOL' is undefined
Makefile.am:10:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
Makefile.am:10:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
Makefile.am:10:   If 'LT_INIT' is in 'configure.ac', make sure
Makefile.am:10:   its definition is in aclocal's search path.

https://github.com/tglman/orientdb-c

https://github.com/tglman/orientdb-c/wiki/Install

I have configure.ac and Makefile.am already defined.

I run the following autotools

  • aclocal

  • autoheader

  • automake:

libtool (GNU libtool) 2.4.2

configure.ac

# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([orientdb-c],[0.9])
AC_CONFIG_SRCDIR([src/o_query_internal.h])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE()

# Checks for programs.
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

LT_INIT

# Checks for libraries.

# Checks for header files.
AC_CHECK_HEADERS([malloc.h memory.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h     sys/time.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([gethostbyname memset socket strchr strcspn strdup strerror])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT

Things I already tried:

  • autoreconf

  • aclocal -I /usr/share/libtool

  • aclocal -I .

Imme22009
  • 3,992
  • 7
  • 31
  • 47
  • 34
    For anyone else stumbling on this error the fix for me was: `sudo apt-get install libtool`. – Casper Mar 12 '16 at 14:37
  • 4
    Thanks @Casper you saved my lot of time. For centOs folks it is `yum install libtool`. – Achal Aug 14 '19 at 12:22

7 Answers7

246

A good answer for me was to install libtool:

sudo apt-get install libtool
S.S. Anne
  • 15,171
  • 8
  • 38
  • 76
Eli
  • 4,576
  • 1
  • 27
  • 39
113

Fixed it. I needed to run libtoolize in the directory, then re-run:

  • aclocal

  • autoheader

Imme22009
  • 3,992
  • 7
  • 31
  • 47
  • 95
    In my case, I just need to install libtool. `sudo apt-get install libtool` – Aust Mar 11 '15 at 21:14
  • 11
    @Aust same, brew install libtool for OS X using homebrew – Ron E Oct 04 '15 at 21:54
  • 1
    I find similar question on SO, and all answers were to "just install libtool". Well, I already had libtool installend, and still got the error. *This* answer is what really helped me. – bartgol Mar 02 '21 at 18:25
  • `port install libtool` also works if you're using macOS (OS X) and MacPorts. – NSGod Mar 16 '21 at 15:22
8

In my case on macOS I solved it with:

brew link libtool
Boris Verkhovskiy
  • 14,854
  • 11
  • 100
  • 103
Julien
  • 2,217
  • 2
  • 28
  • 49
2

For mac users who might have had a bad experience with brew, unpredictable download behavior, endless dependencies, time to download, and the large amount of space it consumed, I offer an alternative below. Maybe I was brewing incorrectly, but it couldn't hurt to be aware of yet another way (in addition to MacPorts, port install libtool, or xcode, xcode-select --install ).

https://ftp.gnu.org/gnu/libtool/

Download the tar.gz file, then extract it

tar -xzf libtool-2.4.tar.gz

then

configure
make
sudo make install
chars
  • 343
  • 3
  • 10
1

For folks who ended up here and are using CYGWIN, install following packages in cygwin and re-run:

  • cygwin32-libtool
  • libtool
  • libtool-debuginfo
ochs.tobi
  • 3,214
  • 7
  • 31
  • 52
fatcook
  • 946
  • 4
  • 16
1

For mac it's simple:

brew install libtool
Steven McConnon
  • 2,650
  • 2
  • 16
  • 21
1

For people using Tiny Core Linux, you also need to install libtool-dev as it has the *.m4 files needed for libtoolize.

Aaron Mason
  • 310
  • 3
  • 11