Identically Compiled Executables Build Different Size Files

Updated Jun 14, 2018

Reported In

Software

  • LabVIEW Application Builder Module

Issue Details

I have a project in LabVIEW that I have compiled into a stand-alone application (executable) using Application Builder. I compiled a second, identical version
  • I ran the Windows File Compare tool (fc in Windows command prompt) on the binaries. I noted there were a few hex differences. Is this expected?
  • I noticed small differences in the resulting file size between both built executables. Is that expected?

Solution

LabVIEW Application Builder does not guarantee a deterministic build result. Different builds of the same EXE, RTEXE, or DLL will not have the same binary representation. The build result should not affect execution functionality or performance. 

Each time the build specification executes in the Application builder, LabVIEW moves the required VIs and dependencies into a new directory. LabVIEW then recompiles and relinks that directory before building the final binary through Application Builder. Various factors including the available memory, other running applications or services, and operating system parameters all affect the decisions made when compiling the source code and building the binary.

Comparing build results using the file compare tool is not an adequate means of verifying build results. Instead, National Instruments recommends testing each build result to confirm expected functionality and performance.

Additional Information

Note for LabVIEW Real-Time Users: As mentioned above, the Application Builder for RTEXEs is non-deterministic. However once it is compiled, the real-time executable will run deterministically on an RT target. It is the build process for the real-time executable that is non-deterministic.

WAS THIS ARTICLE HELPFUL?

Not Helpful