This is why it is important to have portable build environments. And ECC and checksumming file systems.
However, duckling the web got this workaround for EXT4:
https://serverfault.com/a/1153319
i.e. use device mapping or LVM setup to do the data integrity check at the block level, under the filesystem.
2. ZFS if supported by your distro, btrfs otherwise