【问题标题】:error: Libtool library used but 'LIBTOOL' is undefined错误:使用了 Libtool 库,但未定义“LIBTOOL”
【发布时间】:2013-09-29 11:18:13
【问题描述】:

我正在尝试automake OrientDb C++ 库,但遇到了一些错误。

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

  • 自动标题

  • 自动制作:

libtool (GNU libtool) 2.4.2

配置.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

我已经尝试过的事情:

  • 自动重新配置

  • aclocal -I /usr/share/libtool

  • aclocal -I .

【问题讨论】:

  • 对于遇到此错误的其他人,我的修复方法是:sudo apt-get install libtool
  • 感谢@Casper,您为我节省了大量时间。对于 centOs 人来说,它是yum install libtool

标签: c linux autotools orientdb


【解决方案1】:

对我来说一个好的答案是安装 libtool:

sudo apt-get install libtool

【讨论】:

    【解决方案2】:

    修复它。我需要在目录中运行libtoolize,然后重新运行:

    • aclocal

    • 自动标题

    【讨论】:

    • 就我而言,我只需要安装 libtool。 sudo apt-get install libtool
    • @Aust 同样,使用 homebrew 为 OS X brew install libtool
    • 我在 SO 上发现了类似的问题,所有答案都是“只安装 libtool”。好吧,我已经安装了 libtool,但仍然出现错误。 这个答案对我有很大帮助。
    • 如果您使用的是 macOS (OS X) 和 MacPorts,port install libtool 也可以使用。
    【解决方案3】:

    在 macOS 上我解决了这个问题:

    brew link libtool
    

    【讨论】:

      【解决方案4】:

      对于最终来到这里并使用CYGWIN 的人,请在 cygwin 中安装以下软件包并重新运行:

      • cygwin32-libtool
      • libtool
      • libtool-debuginfo

      【讨论】:

        【解决方案5】:

        对于 mac 来说很简单:

        brew install libtool
        

        【讨论】:

          【解决方案6】:

          对于使用 Tiny Core Linux 的人,您还需要安装 libtool-dev,因为它具有 libtoolize 所需的 *.m4 文件。

          【讨论】:

            猜你喜欢
            • 2013-03-20
            • 2013-07-10
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2013-03-05
            • 1970-01-01
            • 2011-07-14
            • 2014-04-27
            相关资源
            最近更新 更多