[Haskell-cafe] where does ghc specify ar options

Alexy Khrabrov deliverable at gmail.com
Mon Mar 9 21:02:20 EDT 2009

> BTW, how did you get the package installed in that location? Did it
> involve copying into a temp dir and copying again? I believe that on
> OSX, copying a .a file breaks the ar index. This is because for  
> reasons
> best known to themselves Apple decided that the index is only valid if
> its timestamp is the same as the last modification time of the file.

OK -- what I did was rather drastic -- I got ar as a part of cctools  
off Apple's Open Source and verified that it didn't run ranlib on my  
Leopard 10.5.  However it turns out it's supposed to do so -- folks  
from MacPorts even got a flag -S to make it *not* tun ranlib...  Yet  
they're on PPC, and I'm on Intel (MBP).

So what I ended up doing is patching Apple's ar as described in that  
MacPorts thread:

Why ar doesn't call ranlib on Mac?

And after that, cabal-install did bootstrap.sh like a charm.

I know some folks say that they don't need to run ranlib on their  
Macs, and some do, and I could have  wrapped it in sh-wrappers and  
investigate it forever, but this issue has re-ar-ed its head often  
enough that I'm happy with just fetching the li'l slimy ar out of its  
source soup and fixing it in the bud.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090309/e759fecf/attachment.htm

More information about the Haskell-Cafe mailing list