Post marked as solved
Click to stop watching this post.
You have stopped watching this post. Click to start watching again.
Post marked as solved with 1 replies
68
Views
Obtaining latest compiled binaries for cctools
Are the binaries from more recent versions of cctools available somewhere on the internet to download?
With the command line tools from Xcode 12, install_name_tool -id stores the current timestamp (to 1 second resolution) in the file even when I have exported ZERO_AR_DATE=1.
However, when I download cctools-973 - https://opensource.apple.com/release/developer-tools-120.html, and build my own version of install_name_tool without any modifications, then the new binary does not have this behavior. On looking at the source code all the way up to cctools-410, I notice comments (see comments for line #undef OUTPUT_OPTION in this file) - https://opensource.apple.com/source/cctools/cctools-410.1/misc/install_name_tool.c.auto.html hinting that this behavior was fixed at some point.
Given that install_name_tool does not have version information, it is hard to say which version of cctools is currently shipping with Xcode.
To reproduce the behavior I mentioned above that is observed with cctools from Xcode CLT, but not with the open source versions:
$ cat foo.c
void a() {}
$ clang -g -c foo.c -o foo.o
$ clang -dynamiclib -o foo.so foo.o
$ shasum foo.so
$ for attempt in {1..4}; do sleep 1 && install_name_tool -id "foo.so" foo.so && shasum foo.so; done