已安装 libtool 但未找到 libtoolize [英] installed libtool but libtoolize not found

查看:68
本文介绍了已安装 libtool 但未找到 libtoolize的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从我的 mac 上的源代码构建 libxml2.

im trying to build libxml2 from source on my mac.

所以我使用 mac 端口安装了 autoconf libtool 和 automake

so i have autoconf libtool and automake installed using mac ports

autoconf 和 automake 似乎按预期工作正常.

autoconf and automake seem to be working fine as expected.

我先尝试运行 autogen.sh.

i try running autogen.sh first.

libtoolize --version 不幸给出

libtoolize --version unfortunately gives

-bash: libtoolize: command not found

我尝试(再次)跑步

sudo port install libtool

--->  Cleaning libtool
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

我试试

locate libtool

它似乎安装得很好

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man1/libtool.1
/Applications/Xcode.app/Contents/Developer/usr/bin/libtool
/Applications/Xcode.app/Contents/Developer/usr/share/man/man1/libtool.1
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/cross/mipsel-linux-binutils/files/110-uclibc-libtool-conf.patch
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool/Portfile
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool/files
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool/files/ltmain.m4sh-allow-clang-stdlib.diff
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool-devel
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libtool-devel/Portfile
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/openslp/files/libtool-tags.patch
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/t1lib/files/patch-libtool-tag.diff
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/print/pdflib/files/patch-libtool.diff
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/security/steghide/files/libtool-tag.diff
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/www/apache2/files/libtool-tag.diff
/usr/bin/libtool
/usr/lib/php/build/libtool.m4
/usr/share/apr-1/build-1/libtool
/usr/share/man/man1/libtool.1

如何让 libtoolize 工作?

how do i get libtoolize to work?

推荐答案

您通常需要使用 glibtoolglibtoolize,因为 libtool 已经作为创建 Mach-O 动态库的二进制工具存在于 OS X 上.所以,这就是 MacPorts 安装它的方式,使用程序名称转换,尽管端口本身仍然命名为libtool".

You typically need to use glibtool and glibtoolize, since libtool already exists on OS X as a binary tool for creating Mach-O dynamic libraries. So, that's how MacPorts installs it, using a program name transform, though the port itself is still named 'libtool'.

某些 autogen.sh 脚本(或它们的等价物)将遵守 LIBTOOL/LIBTOOLIZE 环境变量.我自己的 autogen.sh 脚本中有一行:

Some autogen.sh scripts (or their equivalent) will honor the LIBTOOL / LIBTOOLIZE environment variables. I have a line in my own autogen.sh scripts:

case `uname` in Darwin*) glibtoolize --copy ;;
  *) libtoolize --copy ;; esac

您可能需要也可能不需要 --copy 标志.

You may or may not want the --copy flag.

注意:如果您已经使用 MacPorts 安装了 autotools,则带有 Makefile.am 文件的正确编写的 configure.ac 应该只需要 autoreconf -fvi.它应该按预期调用 glibtoolize 等.否则,某些软件包将分发 autogen.sh 或类似的脚本.

Note: If you've installed the autotools using MacPorts, a correctly written configure.ac with Makefile.am files should only require autoreconf -fvi. It should call glibtoolize, etc., as expected. Otherwise, some packages will distribute an autogen.sh or similar script.

这篇关于已安装 libtool 但未找到 libtoolize的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆