site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Maybe you can do something similar? HTH /Jesper Papmehl 28 sep 2005 kl. 19.28 skrev Craig Rodrigues: Hi, I have the following scenario. I have a third party library binary only static library checked into our revision control system. When I check out our code from our revision control system and try to build, the linker complains with: If I run ranlib on libsomelib.a, then I can get this to work, but this doesn't seem right to me. I can circumvent all this to get this to work, but this also doesn't seem right. If I read the bottom of the libtool man page: Is this use case still valid? Is this warning useful at all? I prefer the linker to fail if it cannot find symbols to link to, not if it doesn't like the timestamp of the library I am linking to. Would the following fix be appropriate for the linker? -- Craig Rodrigues rodrigc@crodrigues.org _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... We had what I think is the same problem, and I fixed it by setting up my Perforce (the version control system we use) client to preserve the modification dates of all files (that is, my local copy of any files under version control will have the same modification date that the file in question had when it was last submitted into the version control system). That fixed the problem for me. (And I also use cp -p whenever I copy .a files, to preserve the mod date.) ld: table of contents for archive: ../lib/libsomelib.a is out of date; rerun ranlib(1) (can't load from it) One problem I have is that in our revision control system, we have a policy where we are not supposed to modify third party binaries like this (source yes, binaries, no). BUGS With the way libraries used to be created, errors were possible if the library was modified with ar(1) and the table of contents was not updated by rerunning ranlib(1). Thus the link editor, ld, warns when the modification date of a library is more recent than the creation date of its table of contents. Unfortunately, this means that you get the warning even if you only copy the library. --- pass1.c.orig Wed Sep 28 13:26:19 2005 +++ pass1.c Wed Sep 28 13:26:28 2005 @@ -1306,11 +1306,6 @@ "ranlib(1) (can't load from it)", file_name); return; } - if(stat_buf.st_mtime > strtol(symdef_ar_hdr->ar_date, NULL, 10)){ - error("table of contents for archive: %s is out of date; rerun " - "ranlib(1) (can't load from it)", file_name); - return; - } symdef_length = strtol(symdef_ar_hdr->ar_size, NULL, 10) - ar_name_size; /* * The contents of a __.SYMDEF file is begins with a word giving the This email sent to site_archiver@lists.apple.com