Binary file built on same SDK BUT different Ubuntu versions does not match.
I have a Qt Application which was cross compiled to run on Nitrogen board running Yocto based Linux distribution. I built an SDK to compile my application for the Nitrogen board. I was using
Ubuntu 12.04 LTS 32 bitas my Guest OS running on VM Ware Workstation 9 as my development machine and I have added a kit in my Qt Creator to use the Yocto based SDK to generate the binary. Everything works fine and as expected.
Now, I have upgraded my VMWare Workstation to 10.0 and upgraded my Guest OS to
Ubuntu 16.04 LTS 64bit. I am using the same SDK that I used on Ubuntu 12.04 to generate the binary for my Qt Application. I got the binary generated and working as expected.
But when I compare the binary generated on Ubuntu 12.04 with the binary 16.04, there are a lot of differences. Since am using the same SDK to build my Qt application I was expecting that the binaries should match with very minor differences. Am I right, can I expect the binaries built based on same SDK but on different Ubuntu version Hosts will/would match ?
You can't unfortunately expect the binaries to be identical. I don't know what all information varies in Qt applications, but compilers do add metadata about the compiling / linking environment. This is sometimes a problem and that's why there's plenty of activity in how to create "reproducible builds" so one could verify that a binary is really what it claims to be.