Why ar doesn't call ranlib on Mac?

Joshua Root jmr at macports.org
Wed Mar 4 07:38:32 PST 2009


Peter O'Gorman wrote:
> Alexy Khrabrov wrote:
>> In building various Linux things from source on Mac, I've run into the
>> "archive has no table of contents" problem several times.  The fix is
>> invariably to go and stick ranlib after each ar.
> 
> What version of Mac OS X/Xcode are you using? ar, since Mac OS X 10.4
> does ranlib the archive. I filed a bug at the time asking for the -S
> flag to turn off this behavior to speed up creating an archive
> incrementally.
> 
> http://www.opensource.apple.com/darwinsource/10.5.6/cctools-667.3/ar/ar.c

Apparently the issue crops up not only on Panther but also when building
universal, see for example <http://trac.macports.org/ticket/13634>.

- Josh


More information about the macports-users mailing list