dev-libs/apr-1.4.2 fails to emerge under OS X with the following error about libtool: make -j3 -j1 make[1]: Entering directory `/Library/Gentoo/var/tmp/portage/dev-libs/apr-1.4.2/work/apr-1.4.2' /Library/Gentoo/bin/bash /Library/Gentoo/usr/bin/libtool --silent --mode=compile i686-apple-darwin10-gcc -O2 -pipe -march=prescott -DHAVE_CONFIG_H -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I./include -I/Library/Gentoo/var/tmp/portage/dev-libs/apr-1.4.2/work/apr-1.4.2/include/arch/unix -I./include/arch/unix -I/Library/Gentoo/var/tmp/portage/dev-libs/apr-1.4.2/work/apr-1.4.2/include/arch/unix -I/Library/Gentoo/var/tmp/portage/dev-libs/apr-1.4.2/work/apr-1.4.2/include -o passwd/apr_getpass.lo -c passwd/apr_getpass.c && touch passwd/apr_getpass.lo /Library/Gentoo/usr/bin/libtool: /Library/Gentoo/usr/bin/libtool: cannot execute binary file make[1]: *** [passwd/apr_getpass.lo] Error 126 The makefile is running /bin/sh against libtool which is not a shell script under OS X. I tried editing the makefile (build/apr_rules.mk) to invoke libtool directly but that didn't fix the problem either: make[1]: Entering directory `/Library/Gentoo/var/tmp/portage/dev-libs/apr-1.4.2/work/apr-1.4.2' /Library/Gentoo/usr/bin/libtool --silent --mode=compile i686-apple-darwin10-gcc -O2 -pipe -march=prescott -DHAVE_CONFIG_H -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I./include -I/Library/Gentoo/var/tmp/portage/dev-libs/apr-1.4.2/work/apr-1.4.2/include/arch/unix -I./include/arch/unix -I/Library/Gentoo/var/tmp/portage/dev-libs/apr-1.4.2/work/apr-1.4.2/include/arch/unix -I/Library/Gentoo/var/tmp/portage/dev-libs/apr-1.4.2/work/apr-1.4.2/include -o passwd/apr_getpass.lo -c passwd/apr_getpass.c && touch passwd/apr_getpass.lo /Library/Gentoo/usr/bin/libtool: unknown option character `-' in: --silent Usage: /Library/Gentoo/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] Usage: /Library/Gentoo/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load] make[1]: *** [passwd/apr_getpass.lo] Error 1 Reproducible: Always emerge --info: Portage 2.2.01.15354-prefix (prefix/darwin/macos/10.6/x86, gcc-4.2.1, unavailable, 10.4.0 i386) ================================================================= System uname: Darwin-10.4.0-i386-32bit Timestamp of tree: Thu, 08 Jul 2010 02:40:02 +0000 distcc 3.1-toolwhip.1 i386-apple-darwin10.0 [disabled] app-shells/bash: 4.0_p38 dev-lang/python: 2.6.5-r2 sys-devel/autoconf: 2.65-r1 sys-devel/automake: 1.10.3, 1.11.1 sys-devel/gcc-config: 1.4.1-r00.2 sys-devel/libtool: 2.2.10 ACCEPT_KEYWORDS="x86-macos ~x86-macos" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-apple-darwin10" CFLAGS="-O2 -pipe -march=prescott" CHOST="i686-apple-darwin10" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -pipe -march=prescott" DISTDIR="/Library/Gentoo/usr/portage/distfiles" FEATURES="assume-digests collision-protect distlocks fixpackages news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.mirrors.hoobly.com/ http://gentoo.netnitco.net http://gentoo.osuosl.org/" LDFLAGS=""
I come across this issue too. It can be temporarily bypassed by link $EPREFIX/usr/bin/libtool to $EPREFIX/usr/bin/glibtool
hmmm, does the ebuild do something special with libtool here? it shouldn't call libtool on OSX, but glibtool
Created attachment 240655 [details, diff] call glibtool intead of libtool on OSX
I see thanks. I would typically do something like local g= [[ ${CHOST} == *-darwin* ]] && g=g sed -i -e .... ${g}libtool ... || die (to make it shorter) (I'm not in a place where I can commit a fix right now, but something like this or your patch needs to be committed asap)
still no one fix this issue in portage. and another issue with libtool to compile and install boost, one have to link $EPREFIX/usr/bin/libtool to /$EPREFIX/usr/bin/x86_64-apple-darwin10-libtool while to bypass this issue, one have to link $EPREFIX/usr/bin/libtool to /$EPREFIX/usr/bin/glibtool it is a little interesting
Can you open a new bug for boost, it sounds like it's different. I fixed the apr one now, thanks.