Linux 错误:使用了 Libtool 库,但未定义“LIBTOOL”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18978252/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-07 00:55:21  来源:igfitidea点击:

error: Libtool library used but 'LIBTOOL' is undefined

clinuxautotoolsorientdb

提问by Imme22009

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

我正在尝试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

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

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

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

我已经定义了 configure.ac 和 Makefile.am。

I run the following autotools

我运行以下自动工具

  • aclocal

  • autoheader

  • automake:

  • 本地的

  • 自动标题

  • 汽车制造商:

libtool (GNU libtool) 2.4.2

库工具(GNU库工具)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 .

  • 自动重新配置

  • aclocal -I /usr/share/libtool

  • 本地 -I 。

回答by Imme22009

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

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

  • aclocal

  • autoheader

  • 本地的

  • 自动标题

回答by Eli

A good answer for me was to install libtool:

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

sudo apt-get install libtool

回答by fatcook

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

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

  • cygwin32-libtool
  • libtool
  • libtool-debuginfo
  • cygwin32-libtool
  • 库工具
  • libtool-debuginfo

回答by Julien

In my case on MacOs I solved it with:

就我在 MacO 上的情况而言,我用以下方法解决了这个问题:

brew link libtool

I know it's an old question but just ran into this, maybe it will help someone else.

我知道这是一个老问题,但刚刚遇到这个问题,也许它会帮助别人。

回答by Steven McConnon

For mac it's simple:

对于 mac,这很简单:

brew install libtool