2013-03-16 188 views
28

即时通讯尝试在我的Mac上从源代码构建libxml2。安装了libtool,但没有找到libtoolize

,所以我有autoconf的libtool等automake的使用MAC端口

autoconf和automake的安装似乎是工作的罚款预期。

我尝试先运行autogen.sh。

libtoolize --version不幸给

-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的工作?

回答

34

您通常需要使用glibtoolglibtoolize,因为libtool在OS X上已经存在了创建的Mach-O动态库二进制工具。因此,MacPorts使用程序名称转换来安装它,尽管端口本身仍被命名为“libtool”。

某些autogen.sh脚本(或其等价物)将兑现LIBTOOL/LIBTOOLIZE环境变量。我有我自己的autogen.sh脚本行:

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

您可能会或可能不希望--copy标志。


注意:如果你已经使用的MacPorts安装了自动工具,正确的书面configure.acMakefile.am文件应该只需要autoreconf -fvi。如预期的那样,它应该呼叫glibtoolize等。否则,一些软件包将分发autogen.sh或类似的脚本。

+0

其中,autogen.sh通常位于何处? – Erik 2014-01-15 18:22:19

+0

@Erik - 通常位于顶层目录中,并通过在顶层“Makefile.am”中添加“EXTRA_DIST = autogen.sh”将其包含在发行版中。有时它有一个像'bootstrap.sh'这样的名字。通常,开发人员对'autoreconf'提供的默认值感到满意。 – 2014-01-30 11:46:32

+2

简单地用'glibtoolize'代替'libtoolize'为我工作 – domoarrigato 2015-02-14 10:36:06

18

我希望我的回答不是太天真。我是OSX的noob。

brew安装libtool解决了我的类似问题。

+1

公式(对于那些可能不想使用自制软件但不介意一些指针的公式)是[here](https://github.com/Homebrew/homebrew /斑点/主/库/公式/ libtool的。rb) – iain 2016-02-18 23:21:43

+3

如果你已经安装了其他工具,比如'imagemagick',你可能会发现brew的注意事项: '为了防止与Apple自己的libtool冲突,我们已经预先加了一个“g”,所以你改为:'** glibtool * *'和'** glibtoolize ** – pzrq 2016-12-10 04:03:08

+0

使用brew安装libtool时会出现问题:您可能会遇到类似“/ usr/local/bin/glibtoolize:406行:/usr/local/Library/ENV/4.3/sed : 无此文件或目录”。为我工作的解决方案是'brew unlink libtool'(这可能不是必须的),然后'brew卸载libtool && brew install libtool'(ebothmann的评论在https://github.com/Homebrew/legacy-homebrew/issues/ 43874)。 – 2018-01-18 08:38:07

相关问题