
21 Mar
2005
21 Mar
'05
1:35 a.m.
Isaac Jones wrote:
I've gotten a bug report that Mac OS X complains when trying to link against cabal-generated archives, because it lacks an index: [...] Can anyone explain to me whether / why Mac OS X needs this index, and whether it'll hurt for any other arches? Should we just pass the -s flag to ar?
Mac OS X needs the index. The -s flag to ar will generate the index just as a separate invocation of "ranlib" will, but there's one big Mac OS X-specific problem: The index stores a time stamp; if the .a file's modification date is newer, then ld will refuse to load from it until you re-run ranlib. This commonly happens when you first build your .a files and then touch their modification date while installing. Cheers, Wolfgang