I'm trying to compile GNU bash 4.3.30 on (and for) my iPad 2, iOS 8.4 using Clang, ld64, cctools, GNU make and the iOS 8.1 SDK. When processing libintl, cctools' ar "can't find or exec: /usr/bin/ranlib", causing make to exit with error 1.
$ make
(...)
rm -f libintl.a
ar cr libintl.a bindtextdom.o dcgettext.o dgettext.o gettext.o finddomain.o loadmsgcat.o localealias.o textdomain.o l10flist.o explodename.o dcigettext.o dcngettext.o dngettext.o ngettext.o plural.o plural-exp.o localcharset.o relocatable.o localename.o log.o osdep.o intl-compat.o
fatal error: ar: can't find or exec: /usr/bin/ranlib (No such file or directory)
ar: internal ranlib command failed
make[1]: *** [libintl.a] Error 1
make[1]: Leaving directory '/private/var/mobile/bash-4.3.30/lib/intl'
make: *** [lib/intl/libintl.a] Error 1
$ echo $CC
clang --sysroot /var/mobile/iPhoneOS8.1.sdk -v
$ clang --version
clang version 3.5.0 (trunk)
Target: armv7-apple-darwin-14.0.0
Thread model: posix
$ ld -v
@(#)PROGRAM:ld PROJECT:ld64-
configured to support archs: i386 x86_64 armv4t armv5 armv6 armv7 armv7f armv7k armv8 arm64 arm64v8
$ which ranlib
$ ranlib
-sh: ranlib: command not found
$ find / -name ranlib
$
Apparently, my iPad has no ranlib. So, where can I find one? I've tried the ranlib.sh script from GNU binutils, which simply does ar s "$1"
, but then make tells me ar: no archive specified
. Or is there any way to compile GNU bash 4.3.30 without it?