2013-09-24 27 views
67

我想automake OrientDb C++庫,但得到一些錯誤。錯誤:Libtool庫使用但'LIBTOOL'未定義

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

我有configure.ac和Makefile.am已定義。

我運行下面的自動工具

  • 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 

事情我已經嘗試過:

  • autoreconf

  • aclocal會-I在/ usr /共享/ libtool的

  • aclocal會-I。

+3

所以,這幾乎總結了每一個'autogen.sh'或'initgen.sh'永遠。 –

+7

對於任何人都在這個錯誤的絆腳石對我來說修復是:'sudo apt-get install libtool'。 – Casper

回答

61

修正了它。我需要在目錄中運行libtoolize,然後重新運行:

  • aclocal會

  • autoheader就

+79

就我而言,我只需要安裝libtool。 'sudo apt-get install libtool' – Aust

+7

@同樣,使用自制軟件爲OS X brew安裝libtool –

59

感謝@Casper和@Aust對我來說是很好的解決辦法是安裝libtool:

sudo apt-get install libtool