Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built files change if I redo cmake configuration #163

Closed
atgeirr opened this issue Feb 25, 2013 · 2 comments
Closed

Built files change if I redo cmake configuration #163

atgeirr opened this issue Feb 25, 2013 · 2 comments
Labels

Comments

@atgeirr
Copy link
Member

atgeirr commented Feb 25, 2013

If I build an executable and store it, then remake that file without reconfiguration, the files compare identical. However, if I reconfigure and rebuild they differ.

Why does this happen? Is some timestamp being embedded? I think this is unfortunate behaviour, but do not know what to do about it.

@rolk
Copy link
Member

rolk commented Mar 4, 2013

I think this may be toolchain-dependent. On my system:

rm -rf * ; ../../src/opm-core/configure --enable-shared && ionice -c2 -n7 make -j5
cp lib/libopmcore.so libopmcoreso1.dat
make clean
ionice -c2 -n7 make -j5
cp lib/libopmcore.so libopmcoreso2.dat
../../src/opm-core/configure --enable-shared && ionice -c2 -n7 make -j5
cp lib/libopmcore.so libopmcoreso3.dat
make distclean
../../src/opm-core/configure --enable-shared && ionice -c2 -n7 make -j5
cp lib/libopmcore.so libopmcoreso4.dat
for ((i=2;i<5;i++)); do 
  cmp libopmcoreso1.dat libopmcoreso${i}.dat && echo $i: Same || echo $i: Differ;
done

produces this output:

2: Same
3: Same
4: Same

Note that ELF objects (which are used on Linux) does not have timestamps, whereas Mach-O (which is used on MacOS X) does. At which offset and how many bytes are different?

@atgeirr
Copy link
Member Author

atgeirr commented Mar 5, 2013

I do not know exactly where the difference is, but the file sizes are identical. I will assume this is caused by Mach-O timestamping then, and close the issue.

@atgeirr atgeirr closed this as completed Mar 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants