Thanks for ccache, which I continue to find very useful, and a massive time saver. However, I've hit a problem. The fix made with commit 2c629987c2667667df136fbf3413b2d192a9dd5e has been regressed. Specifically, if a single binary is used as the front end for more than one compiler variant, hard linked with more than one name, and compiler behaviour varies depending on which name is used to invoke it, then the object file output by the compiler can vary as a function of the compiler name, even for the same pre-processed input and command line flags. On AIX, this is the case. Specifically, xlc and cc_r are quite different in behaviour, but they are invoked via the same binary on disk: $ ls -li /usr/vac/bin/xlc /usr/vac/bin/cc_r 238514 -r-xr-xr-x 32 bin bin 310036 Mar 11 2011 /usr/vac/bin/cc_r 238514 -r-xr-xr-x 32 bin bin 310036 Mar 11 2011 /usr/vac/bin/xlc A fix was put in for this with commit 4ebb9a36352c6127ea76317f7a86eaad54bae076, adding the compiler name to the hash if the link count is more than 1. However, that fix was unfortunately removed as a side effect of the refactoring of commit a60d2af7c28482284973e768b98f4cd15a3096cf. The result is strange and mysterious build failures on AIX, when test building a project in turn with more than one compiler. Nicholas Clark
(In reply to comment #0) > [...] > A fix was put in for this with commit 4ebb9a36352c6127ea76317f7a86eaad54bae076, > adding the compiler name to the hash if the link count is more than 1. > > However, that fix was unfortunately removed as a side effect of the refactoring > of commit a60d2af7c28482284973e768b98f4cd15a3096cf. That commit indeed removed the check for a link count greater than 1, but the name is still hashed (so now it's always hashed). And I think that's the correct thing to do, since ccache otherwise would be mislead by this: rm /usr/vac/bin/xlc # ...and all other hard links except cc_r ccache /usr/vac/bin/cc_r ... mv /usr/vac/bin/cc_r /usr/vac/bin/xlc ccache /usr/vac/bin/xlc ... > The result is strange and mysterious build failures on AIX, when test building > a project in turn with more than one compiler. This sounds strange since your original suggestion should still be there. Could it be some other problem?
(In reply to comment #1) > This sounds strange since your original suggestion should still be there. Could > it be some other problem? Nicholas, do you have more input on this? Otherwise, I think I'll close the bug report.
I'm closing this bug now. Please reopen it if you think the bug still exists.